From 55f64675b42ac8d3c557cc850f78664bee006f6f Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Sat, 28 Jan 2023 19:32:44 -0800 Subject: [ci skip] spotlessApply with the new settings --- .../common/blocks/GTPP_Block_Machines.java | 119 ++-- .../gregtech/common/blocks/GTPP_Item_Machines.java | 211 +++---- .../common/blocks/GregtechMetaCasingBlocks.java | 26 +- .../common/blocks/GregtechMetaCasingBlocks2.java | 25 +- .../common/blocks/GregtechMetaCasingBlocks3.java | 74 +-- .../common/blocks/GregtechMetaCasingBlocks4.java | 21 +- .../common/blocks/GregtechMetaCasingBlocks5.java | 47 +- .../blocks/GregtechMetaCasingBlocksAbstract.java | 31 +- .../GregtechMetaCasingBlocksPipeGearbox.java | 12 +- .../common/blocks/GregtechMetaCasingItems.java | 1 + .../common/blocks/GregtechMetaItemCasings1.java | 6 +- .../blocks/GregtechMetaItemCasingsAbstract.java | 32 +- .../blocks/GregtechMetaSpecialMachineCasings.java | 24 +- .../blocks/GregtechMetaSpecialMultiCasings.java | 50 +- .../blocks/GregtechMetaSpecialMultiCasings2.java | 18 +- .../blocks/GregtechMetaTieredCasingBlocks1.java | 12 +- .../common/blocks/fluid/GregtechFluidHandler.java | 50 +- .../blocks/textures/CasingTextureHandler.java | 51 +- .../blocks/textures/CasingTextureHandler2.java | 3 +- .../blocks/textures/CasingTextureHandler3.java | 3 +- .../textures/TexturesCentrifugeMultiblock.java | 70 +-- .../common/blocks/textures/TexturesGregtech58.java | 113 ++-- .../common/blocks/textures/TexturesGregtech59.java | 149 ++--- .../blocks/textures/TexturesGrinderMultiblock.java | 58 +- .../common/blocks/textures/TexturesGtBlock.java | 654 ++++++++++----------- .../blocks/textures/TexturesGtCutomCovers.java | 15 +- .../common/blocks/textures/TexturesGtTools.java | 8 +- .../turbine/LargeTurbineTextureHandler.java | 171 ++---- 28 files changed, 944 insertions(+), 1110 deletions(-) (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common/blocks') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java index 83cbc0065c..a408663ee0 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java @@ -1,24 +1,8 @@ package gtPlusPlus.xmod.gregtech.common.blocks; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.interfaces.IDebugableBlock; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_Generic_Block; -import gregtech.api.metatileentity.BaseMetaPipeEntity; -import gregtech.api.metatileentity.BaseMetaTileEntity; -import gregtech.api.metatileentity.BaseTileEntity; -import gregtech.api.util.GT_Utility; -import gregtech.common.blocks.GT_Material_Machines; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.random.XSTR; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import gtPlusPlus.xmod.gregtech.common.render.GTPP_Render_MachineBlock; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.client.renderer.texture.IIconRegister; @@ -41,7 +25,26 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.interfaces.IDebugableBlock; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_Generic_Block; +import gregtech.api.metatileentity.BaseMetaPipeEntity; +import gregtech.api.metatileentity.BaseMetaTileEntity; +import gregtech.api.metatileentity.BaseTileEntity; +import gregtech.api.util.GT_Utility; +import gregtech.common.blocks.GT_Material_Machines; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.random.XSTR; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import gtPlusPlus.xmod.gregtech.common.render.GTPP_Render_MachineBlock; + public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableBlock, ITileEntityProvider { + public static ThreadLocal mTemporaryTileEntity = new ThreadLocal(); public GTPP_Block_Machines() { @@ -104,8 +107,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB } public String getLocalizedName() { - String aName = StatCollector.translateToLocal(this.getUnlocalizedName() + ".name"); - ; + String aName = StatCollector.translateToLocal(this.getUnlocalizedName() + ".name");; if (aName.toLowerCase().contains(".name")) { aName = StatCollector.translateToLocal(getUnlocalizedName() + ".name"); } @@ -128,8 +130,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB } public int getRenderType() { - return GTPP_Render_MachineBlock.INSTANCE == null - ? super.getRenderType() + return GTPP_Render_MachineBlock.INSTANCE == null ? super.getRenderType() : GTPP_Render_MachineBlock.INSTANCE.mRenderID; } @@ -195,8 +196,8 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB return tTileEntity != null ? tTileEntity.receiveClientEvent(aData1, aData2) : false; } - public void addCollisionBoxesToList( - World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB, Entity collider) { + public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB, + Entity collider) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { @@ -210,18 +211,18 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); return tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null - ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) - : super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null + ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) + : super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); } @SideOnly(Side.CLIENT) public AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); return tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null - ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) - : super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ); + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null + ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) + : super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ); } public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int aX, int aY, int aZ) { @@ -264,15 +265,13 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof BaseMetaTileEntity - && ((BaseMetaTileEntity) tTileEntity).privateAccess() - && !((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true) - ? -1.0F - : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); + return tTileEntity instanceof BaseMetaTileEntity && ((BaseMetaTileEntity) tTileEntity).privateAccess() + && !((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true) ? -1.0F + : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); } - public boolean onBlockActivated( - World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float par1, float par2, float par3) { + public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float par1, + float par2, float par3) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity == null) { return false; @@ -289,13 +288,11 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB } } - return tTileEntity instanceof IGregTechTileEntity - ? (((IGregTechTileEntity) tTileEntity).getTimer() < 50L - ? false - : (!aWorld.isRemote && !((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer) - ? true - : ((IGregTechTileEntity) tTileEntity) - .onRightclick(aPlayer, (byte) aSide, par1, par2, par3))) + return tTileEntity instanceof IGregTechTileEntity ? (((IGregTechTileEntity) tTileEntity).getTimer() < 50L + ? false + : (!aWorld.isRemote && !((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer) ? true + : ((IGregTechTileEntity) tTileEntity) + .onRightclick(aPlayer, (byte) aSide, par1, par2, par3))) : false; } } @@ -339,8 +336,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB (double) ((float) aZ + tRandom.nextFloat() * 0.8F + 0.1F), new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); if (tItem.hasTagCompound()) { - tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) - tItem.getTagCompound().copy()); + tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) tItem.getTagCompound().copy()); } tItemEntity.motionX = tRandom.nextGaussian() * 0.0500000007450581D; @@ -359,10 +355,8 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB public ArrayList getDrops(World aWorld, int aX, int aY, int aZ, int aMeta, int aFortune) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity - ? ((IGregTechTileEntity) tTileEntity).getDrops() - : (mTemporaryTileEntity.get() == null - ? new ArrayList() + return tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getDrops() + : (mTemporaryTileEntity.get() == null ? new ArrayList() : ((IGregTechTileEntity) mTemporaryTileEntity.get()).getDrops()); } @@ -436,10 +430,8 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB public int getLightOpacity(IBlockAccess aWorld, int aX, int aY, int aZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity == null - ? 0 - : (tTileEntity instanceof IGregTechTileEntity - ? ((IGregTechTileEntity) tTileEntity).getLightOpacity() + return tTileEntity == null ? 0 + : (tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getLightOpacity() : (aWorld.getBlockMetadata(aX, aY, aZ) == 0 ? 255 : 0)); } @@ -449,21 +441,12 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB } public TileEntity createTileEntity(World aWorld, int aMeta) { - return (TileEntity) - (aMeta >= 4 - ? Meta_GT_Proxy.constructBaseMetaTileEntity() - : Meta_GT_Proxy.constructBaseMetaTileEntityCustomPower()); - } - - public float getExplosionResistance( - Entity par1Entity, - World aWorld, - int aX, - int aY, - int aZ, - double explosionX, - double explosionY, - double explosionZ) { + return (TileEntity) (aMeta >= 4 ? Meta_GT_Proxy.constructBaseMetaTileEntity() + : Meta_GT_Proxy.constructBaseMetaTileEntityCustomPower()); + } + + public float getExplosionResistance(Entity par1Entity, World aWorld, int aX, int aY, int aZ, double explosionX, + double explosionY, double explosionZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); return tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getBlastResistance((byte) 6) diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java index 9e732d2443..0a4c5bd4a4 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java @@ -1,14 +1,7 @@ package gtPlusPlus.xmod.gregtech.common.blocks; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_ItsNotMyFaultException; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; @@ -17,7 +10,17 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_ItsNotMyFaultException; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; + public class GTPP_Item_Machines extends ItemBlock { + public GTPP_Item_Machines(Block par1) { super(par1); this.setMaxDamage(0); @@ -40,33 +43,12 @@ public class GTPP_Item_Machines extends ItemBlock { final long tVoltage = aNBT.getInputVoltage(); byte tTier = (byte) ((byte) Math.max(1, GT_Utility.getTier(tVoltage))); - /*if (aNBT.getDescription() != null) { - int tAmount = 0; - String[] arg7 = aNBT.getDescription(); - int arg8 = arg7.length-1; - - if (arg7 != null && arg7.length > 0) { - for (String t : arg7) { - aList.add(t); - } - - } - else { - aList.add("ERROR"); - } - - for (int y = 0; y < arg8; y++) { - String tDescription = arg7[y]; - - if (tDescription != null) { - aList.add(tDescription+"|"+arg8); - continue; - } - else { - continue; - } - } - }*/ + /* + * if (aNBT.getDescription() != null) { int tAmount = 0; String[] arg7 = aNBT.getDescription(); int arg8 + * = arg7.length-1; if (arg7 != null && arg7.length > 0) { for (String t : arg7) { aList.add(t); } } + * else { aList.add("ERROR"); } for (int y = 0; y < arg8; y++) { String tDescription = arg7[y]; if + * (tDescription != null) { aList.add(tDescription+"|"+arg8); continue; } else { continue; } } } + */ if (aNBT.getEUCapacity() > 0L) { @@ -76,26 +58,37 @@ public class GTPP_Item_Machines extends ItemBlock { if ((e - 30400) <= 10) { tTier -= 2; aList.add(EnumChatFormatting.BOLD + "16" + " Fuse Slots" + EnumChatFormatting.GRAY); - aList.add("Per each fuse, you may insert " + EnumChatFormatting.YELLOW - + (GT_Values.V[tTier]) + EnumChatFormatting.GRAY + " EU/t"); - aList.add("However this " + EnumChatFormatting.ITALIC + EnumChatFormatting.RED + "MUST" - + EnumChatFormatting.GRAY + " be in a single Amp"); - aList.add("This machine can accept upto a single amp of " - + GT_Values.VN[Math.min(tTier + 2, 12)] + " as a result"); - aList.add(GT_LanguageManager.addStringLocalization( + aList.add( + "Per each fuse, you may insert " + EnumChatFormatting.YELLOW + + (GT_Values.V[tTier]) + + EnumChatFormatting.GRAY + + " EU/t"); + aList.add( + "However this " + EnumChatFormatting.ITALIC + + EnumChatFormatting.RED + + "MUST" + + EnumChatFormatting.GRAY + + " be in a single Amp"); + aList.add( + "This machine can accept upto a single amp of " + + GT_Values.VN[Math.min(tTier + 2, 12)] + + " as a result"); + aList.add( + GT_LanguageManager.addStringLocalization( "TileEntity_Breaker_Loss", - "Breaker Loss: " + EnumChatFormatting.RED + "" + "Breaker Loss: " + EnumChatFormatting.RED + + "" + (GT_Values.V[Math.max(tTier - 1, 0)] / 10) - + EnumChatFormatting.GRAY + " EU/t", - !GregTech_API.sPostloadFinished) - + EnumChatFormatting.GRAY); + + EnumChatFormatting.GRAY + + " EU/t", + !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); } - aList.add(GT_LanguageManager.addStringLocalization( + aList.add( + GT_LanguageManager.addStringLocalization( "TileEntity_Special_Power_1", EnumChatFormatting.RED + "Special Power Handling, please read manual", - !GregTech_API.sPostloadFinished) - + EnumChatFormatting.GRAY); + !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); // aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_2", // EnumChatFormatting.RED+"Special Power Handling, please read manual", // !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); @@ -107,66 +100,93 @@ public class GTPP_Item_Machines extends ItemBlock { if (aNBT.getInputVoltage() > 0L) { String inA = "0"; if (aNBT.getInputAmperage() >= 1L) { - inA = " at " + EnumChatFormatting.YELLOW + aNBT.getInputAmperage() + EnumChatFormatting.GRAY + inA = " at " + EnumChatFormatting.YELLOW + + aNBT.getInputAmperage() + + EnumChatFormatting.GRAY + " Amps"; } else { - inA = " at " + EnumChatFormatting.WHITE + aNBT.getInputAmperage() + EnumChatFormatting.GRAY + inA = " at " + EnumChatFormatting.WHITE + + aNBT.getInputAmperage() + + EnumChatFormatting.GRAY + " Amps"; } - String a1 = "Voltage IN: " + EnumChatFormatting.GREEN + aNBT.getInputVoltage() - + " (" + GT_Values.VN[GT_Utility.getTier(aNBT.getInputVoltage())] + ")" - + EnumChatFormatting.GRAY + inA; + String a1 = "Voltage IN: " + EnumChatFormatting.GREEN + + aNBT.getInputVoltage() + + " (" + + GT_Values.VN[GT_Utility.getTier(aNBT.getInputVoltage())] + + ")" + + EnumChatFormatting.GRAY + + inA; aList.add(a1); } if (aNBT.getOutputVoltage() > 0L) { String outA = "0"; if (aNBT.getOutputAmperage() >= 1L) { - outA = " at " + EnumChatFormatting.YELLOW + aNBT.getOutputAmperage() - + EnumChatFormatting.GRAY + " Amps"; + outA = " at " + EnumChatFormatting.YELLOW + + aNBT.getOutputAmperage() + + EnumChatFormatting.GRAY + + " Amps"; } else { - outA = " at " + EnumChatFormatting.WHITE + aNBT.getOutputAmperage() - + EnumChatFormatting.GRAY + " Amps"; + outA = " at " + EnumChatFormatting.WHITE + + aNBT.getOutputAmperage() + + EnumChatFormatting.GRAY + + " Amps"; } - String a1 = "Voltage OUT: " + EnumChatFormatting.GREEN + aNBT.getOutputVoltage() - + " (" + GT_Values.VN[GT_Utility.getTier(aNBT.getOutputVoltage())] + ")" - + EnumChatFormatting.GRAY + outA; + String a1 = "Voltage OUT: " + EnumChatFormatting.GREEN + + aNBT.getOutputVoltage() + + " (" + + GT_Values.VN[GT_Utility.getTier(aNBT.getOutputVoltage())] + + ")" + + EnumChatFormatting.GRAY + + outA; aList.add(a1); } - aList.add(GT_LanguageManager.addStringLocalization( + aList.add( + GT_LanguageManager.addStringLocalization( "TileEntity_Lossess_EU", "Transmission Loss: " + EnumChatFormatting.DARK_BLUE + "0", - !GregTech_API.sPostloadFinished) - + EnumChatFormatting.GRAY); - - aList.add(GT_LanguageManager.addStringLocalization( - "TileEntity_EUp_STORE2", "Internal Capacity: ", !GregTech_API.sPostloadFinished) - + EnumChatFormatting.BLUE + aNBT.getEUCapacity() - + EnumChatFormatting.GRAY + " EU"); + !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); + + aList.add( + GT_LanguageManager.addStringLocalization( + "TileEntity_EUp_STORE2", + "Internal Capacity: ", + !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE + + aNBT.getEUCapacity() + + EnumChatFormatting.GRAY + + " EU"); } } NBTTagCompound arg16 = aStack.getTagCompound(); if (arg16 != null) { if (arg16.getBoolean("mMuffler")) { - aList.add(GT_LanguageManager.addStringLocalization( - "GT_TileEntity_MUFFLER", "has Muffler Upgrade", !GregTech_API.sPostloadFinished)); + aList.add( + GT_LanguageManager.addStringLocalization( + "GT_TileEntity_MUFFLER", + "has Muffler Upgrade", + !GregTech_API.sPostloadFinished)); } if (arg16.getBoolean("mSteamConverter")) { - aList.add(GT_LanguageManager.addStringLocalization( - "GT_TileEntity_STEAMCONVERTER", "has Steam Upgrade", !GregTech_API.sPostloadFinished)); + aList.add( + GT_LanguageManager.addStringLocalization( + "GT_TileEntity_STEAMCONVERTER", + "has Steam Upgrade", + !GregTech_API.sPostloadFinished)); } boolean arg17 = false; byte arg18; if ((arg18 = arg16.getByte("mSteamTanks")) > 0) { - aList.add(arg18 + " " - + GT_LanguageManager.addStringLocalization( - "GT_TileEntity_STEAMTANKS", - "Steam Tank Upgrades", - !GregTech_API.sPostloadFinished)); + aList.add( + arg18 + " " + + GT_LanguageManager.addStringLocalization( + "GT_TileEntity_STEAMTANKS", + "Steam Tank Upgrades", + !GregTech_API.sPostloadFinished)); } } @@ -177,17 +197,8 @@ public class GTPP_Item_Machines extends ItemBlock { } } - public boolean onItemUseFirst( - ItemStack stack, - EntityPlayer player, - World world, - int x, - int y, - int z, - int side, - float hitX, - float hitY, - float hitZ) { + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, + float hitX, float hitY, float hitZ) { return false; } @@ -209,18 +220,8 @@ public class GTPP_Item_Machines extends ItemBlock { } } - public boolean placeBlockAt( - ItemStack aStack, - EntityPlayer aPlayer, - World aWorld, - int aX, - int aY, - int aZ, - int side, - float hitX, - float hitY, - float hitZ, - int aMeta) { + public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, + float hitX, float hitY, float hitZ, int aMeta) { short tDamage = (short) ((short) this.getDamage(aStack) + 30400); // Add Offset; if (tDamage > 0) { if (GregTech_API.METATILEENTITIES[tDamage] == null) { @@ -229,8 +230,12 @@ public class GTPP_Item_Machines extends ItemBlock { byte tMetaData = 32; // byte tMetaData = GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType(); - Logger.INFO("Using Meta: " + tMetaData + " for ID " + tDamage + " | " - + GregTech_API.METATILEENTITIES[tDamage].getInventoryName()); + Logger.INFO( + "Using Meta: " + tMetaData + + " for ID " + + tDamage + + " | " + + GregTech_API.METATILEENTITIES[tDamage].getInventoryName()); if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, tMetaData, 3)) { return false; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java index 026d3d471f..533676f75b 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java @@ -1,5 +1,9 @@ package gtPlusPlus.xmod.gregtech.common.blocks; +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.TAE; @@ -8,9 +12,6 @@ import gregtech.common.blocks.GT_Material_Casings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; public class GregtechMetaCasingBlocks extends GregtechMetaCasingBlocksAbstract { @@ -26,12 +27,11 @@ public class GregtechMetaCasingBlocks extends GregtechMetaCasingBlocksAbstract { } GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Centrifuge Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Structural Coke Oven Casing"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".2.name", "Heat Resistant Coke Oven Casing"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".3.name", "Heat Proof Coke Oven Casing"); // 60 - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".4.name", "Material Press Machine Casing"); + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + ".2.name", "Heat Resistant Coke Oven Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Heat Proof Coke Oven Casing"); // 60 + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + ".4.name", "Material Press Machine Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Electrolyzer Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Wire Factory Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Maceration Stack Casing"); @@ -41,8 +41,8 @@ public class GregtechMetaCasingBlocks extends GregtechMetaCasingBlocksAbstract { GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Multitank Exterior Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Hastelloy-N Reactor Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Zeron-100 Reactor Shielding"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".14.name", "Blast Smelter Heat Containment Coil "); + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + ".14.name", "Blast Smelter Heat Containment Coil "); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Blast Smelter Casing Block"); GregtechItemList.Casing_Centrifuge1.set(new ItemStack(this, 1, 0)); GregtechItemList.Casing_CokeOven.set(new ItemStack(this, 1, 1)); @@ -69,8 +69,8 @@ public class GregtechMetaCasingBlocks extends GregtechMetaCasingBlocksAbstract { @Override @SideOnly(Side.CLIENT) - public IIcon getIcon( - final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { + public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, + final int aSide) { final GregtechMetaCasingBlocks i = this; return CasingTextureHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java index 3c55d2fa95..320fefb583 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java @@ -1,5 +1,12 @@ package gtPlusPlus.xmod.gregtech.common.blocks; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + import gregtech.api.enums.TAE; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; @@ -8,11 +15,6 @@ import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler2; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; -import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; public class GregtechMetaCasingBlocks2 extends GregtechMetaCasingBlocksAbstract { @@ -47,13 +49,13 @@ public class GregtechMetaCasingBlocks2 extends GregtechMetaCasingBlocksAbstract GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Thermal Processing Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Hastelloy-N Sealant Block"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Hastelloy-X Structural Block"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".3.name", "Incoloy-DS Fluid Containment Block"); + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + ".3.name", "Incoloy-DS Fluid Containment Block"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Wash Plant Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Industrial Sieve Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Large Sieve Grate"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (EV)"); + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (EV)"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Sub-Station External Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Cyclotron Coil"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Cyclotron Outer Casing"); @@ -61,8 +63,9 @@ public class GregtechMetaCasingBlocks2 extends GregtechMetaCasingBlocksAbstract GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Bulk Production Frame"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Cutting Factory Frame"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".15.name", "Sterile Farm Casing"); // Tree Farmer Textures + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Sterile Farm Casing"); // Tree + // Farmer + // Textures GregtechItemList.Casing_ThermalCentrifuge.set(new ItemStack(this, 1, 0)); GregtechItemList.Casing_Refinery_External.set(new ItemStack(this, 1, 1)); GregtechItemList.Casing_Refinery_Structural.set(new ItemStack(this, 1, 2)); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java index 59bcfa5347..de7e6aa953 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java @@ -1,5 +1,13 @@ package gtPlusPlus.xmod.gregtech.common.blocks; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +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.TAE; @@ -11,12 +19,6 @@ import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler3; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; -import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract { @@ -54,25 +56,26 @@ public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Inconel Reinforced Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Multi-Use Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Trinium Plated Casing"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".4.name", "Vanadium Redox Power Cell (IV)"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".5.name", "Vanadium Redox Power Cell (LuV)"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".6.name", "Vanadium Redox Power Cell (ZPM)"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (UV)"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".8.name", "Vanadium Redox Power Cell (MAX)"); + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + ".4.name", "Vanadium Redox Power Cell (IV)"); + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + ".5.name", "Vanadium Redox Power Cell (LuV)"); + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + ".6.name", "Vanadium Redox Power Cell (ZPM)"); + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (UV)"); + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + ".8.name", "Vanadium Redox Power Cell (MAX)"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Supply Depot Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Advanced Cryogenic Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Volcanus Casing"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".12.name", "Fusion Machine Casing MK III"); + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + ".12.name", "Fusion Machine Casing MK III"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Advanced Fusion Coil"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".14.name", - "Unnamed"); // Can Use, don't change texture (Used for Fusion MK4) + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Unnamed"); // Can Use, don't + // change texture + // (Used for Fusion + // MK4) GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Containment Casing"); GregtechItemList.Casing_FishPond.set(new ItemStack(this, 1, 0)); GregtechItemList.Casing_Extruder.set(new ItemStack(this, 1, 1)); @@ -98,8 +101,8 @@ public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract @SideOnly(Side.CLIENT) @Override - public IIcon getIcon( - final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { + public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, + final int aSide) { final Block thisBlock = aWorld.getBlock(xCoord, yCoord, zCoord); final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); if ((tMeta != 12) || !GregtechMetaCasingBlocks3.mConnectedMachineTextures) { @@ -108,19 +111,18 @@ public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract final int tStartIndex = 0; if (tMeta == 12) { final boolean[] tConnectedSides = { - aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock - && aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta, - aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock - && aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta, - aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock - && aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta, - aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock - && aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta, - aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock - && aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta, - aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock - && aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta - }; + aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock + && aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta, + aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock + && aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta, + aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock + && aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta, + aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock + && aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta, + aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock + && aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta, + aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock + && aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta }; switch (aSide) { case 0: { if (tConnectedSides[0]) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java index 8256f1aa64..b637bd2113 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java @@ -1,5 +1,8 @@ package gtPlusPlus.xmod.gregtech.common.blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + import gregtech.api.enums.TAE; import gregtech.api.enums.Textures; import gregtech.api.util.GT_LanguageManager; @@ -7,8 +10,6 @@ import gregtech.common.blocks.GT_Material_Casings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; public class GregtechMetaCasingBlocks4 extends GregtechMetaCasingBlocksAbstract { @@ -24,8 +25,8 @@ public class GregtechMetaCasingBlocks4 extends GregtechMetaCasingBlocksAbstract GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Reactor Piping"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Naquadah Containment Chamber"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Tempered Arc Furnace Casing"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".4.name", "Quantum Force Transformer Coil Casings"); // Unused + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + ".4.name", "Quantum Force Transformer Coil Casings"); // Unused GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", ""); // Unused GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", ""); // Unused GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); // Unused @@ -48,12 +49,12 @@ public class GregtechMetaCasingBlocks4 extends GregtechMetaCasingBlocksAbstract // private static final LargeTurbineTextureHandler mTurbineTextures = new LargeTurbineTextureHandler(); - /*@Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { - final GregtechMetaCasingBlocks4 i = this; - return mTurbineTextures.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); - }*/ + /* + * @Override + * @SideOnly(Side.CLIENT) public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final + * int zCoord, final int aSide) { final GregtechMetaCasingBlocks4 i = this; return + * mTurbineTextures.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); } + */ @Override public IIcon getIcon(final int aSide, final int aMeta) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java index 68d8349ef3..700e14c711 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java @@ -1,5 +1,9 @@ package gtPlusPlus.xmod.gregtech.common.blocks; +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.TAE; @@ -10,9 +14,6 @@ import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGrinderMultiblock; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; public class GregtechMetaCasingBlocks5 extends GregtechMetaCasingBlocksAbstract { @@ -23,34 +24,34 @@ public class GregtechMetaCasingBlocks5 extends GregtechMetaCasingBlocksAbstract public GregtechMetaCasingBlocks5() { super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.5", GT_Material_Casings.INSTANCE); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".0.name", "IsaMill Exterior Casing"); // IsaMill Casing + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "IsaMill Exterior Casing"); // IsaMill + // Casing TAE.registerTexture(0, 2, new GTPP_CopiedBlockTexture(this, 6, 0)); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".1.name", "IsaMill Piping"); // IsaMill Pipe - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".2.name", "IsaMill Gearbox"); // IsaMill Gearbox - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".3.name", "Elemental Confinement Shell"); // Duplicator Casing + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "IsaMill Piping"); // IsaMill + // Pipe + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "IsaMill Gearbox"); // IsaMill + // Gearbox + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Elemental Confinement Shell"); // Duplicator + // Casing TAE.registerTexture(0, 3, new GTPP_CopiedBlockTexture(this, 6, 3)); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".4.name", "Sparge Tower Exterior Casing"); // Sparge Tower Casing + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Sparge Tower Exterior Casing"); // Sparge + // Tower + // Casing TAE.registerTexture(0, 4, new GTPP_CopiedBlockTexture(this, 6, 4)); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".5.name", "Sturdy Printer Casing"); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Sturdy Printer Casing"); // Unused TAE.registerTexture(1, 10, new GTPP_CopiedBlockTexture(this, 6, 5)); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".6.name", "Forge Casing"); // Forge Hammer Casing + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Forge Casing"); // Forge Hammer + // Casing TAE.registerTexture(1, 11, new GTPP_CopiedBlockTexture(this, 6, 6)); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Neutron Pulse Manipulator"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Cosmic Fabric Manipulator"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Infinity Infused Manipulator"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "SpaceTime Continuum Ripper"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Neutron Shielding Core"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".12.name", "Cosmic Fabric Shielding Core"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".13.name", "Infinity Infused Shielding Core"); + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + ".12.name", "Cosmic Fabric Shielding Core"); + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + ".13.name", "Infinity Infused Shielding Core"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "SpaceTime Bending Core"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Force Field Glass"); @@ -134,8 +135,8 @@ public class GregtechMetaCasingBlocks5 extends GregtechMetaCasingBlocksAbstract @Override @SideOnly(Side.CLIENT) - public IIcon getIcon( - final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { + public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, + final int aSide) { final GregtechMetaCasingBlocks5 i = this; return mGrinderOverlayHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java index 683159de98..2d4973aa9f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java @@ -1,13 +1,8 @@ package gtPlusPlus.xmod.gregtech.common.blocks; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.blocks.GT_Block_Casings_Abstract; -import gtPlusPlus.core.creative.AddToCreativeTab; import java.util.List; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -22,15 +17,23 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Block_Casings_Abstract; +import gtPlusPlus.core.creative.AddToCreativeTab; + public abstract class GregtechMetaCasingBlocksAbstract extends GT_Block_Casings_Abstract { - public GregtechMetaCasingBlocksAbstract( - final Class aItemClass, final String aName, final Material aMaterial) { + + public GregtechMetaCasingBlocksAbstract(final Class aItemClass, final String aName, + final Material aMaterial) { super(aItemClass, aName, aMaterial); this.setStepSound(soundTypeMetal); this.setCreativeTab(AddToCreativeTab.tabMachines); GregTech_API.registerMachineBlock(this, -1); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + "." + 32767 + ".name", "Any Sub Block of this"); + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + "." + 32767 + ".name", "Any Sub Block of this"); } @Override @@ -101,16 +104,16 @@ public abstract class GregtechMetaCasingBlocksAbstract extends GT_Block_Casings_ } @Override - public void breakBlock( - final World aWorld, final int aX, final int aY, final int aZ, final Block aBlock, final int aMetaData) { + public void breakBlock(final World aWorld, final int aX, final int aY, final int aZ, final Block aBlock, + final int aMetaData) { if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); } } @Override - public boolean canCreatureSpawn( - final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, + final int z) { return false; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java index 22c1d87b4e..90fff051eb 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java @@ -1,5 +1,10 @@ package gtPlusPlus.xmod.gregtech.common.blocks; +import java.util.HashMap; + +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; @@ -7,9 +12,6 @@ import gregtech.api.util.GT_LanguageManager; import gregtech.common.blocks.GT_Material_Casings; import gtPlusPlus.core.material.ALLOY; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import java.util.HashMap; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; public class GregtechMetaCasingBlocksPipeGearbox extends GregtechMetaCasingBlocksAbstract { @@ -19,8 +21,8 @@ public class GregtechMetaCasingBlocksPipeGearbox extends GregtechMetaCasingBlock super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.pipesgears", GT_Material_Casings.INSTANCE); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Eglin Steel Gear Box Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Inconel-792 Gear Box Casing"); - GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName() + ".2.name", "Incoloy MA956 Gear Box Casing"); + GT_LanguageManager + .addStringLocalization(this.getUnlocalizedName() + ".2.name", "Incoloy MA956 Gear Box Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Nitinol-60 Gear Box Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Zeron-100 Gear Box Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Pikyonium Gear Box Casing"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java index 9927060164..f86c6af265 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java @@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.common.blocks; import net.minecraft.block.Block; public class GregtechMetaCasingItems extends GregtechMetaItemCasingsAbstract { + public GregtechMetaCasingItems(final Block par1) { super(par1); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java index ba4929c011..13d58aac5f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java @@ -1,18 +1,20 @@ package gtPlusPlus.xmod.gregtech.common.blocks; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; public class GregtechMetaItemCasings1 extends GregtechMetaItemCasingsAbstract { + public GregtechMetaItemCasings1(final Block par1) { super(par1); } @Override - public void addInformation( - final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { + public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, + final boolean aF3_H) { super.addInformation(aStack, aPlayer, aList, aF3_H); switch (this.getDamage(aStack)) { case 0: diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java index d9102f0994..d6ebda4199 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java @@ -1,26 +1,28 @@ package gtPlusPlus.xmod.gregtech.common.blocks; -import gregtech.api.util.GT_LanguageManager; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import gregtech.api.util.GT_LanguageManager; + public abstract class GregtechMetaItemCasingsAbstract extends ItemBlock { - protected final String mCasing_Centrifuge = GT_LanguageManager.addStr