diff options
| author | NotAPenguin <michiel.vandeginste@gmail.com> | 2024-09-02 23:17:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-02 23:17:17 +0200 |
| commit | 1b820de08a05070909a267e17f033fcf58ac8710 (patch) | |
| tree | 02831a025986a06b20f87e5bcc69d1e0c639a342 /src/main/java/tectech/thing/casing | |
| parent | afd3fd92b6a6ab9ab0d0dc3214e6bc8ff7a86c9b (diff) | |
| download | GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.gz GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.bz2 GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.zip | |
The Great Renaming (#3014)
* move kekztech to a single root dir
* move detrav to a single root dir
* move gtnh-lanthanides to a single root dir
* move tectech and delete some gross reflection in gt++
* remove more reflection inside gt5u
* delete more reflection in gt++
* fix imports
* move bartworks and bwcrossmod
* fix proxies
* move galactigreg and ggfab
* move gtneioreplugin
* try to fix gt++ bee loader
* apply the rename rules to BW
* apply rename rules to bwcrossmod
* apply rename rules to detrav scanner mod
* apply rename rules to galacticgreg
* apply rename rules to ggfab
* apply rename rules to goodgenerator
* apply rename rules to gtnh-lanthanides
* apply rename rules to gt++
* apply rename rules to kekztech
* apply rename rules to kubatech
* apply rename rules to tectech
* apply rename rules to gt
apply the rename rules to gt
* fix tt import
* fix mui hopefully
* fix coremod except intergalactic
* rename assline recipe class
* fix a class name i stumbled on
* rename StructureUtility to GTStructureUtility to prevent conflict with structurelib
* temporary rename of GTTooltipDataCache to old name
* fix gt client/server proxy names
Diffstat (limited to 'src/main/java/tectech/thing/casing')
15 files changed, 1512 insertions, 0 deletions
diff --git a/src/main/java/tectech/thing/casing/BlockGTCasingsBA0.java b/src/main/java/tectech/thing/casing/BlockGTCasingsBA0.java new file mode 100644 index 0000000000..19469a0c70 --- /dev/null +++ b/src/main/java/tectech/thing/casing/BlockGTCasingsBA0.java @@ -0,0 +1,224 @@ +package tectech.thing.casing; + +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GTCopiedBlockTexture; +import gregtech.api.util.GTLanguageManager; +import gregtech.common.blocks.BlockCasingsAbstract; +import gregtech.common.blocks.MaterialCasings; +import tectech.thing.CustomItemList; + +/** + * Created by danie_000 on 03.10.2016. + */ +// Mostly tesla coils, also 2 eye of harmony casings. +public class BlockGTCasingsBA0 extends BlockCasingsAbstract { + + private static final IIcon[] tM0 = new IIcon[2]; + private static final IIcon[] tM1 = new IIcon[2]; + private static final IIcon[] tM2 = new IIcon[2]; + private static final IIcon[] tM3 = new IIcon[2]; + private static final IIcon[] tM4 = new IIcon[2]; + private static final IIcon[] tM5 = new IIcon[2]; + private static final IIcon[] tM6 = new IIcon[2]; + private static IIcon tM7; + private static final IIcon[] tM8 = new IIcon[2]; + private static final IIcon[] tM9 = new IIcon[2]; + + private static IIcon EOH_INNER; + private static IIcon EOH_OUTER; + private static IIcon EOH_INFINITE; + + private static final byte START_INDEX = 16; + + public BlockGTCasingsBA0() { + super(ItemCasingsBA0.class, "gt.blockcasingsBA0", MaterialCasings.INSTANCE); + for (byte b = 0; b < 16; b = (byte) (b + 1)) { + Textures.BlockIcons.casingTexturePages[BlockGTCasingsTT.texturePage][b + + START_INDEX] = new GTCopiedBlockTexture(this, 6, b); + /* IMPORTANT for block recoloring **/ + } + + GTLanguageManager + .addStringLocalization(getUnlocalizedName() + ".0.name", "Redstone Alloy Primary Tesla Windings"); + GTLanguageManager + .addStringLocalization(getUnlocalizedName() + ".1.name", "MV Superconductor Primary Tesla Windings"); + GTLanguageManager + .addStringLocalization(getUnlocalizedName() + ".2.name", "HV Superconductor Primary Tesla Windings"); + GTLanguageManager + .addStringLocalization(getUnlocalizedName() + ".3.name", "EV Superconductor Primary Tesla Windings"); + GTLanguageManager + .addStringLocalization(getUnlocalizedName() + ".4.name", "IV Superconductor Primary Tesla Windings"); + GTLanguageManager + .addStringLocalization(getUnlocalizedName() + ".5.name", "LuV Superconductor Primary Tesla Windings"); + GTLanguageManager + .addStringLocalization(getUnlocalizedName() + ".9.name", "ZPM Superconductor Primary Tesla Windings"); + + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Tesla Base Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Tesla Toroid Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Tesla Secondary Windings"); + + GTLanguageManager + .addStringLocalization(getUnlocalizedName() + ".10.name", "Reinforced Temporal Structure Casing"); + GTLanguageManager + .addStringLocalization(getUnlocalizedName() + ".11.name", "Reinforced Spatial Structure Casing"); + GTLanguageManager + .addStringLocalization(getUnlocalizedName() + ".12.name", "Infinite Spacetime Energy Boundary Casing"); + + CustomItemList.tM_TeslaPrimary_0.set(new ItemStack(this, 1, 0)); + CustomItemList.tM_TeslaPrimary_1.set(new ItemStack(this, 1, 1)); + CustomItemList.tM_TeslaPrimary_2.set(new ItemStack(this, 1, 2)); + CustomItemList.tM_TeslaPrimary_3.set(new ItemStack(this, 1, 3)); + CustomItemList.tM_TeslaPrimary_4.set(new ItemStack(this, 1, 4)); + CustomItemList.tM_TeslaPrimary_5.set(new ItemStack(this, 1, 5)); + CustomItemList.tM_TeslaPrimary_6.set(new ItemStack(this, 1, 9)); + + CustomItemList.tM_TeslaBase.set(new ItemStack(this, 1, 6)); + CustomItemList.tM_TeslaToroid.set(new ItemStack(this, 1, 7)); + CustomItemList.tM_TeslaSecondary.set(new ItemStack(this, 1, 8)); + + CustomItemList.EOH_Reinforced_Temporal_Casing.set(new ItemStack(this, 1, 10)); + CustomItemList.EOH_Reinforced_Spatial_Casing.set(new ItemStack(this, 1, 11)); + CustomItemList.EOH_Infinite_Energy_Casing.set(new ItemStack(this, 1, 12)); + } + + @Override + public void registerBlockIcons(IIconRegister aIconRegister) { + tM0[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_0"); + tM0[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_0"); + tM1[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_1"); + tM1[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_1"); + tM2[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_2"); + tM2[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_2"); + tM3[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_3"); + tM3[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_3"); + tM4[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_4"); + tM4[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_4"); + tM5[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_5"); + tM5[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_5"); + tM9[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_6"); + tM9[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_6"); + + tM6[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_BASE_TOP_BOTTOM"); + tM6[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_BASE_SIDES"); + tM7 = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_TOROID"); + tM8[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_SECONDARY_TOP_BOTTOM"); + tM8[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_SECONDARY_SIDES"); + + EOH_INNER = aIconRegister.registerIcon("gregtech:iconsets/EM_INNER_SPACETIME_REINFORCED_EOH_CASING"); + EOH_OUTER = aIconRegister.registerIcon("gregtech:iconsets/EM_OUTER_SPACETIME_REINFORCED_EOH_CASING"); + EOH_INFINITE = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER_INFINITE"); + } + + @Override + public IIcon getIcon(int ordinalSide, int aMeta) { + switch (aMeta) { + case 0: + switch (ordinalSide) { + case 0: + case 1: + return tM0[0]; + default: + return tM0[1]; + } + case 1: + switch (ordinalSide) { + case 0: + case 1: + return tM1[0]; + default: + return tM1[1]; + } + case 2: + switch (ordinalSide) { + case 0: + case 1: + return tM2[0]; + default: + return tM2[1]; + } + case 3: + switch (ordinalSide) { + case 0: + case 1: + return tM3[0]; + default: + return tM3[1]; + } + case 4: + switch (ordinalSide) { + case 0: + case 1: + return tM4[0]; + default: + return tM4[1]; + } + case 5: + switch (ordinalSide) { + case 0: + case 1: + return tM5[0]; + default: + return tM5[1]; + } + case 6: + switch (ordinalSide) { + case 0: + case 1: + return tM6[0]; + default: + return tM6[1]; + } + case 7: + return tM7; + case 8: + switch (ordinalSide) { + case 0: + case 1: + return tM8[0]; + default: + return tM8[1]; + } + case 9: + switch (ordinalSide) { + case 0: + case 1: + return tM9[0]; + default: + return tM9[1]; + } + case 10: + return EOH_INNER; + case 11: + return EOH_OUTER; + case 12: + return EOH_INFINITE; + default: + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int ordinalSide) { + int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + return getIcon(ordinalSide, tMeta); + } + + @Override + public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List<ItemStack> aList) { + for (int i = 0; i <= 12; i++) { + aList.add(new ItemStack(aItem, 1, i)); + } + } +} diff --git a/src/main/java/tectech/thing/casing/BlockGTCasingsNH.java b/src/main/java/tectech/thing/casing/BlockGTCasingsNH.java new file mode 100644 index 0000000000..26c7097391 --- /dev/null +++ b/src/main/java/tectech/thing/casing/BlockGTCasingsNH.java @@ -0,0 +1,59 @@ +package tectech.thing.casing; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import gregtech.api.enums.Textures; +import gregtech.api.objects.GTCopiedBlockTexture; +import gregtech.api.util.GTLanguageManager; +import gregtech.common.blocks.BlockCasingsAbstract; +import gregtech.common.blocks.MaterialCasings; +import tectech.TecTech; +import tectech.thing.CustomItemList; + +/** + * Created by danie_000 on 03.10.2016. + */ +public class BlockGTCasingsNH extends BlockCasingsAbstract { + + public static boolean mConnectedMachineTextures = true; + + public BlockGTCasingsNH() { + super(ItemCasingsNH.class, "gt.blockcasingsNH", MaterialCasings.INSTANCE); + setCreativeTab(TecTech.creativeTabTecTech); + + for (byte b = 0; b < 16; b = (byte) (b + 1)) { + Textures.BlockIcons.casingTexturePages[8][b + 64] = new GTCopiedBlockTexture(this, 6, b); + /* IMPORTANT for block recoloring */ + } + + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "UEV Machine Casing"); // adding + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "UIV Machine Casing"); // adding + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "UMV Machine Casing"); // adding + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "UXV Machine Casing"); // adding + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "MAX Machine Casing"); // adding + + CustomItemList.Casing_UEV.set(new ItemStack(this, 1, 10)); + CustomItemList.Casing_UIV.set(new ItemStack(this, 1, 11)); + CustomItemList.Casing_UMV.set(new ItemStack(this, 1, 12)); + CustomItemList.Casing_UXV.set(new ItemStack(this, 1, 13)); + CustomItemList.Casing_MAXV.set(new ItemStack(this, 1, 14)); + } + + @Override + public void registerBlockIcons(IIconRegister aIconRegister) { + // super.registerBlockIcons(aIconRegister); + } + + @Override + public IIcon getIcon(int ordinalSide, int aMeta) { + if (ordinalSide == 0) { + return tectech.thing.metaTileEntity.Textures.MACHINECASINGS_BOTTOM_TT[aMeta].getIcon(); + } + if (ordinalSide == 1) { + return tectech.thing.metaTileEntity.Textures.MACHINECASINGS_TOP_TT[aMeta].getIcon(); + } + return tectech.thing.metaTileEntity.Textures.MACHINECASINGS_SIDE_TT[aMeta].getIcon(); + } +} diff --git a/src/main/java/tectech/thing/casing/BlockGTCasingsTT.java b/src/main/java/tectech/thing/casing/BlockGTCasingsTT.java new file mode 100644 index 0000000000..33ec58d7da --- /dev/null +++ b/src/main/java/tectech/thing/casing/BlockGTCasingsTT.java @@ -0,0 +1,193 @@ +package tectech.thing.casing; + +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GTCopiedBlockTexture; +import gregtech.api.util.GTLanguageManager; +import gregtech.common.blocks.BlockCasingsAbstract; +import gregtech.common.blocks.MaterialCasings; +import tectech.TecTech; +import tectech.thing.CustomItemList; + +/** + * Created by danie_000 on 03.10.2016. + */ +public class BlockGTCasingsTT extends BlockCasingsAbstract { + + public static final byte texturePage = TecTech.tectechTexturePage1; + public static final short textureOffset = texturePage << 7; // Start of PAGE 8 (which is the 9th page) (8*128) + private static IIcon eM0, eM1, eM1s, eM2, eM2s, eM3, eM3s, eM4, eM5, eM6, eM7, eM7s, eM8, eM9, eM10, eM11, eM12, + eM13, eM14; + private static final IIcon[] debug = new IIcon[6]; + + public BlockGTCasingsTT() { + super(ItemCasingsTT.class, "gt.blockcasingsTT", MaterialCasings.INSTANCE); + setCreativeTab(TecTech.creativeTabTecTech); + + for (byte b = 0; b < 16; b = (byte) (b + 1)) { + Textures.BlockIcons.casingTexturePages[texturePage][b] = new GTCopiedBlockTexture(this, 6, b); + /* IMPORTANT for block recoloring **/ + } + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "High Power Casing"); + + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Computer Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Computer Heat Vent"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Advanced Computer Casing"); + + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Molecular Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Advanced Molecular Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Containment Field Generator"); + + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Molecular Coil"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Hollow Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Spacetime Altering Casing"); + + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Teleportation Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Dimensional Bridge Generator"); + + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Ultimate Molecular Casing"); + GTLanguageManager + .addStringLocalization(getUnlocalizedName() + ".13.name", "Ultimate Advanced Molecular Casing"); + GTLanguageManager + .addStringLocalization(getUnlocalizedName() + ".14.name", "Ultimate Containment Field Generator"); + + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Debug Sides"); // NOT REGISTER AS + // TEXTURE FOR + // HATCHES! + + CustomItemList.eM_Power.set(new ItemStack(this, 1, 0)); + + CustomItemList.eM_Computer_Casing.set(new ItemStack(this, 1, 1)); + CustomItemList.eM_Computer_Vent.set(new ItemStack(this, 1, 2)); + CustomItemList.eM_Computer_Bus.set(new ItemStack(this, 1, 3)); + + CustomItemList.eM_Containment.set(new ItemStack(this, 1, 4)); + CustomItemList.eM_Containment_Advanced.set(new ItemStack(this, 1, 5)); + CustomItemList.eM_Containment_Field.set(new ItemStack(this, 1, 6)); + + CustomItemList.eM_Coil.set(new ItemStack(this, 1, 7)); + CustomItemList.eM_Hollow.set(new ItemStack(this, 1, 8)); + CustomItemList.eM_Spacetime.set(new ItemStack(this, 1, 9)); + + CustomItemList.eM_Teleportation.set(new ItemStack(this, 1, 10)); + CustomItemList.eM_Dimensional.set(new ItemStack(this, 1, 11)); + + CustomItemList.eM_Ultimate_Containment.set(new ItemStack(this, 1, 12)); + CustomItemList.eM_Ultimate_Containment_Advanced.set(new ItemStack(this, 1, 13)); + CustomItemList.eM_Ultimate_Containment_Field.set(new ItemStack(this, 1, 14)); + + CustomItemList.debugBlock.set(new ItemStack(this, 1, 15)); + } + + @Override + public void registerBlockIcons(IIconRegister aIconRegister) { + // super.registerBlockIcons(aIconRegister); + eM0 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + + eM1 = aIconRegister.registerIcon("gregtech:iconsets/EM_PC_NONSIDE"); + eM1s = aIconRegister.registerIcon("gregtech:iconsets/EM_PC"); + eM2 = aIconRegister.registerIcon("gregtech:iconsets/EM_PC_VENT_NONSIDE"); + eM2s = aIconRegister.registerIcon("gregtech:iconsets/EM_PC_VENT"); + eM3 = aIconRegister.registerIcon("gregtech:iconsets/EM_PC_ADV_NONSIDE"); + eM3s = aIconRegister.registerIcon("gregtech:iconsets/EM_PC_ADV"); + + eM4 = aIconRegister.registerIcon("gregtech:iconsets/EM_CASING"); + eM5 = aIconRegister.registerIcon("gregtech:iconsets/EM_FIELD_CASING"); + eM6 = aIconRegister.registerIcon("gregtech:iconsets/EM_FIELD"); + + eM7 = aIconRegister.registerIcon("gregtech:iconsets/EM_COIL_NONSIDE"); + eM7s = aIconRegister.registerIcon("gregtech:iconsets/EM_COIL"); + eM8 = aIconRegister.registerIcon("gregtech:iconsets/EM_HOLLOW"); + eM9 = aIconRegister.registerIcon("gregtech:iconsets/EM_TIMESPACE"); + + eM10 = aIconRegister.registerIcon("gregtech:iconsets/EM_TELE"); + eM11 = aIconRegister.registerIcon("gregtech:iconsets/EM_DIM"); + + eM12 = aIconRegister.registerIcon("gregtech:iconsets/EM_ULTIMATE_CASING"); + eM13 = aIconRegister.registerIcon("gregtech:iconsets/EM_ULTIMATE_FIELD_CASING"); + eM14 = aIconRegister.registerIcon("gregtech:iconsets/EM_ULTIMATE_FIELD"); + + debug[0] = aIconRegister.registerIcon("gregtech:iconsets/DEBUG_0"); + debug[1] = aIconRegister.registerIcon("gregtech:iconsets/DEBUG_1"); + debug[2] = aIconRegister.registerIcon("gregtech:iconsets/DEBUG_2"); + debug[3] = aIconRegister.registerIcon("gregtech:iconsets/DEBUG_3"); + debug[4] = aIconRegister.registerIcon("gregtech:iconsets/DEBUG_4"); + debug[5] = aIconRegister.registerIcon("gregtech:iconsets/DEBUG_5"); + } + + @Override + public IIcon getIcon(int ordinalSide, int aMeta) { + switch (aMeta) { + case 0: + return eM0; + case 1: + if (ordinalSide < 2) { + return eM1; + } + return eM1s; + case 2: + if (ordinalSide < 2) { + return eM2; + } + return eM2s; + case 3: + if (ordinalSide < 2) { + return eM3; + } + return eM3s; + case 4: + return eM4; + case 5: + return eM5; + case 6: + return eM6; + case 7: + if (ordinalSide < 2) { + return eM7; + } + return eM7s; + case 8: + return eM8; + case 9: + return eM9; + case 10: + return eM10; + case 11: + return eM11; + case 12: + return eM12; + case 13: + return eM13; + case 14: + return eM14; + case 15: + return debug[ordinalSide]; + default: + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int ordinalSide) { + int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + return getIcon(ordinalSide, tMeta); + } + + @Override + public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List<ItemStack> aList) { + for (int i = 0; i <= 15; i++) { + aList.add(new ItemStack(aItem, 1, i)); + } + } +} diff --git a/src/main/java/tectech/thing/casing/BlockGodforgeCasings.java b/src/main/java/tectech/thing/casing/BlockGodforgeCasings.java new file mode 100644 index 0000000000..e744cdf9b7 --- /dev/null +++ b/src/main/java/tectech/thing/casing/BlockGodforgeCasings.java @@ -0,0 +1,130 @@ +package tectech.thing.casing; + +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GTCopiedBlockTexture; +import gregtech.api.util.GTLanguageManager; +import gregtech.common.blocks.BlockCasingsAbstract; +import gregtech.common.blocks.MaterialCasings; +import tectech.thing.CustomItemList; + +public class BlockGodforgeCasings extends BlockCasingsAbstract { + + private static IIcon GodforgeTrim; + private static IIcon GodforgeInner; + private static IIcon GodforgeSupport; + private static IIcon GodforgeOuter; + private static IIcon GodforgeEnergy; + private static IIcon GravitonModulatorT1; + private static IIcon GravitonModulatorT2; + private static IIcon GravitonModulatorT3; + private static IIcon PhononConduit; + + private static final byte START_INDEX = 64; + + public BlockGodforgeCasings() { + super(ItemCasingsGodforge.class, "gt.godforgecasing", MaterialCasings.INSTANCE); + for (byte b = 0; b < 16; b = (byte) (b + 1)) { + Textures.BlockIcons.casingTexturePages[7][b + START_INDEX] = new GTCopiedBlockTexture(this, 6, b); + } + + GTLanguageManager + .addStringLocalization(getUnlocalizedName() + ".0.name", "Singularity Reinforced Stellar Shielding Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Celestial Matter Guidance Casing"); + GTLanguageManager.addStringLocalization( + getUnlocalizedName() + ".2.name", + "Boundless Gravitationally Severed Structure Casing"); + GTLanguageManager.addStringLocalization( + getUnlocalizedName() + ".3.name", + "Transcendentally Amplified Magnetic Confinement Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Stellar Energy Siphon Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Remote Graviton Flow Modulator"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Medial Graviton Flow Modulator"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Central Graviton Flow Modulator"); + GTLanguageManager + .addStringLocalization(getUnlocalizedName() + ".8.name", "Harmonic Phonon Transmission Conduit"); + + CustomItemList.Godforge_SingularityShieldingCasing.set(new ItemStack(this, 1, 0)); + CustomItemList.Godforge_GuidanceCasing.set(new ItemStack(this, 1, 1)); + CustomItemList.Godforge_BoundlessStructureCasing.set(new ItemStack(this, 1, 2)); + CustomItemList.Godforge_MagneticConfinementCasing.set(new ItemStack(this, 1, 3)); + CustomItemList.Godforge_StellarEnergySiphonCasing.set(new ItemStack(this, 1, 4)); + CustomItemList.Godforge_GravitonFlowModulatorTier1.set(new ItemStack(this, 1, 5)); + CustomItemList.Godforge_GravitonFlowModulatorTier2.set(new ItemStack(this, 1, 6)); + CustomItemList.Godforge_GravitonFlowModulatorTier3.set(new ItemStack(this, 1, 7)); + CustomItemList.Godforge_HarmonicPhononTransmissionConduit.set(new ItemStack(this, 1, 8)); + } + + @Override + public void registerBlockIcons(IIconRegister aIconRegister) { + GodforgeTrim = aIconRegister.registerIcon("gregtech:iconsets/GODFORGE_TRIM"); + GodforgeInner = aIconRegister.registerIcon("gregtech:iconsets/GODFORGE_INNER"); + GodforgeSupport = aIconRegister.registerIcon("gregtech:iconsets/GODFORGE_SUPPORT"); + GodforgeOuter = aIconRegister.registerIcon("gregtech:iconsets/GRAVITON_TOP_BOTTOM"); + GodforgeEnergy = aIconRegister.registerIcon("gregtech:iconsets/GODFORGE_ENERGY"); + GravitonModulatorT1 = aIconRegister.registerIcon("gregtech:iconsets/GRAVITON_CASING_2"); + GravitonModulatorT2 = aIconRegister.registerIcon("gregtech:iconsets/GRAVITON_CASING_1"); + GravitonModulatorT3 = aIconRegister.registerIcon("gregtech:iconsets/GRAVITON_CASING_0"); + PhononConduit = aIconRegister.registerIcon("gregtech:iconsets/PHONON_CONDUIT"); + } + + @Override + public IIcon getIcon(int aSide, int aMeta) { + switch (aMeta) { + case 0: + return GodforgeTrim; + case 1: + return GodforgeInner; + case 2: + return GodforgeSupport; + case 3: + return GodforgeOuter; + case 4: + return GodforgeEnergy; + case 5: + if (aSide < 2) { + return GodforgeOuter; + } + return GravitonModulatorT1; + case 6: + if (aSide < 2) { + return GodforgeOuter; + } + return GravitonModulatorT2; + case 7: + if (aSide < 2) { + return GodforgeOuter; + } + return GravitonModulatorT3; + case 8: + return PhononConduit; + default: + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide) { + int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + return getIcon(aSide, tMeta); + } + + @SuppressWarnings("unchecked") + @Override + public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { + for (int i = 0; i <= 8; i++) { + aList.add(new ItemStack(aItem, 1, i)); + } + } +} diff --git a/src/main/java/tectech/thing/casing/ItemCasingsBA0.java b/src/main/java/tectech/thing/casing/ItemCasingsBA0.java new file mode 100644 index 0000000000..8d3896d600 --- /dev/null +++ b/src/main/java/tectech/thing/casing/ItemCasingsBA0.java @@ -0,0 +1,110 @@ +package tectech.thing.casing; + +import static gregtech.api.enums.GTValues.V; +import static gregtech.api.util.GTUtility.formatNumbers; +import static net.minecraft.util.EnumChatFormatting.AQUA; +import static net.minecraft.util.EnumChatFormatting.GRAY; +import static net.minecraft.util.StatCollector.translateToLocal; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import gregtech.api.enums.TierEU; +import gregtech.common.blocks.ItemCasingsAbstract; +import tectech.util.CommonValues; + +public class ItemCasingsBA0 extends ItemCasingsAbstract { + + public ItemCasingsBA0(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List<String> aList, boolean aF3_H) { + if (aStack.getItemDamage() < 15) { + aList.add(CommonValues.THETA_MOVEMENT); + } else { + aList.add(CommonValues.COSMIC_MARK); + } + switch (aStack.getItemDamage()) { + case 0: // "Redstone Alloy Primary Tesla Windings" + case 1: // "MV Superconductor Primary Tesla Windings" + case 2: // "HV Superconductor Primary Tesla Windings" + case 3: // "EV Superconductor Primary Tesla Windings" + case 4: // "IV Superconductor Primary Tesla Windings" + case 5: // "LuV Superconductor Primary Tesla Windings" + aList.add( + translateToLocal("gt.blockcasingsBA0.0.desc.0") + " " + + formatNumbers(V[aStack.getItemDamage() + 1]) + + " EU/t"); // Handles up to + aList.add(AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockcasingsBA0.0.desc.1")); // What + // one + // man + // calls + // God, + // another + // calls + // the + // laws of physics. + break; + case 6: // "Tesla Base Casing" + aList.add(translateToLocal("gt.blockcasingsBA0.6.desc.0")); // The base of a wondrous contraption + aList.add(AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockcasingsBA0.6.desc.1")); // it's + // alive, + // IT'S + // ALIVE! + break; + case 7: // "Tesla Toroid Casing" + aList.add(translateToLocal("gt.blockcasingsBA0.7.desc.0")); // Made out of the finest tin foil! + aList.add(AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockcasingsBA0.7.desc.1")); // Faraday + // suits + // might + // come + // later + break; + case 8: // "Tesla Secondary Windings" |
