diff options
| author | Jason Mitchell <mitchej@gmail.com> | 2023-01-28 19:32:44 -0800 |
|---|---|---|
| committer | Jason Mitchell <mitchej@gmail.com> | 2023-01-28 19:32:44 -0800 |
| commit | 55f64675b42ac8d3c557cc850f78664bee006f6f (patch) | |
| tree | 2afd26dd3d5e6f763119bc192b57c66a1a075922 /src/main/java/gtPlusPlus/xmod/gregtech/common/blocks | |
| parent | 0f5dfd01b877b6a1019e0671b88d07974aae68c0 (diff) | |
| download | GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.tar.gz GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.tar.bz2 GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.zip | |
[ci skip] spotlessApply with the new settings
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common/blocks')
28 files changed, 944 insertions, 1110 deletions
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<IGregTechTileEntity> mTemporaryTileEntity = new ThreadLocal<IGregTechTileEntity>(); 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<ItemStack> 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 greg |
