diff --git a/src/main/java/tconstruct/blocks/LiquidMetalFinite.java b/src/main/java/tconstruct/blocks/LiquidMetalFinite.java index 6a6e4b6e..ab1bc4cb 100644 --- a/src/main/java/tconstruct/blocks/LiquidMetalFinite.java +++ b/src/main/java/tconstruct/blocks/LiquidMetalFinite.java @@ -9,10 +9,9 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidFinite; import net.minecraftforge.fluids.Fluid; +import tconstruct.common.TContent; import tconstruct.common.TRepo; import tconstruct.library.TConstructRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class LiquidMetalFinite extends BlockFluidFinite { @@ -41,7 +40,6 @@ public class LiquidMetalFinite extends BlockFluidFinite } @Override - @SideOnly(Side.CLIENT) public IIcon getIcon (int side, int meta) { if (side == 0 || side == 1) @@ -63,4 +61,4 @@ public class LiquidMetalFinite extends BlockFluidFinite entity.setFire(15); } } -} +} \ No newline at end of file diff --git a/src/main/java/tconstruct/blocks/component/SmelteryScan.java b/src/main/java/tconstruct/blocks/component/SmelteryScan.java index 4e5a7ca8..2a0e6f62 100644 --- a/src/main/java/tconstruct/blocks/component/SmelteryScan.java +++ b/src/main/java/tconstruct/blocks/component/SmelteryScan.java @@ -129,7 +129,7 @@ public class SmelteryScan extends TankLayerScan { super.readNetworkNBT(tags); - NBTTagList tanks = tags.getTagList("Tanks", 9); + NBTTagList tanks = tags.getTagList("Tanks", 10); if (tanks != null) { lavaTanks.clear(); diff --git a/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java b/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java index b9e8457b..e7928fb5 100644 --- a/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java +++ b/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java @@ -1104,7 +1104,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci meltingTemps = tags.getIntArray("MeltingTemps"); activeTemps = tags.getIntArray("ActiveTemps"); - NBTTagList liquidTag = tags.getTagList("Liquids", 9); + NBTTagList liquidTag = tags.getTagList("Liquids", 10); moltenMetal.clear(); for (int iter = 0; iter < liquidTag.tagCount(); iter++) diff --git a/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java b/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java index b705bb9f..6d5eba72 100644 --- a/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java +++ b/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java @@ -71,7 +71,7 @@ public class TileEntityLandmine extends TileEntity implements IInventory public void readFromNBT (NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); - NBTTagList nbttaglist = par1NBTTagCompound.getTagList("Items", 9); + NBTTagList nbttaglist = par1NBTTagCompound.getTagList("Items", 10); this.inventory = new ItemStack[this.getSizeInventory()]; for (int i = 0; i < nbttaglist.tagCount(); ++i) diff --git a/src/main/java/tconstruct/entity/CartEntity.java b/src/main/java/tconstruct/entity/CartEntity.java index 65c356b5..c6b04377 100644 --- a/src/main/java/tconstruct/entity/CartEntity.java +++ b/src/main/java/tconstruct/entity/CartEntity.java @@ -698,7 +698,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS if (getSizeInventory() > 0) { - NBTTagList var2 = par1NBTTagCompound.getTagList("Items", 9); + NBTTagList var2 = par1NBTTagCompound.getTagList("Items", 10); this.cargoItems = new ItemStack[this.getSizeInventory()]; for (int var3 = 0; var3 < var2.tagCount(); ++var3) diff --git a/src/main/java/tconstruct/library/client/FluidRenderProperties.java b/src/main/java/tconstruct/library/client/FluidRenderProperties.java index f410f2a1..5794e70e 100644 --- a/src/main/java/tconstruct/library/client/FluidRenderProperties.java +++ b/src/main/java/tconstruct/library/client/FluidRenderProperties.java @@ -3,7 +3,7 @@ package tconstruct.library.client; public class FluidRenderProperties { - // Constant defaults + //Constant defaults public static final FluidRenderProperties DEFAULT_TABLE = new FluidRenderProperties(Applications.TABLE); public static final FluidRenderProperties DEFAULT_BASIN = new FluidRenderProperties(Applications.BASIN); diff --git a/src/main/java/tconstruct/library/component/MultiFluidTank.java b/src/main/java/tconstruct/library/component/MultiFluidTank.java index e8a3c86c..75e61fa7 100644 --- a/src/main/java/tconstruct/library/component/MultiFluidTank.java +++ b/src/main/java/tconstruct/library/component/MultiFluidTank.java @@ -180,7 +180,7 @@ public class MultiFluidTank extends LogicComponent implements IFluidTank @Override public void readNetworkNBT (NBTTagCompound tags) { - NBTTagList liquidTag = tags.getTagList("Liquids", 9); + NBTTagList liquidTag = tags.getTagList("Liquids", 10); fluidlist.clear(); for (int iter = 0; iter < liquidTag.tagCount(); iter++) diff --git a/src/main/java/tconstruct/library/component/TankLayerScan.java b/src/main/java/tconstruct/library/component/TankLayerScan.java index 35e57588..65c5f7d7 100644 --- a/src/main/java/tconstruct/library/component/TankLayerScan.java +++ b/src/main/java/tconstruct/library/component/TankLayerScan.java @@ -1,21 +1,14 @@ package tconstruct.library.component; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; +import java.util.*; -import mantle.blocks.iface.IFacingLogic; -import mantle.blocks.iface.IMasterLogic; -import mantle.blocks.iface.IServantLogic; -import mantle.world.CoordTuple; -import mantle.world.CoordTupleSort; +import mantle.blocks.iface.*; +import mantle.world.*; import net.minecraft.block.Block; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagIntArray; -import net.minecraft.nbt.NBTTagList; +import net.minecraft.nbt.*; import net.minecraft.tileentity.TileEntity; import tconstruct.TConstruct; +import tconstruct.library.util.*; public class TankLayerScan extends LogicComponent { @@ -38,14 +31,7 @@ public class TankLayerScan extends LogicComponent protected CoordTuple returnStone; private static boolean debug = System.getenv("DBG_MANTLE_TankLayerScan") != null; - private static int MAX_LAYER_RECURSION_DEPTH = System.getProperty("os.arch").equals("amd64") ? 4000 : 2000; // Recursion - // causes - // overflows - // on - // 32-bit, - // so reduce - // if not - // 64-bit + private static int MAX_LAYER_RECURSION_DEPTH = System.getProperty("os.arch").equals("amd64") ? 4000 : 2000; // Recursion causes overflows on 32-bit, so reduce if not 64-bit public TankLayerScan(TileEntity te, Block... ids) { @@ -72,7 +58,7 @@ public class TankLayerScan extends LogicComponent blockCoords.clear(); airCoords.clear(); boolean validAir = false; - // Check for air space in front of and behind the structure + //Check for air space in front of and behind the structure byte dir = getDirection(); switch (getDirection()) { @@ -88,7 +74,7 @@ public class TankLayerScan extends LogicComponent break; } - // Recurse the structure + //Recurse the structure boolean validBlocks = false; int xPos = 0, zPos = 0; @@ -126,7 +112,7 @@ public class TankLayerScan extends LogicComponent blockCoords.clear(); bricks = 0; - // Does the actual adding of blocks in the ring + //Does the actual adding of blocks in the ring boolean sealed = floodTest(master.xCoord + xPos, master.yCoord, master.zCoord + zPos); if (!world.isRemote && debug) { @@ -136,7 +122,7 @@ public class TankLayerScan extends LogicComponent if (sealed) { - blockCoords.add(new CoordTuple(master.xCoord, master.yCoord, master.zCoord)); // Don't forget me! + blockCoords.add(new CoordTuple(master.xCoord, master.yCoord, master.zCoord)); //Don't forget me! layerAirCoords = new HashSet(airCoords); layerBlockCoords = new HashSet(blockCoords); @@ -157,7 +143,7 @@ public class TankLayerScan extends LogicComponent } } - // @SuppressWarnings({ "unchecked" }) + //@SuppressWarnings({ "unchecked" }) protected void finalizeStructure () { Collections.sort(blockCoords, new CoordTupleSort()); @@ -204,8 +190,7 @@ public class TankLayerScan extends LogicComponent protected boolean checkAir (int x, int y, int z) { Block block = world.getBlock(x, y, z); - if (block == null || world.isAirBlock(x, y, z))// || block == - // TContent.tankAir) + if (block == null || world.isAirBlock(x, y, z))// || block == TContent.tankAir) return true; return false; @@ -304,9 +289,9 @@ public class TankLayerScan extends LogicComponent if (checkAir(coord.x, y, coord.z)) { boolean valid = true; - addAirBlock(coord.x, y, coord.z); // Don't skip first one + addAirBlock(coord.x, y, coord.z); //Don't skip first one - // Air blocks + //Air blocks while (i.hasNext()) { coord = (CoordTuple) i.next(); @@ -321,7 +306,7 @@ public class TankLayerScan extends LogicComponent } } - // Bricks + //Bricks i = layerBlockCoords.iterator(); while (i.hasNext()) { @@ -341,7 +326,7 @@ public class TankLayerScan extends LogicComponent } else if (checkServant(coord.x, y, coord.z)) { - // Bottom floor. All blocks, please vacate the elevator + //Bottom floor. All blocks, please vacate the elevator boolean valid = true; while (i.hasNext()) { @@ -374,7 +359,7 @@ public class TankLayerScan extends LogicComponent { boolean valid = true; - // Bricks + //Bricks while (i.hasNext()) { coord = (CoordTuple) i.next(); @@ -388,7 +373,7 @@ public class TankLayerScan extends LogicComponent } } - // Air blocks + //Air blocks if (valid) { i = layerAirCoords.iterator(); @@ -453,7 +438,7 @@ public class TankLayerScan extends LogicComponent } else { - if (structureTop == 0) // Workaround for missing data + if (structureTop == 0) //Workaround for missing data { for (CoordTuple coord : blockCoords) structureTop = coord.y; @@ -488,10 +473,7 @@ public class TankLayerScan extends LogicComponent } } - /** - * Do any necessary cleanup here. Remove air blocks, invalidate servants, - * etc - */ + /** Do any necessary cleanup here. Remove air blocks, invalidate servants, etc */ public void cleanup () { Iterator i = blockCoords.iterator(); @@ -511,7 +493,7 @@ public class TankLayerScan extends LogicComponent public void readFromNBT (NBTTagCompound tags) { super.readFromNBT(tags); - NBTTagList layerAir = tags.getTagList("AirLayer", 9); + NBTTagList layerAir = tags.getTagList("AirLayer", 10); if (layerAir != null) { layerAirCoords.clear(); @@ -523,7 +505,7 @@ public class TankLayerScan extends LogicComponent } } - NBTTagList blocks = tags.getTagList("Blocks", 9); + NBTTagList blocks = tags.getTagList("Blocks", 10); if (blocks != null) { blockCoords.clear(); @@ -535,7 +517,7 @@ public class TankLayerScan extends LogicComponent } } - NBTTagList air = tags.getTagList("Air", 9); + NBTTagList air = tags.getTagList("Air", 10); if (air != null) { airCoords.clear(); @@ -549,7 +531,6 @@ public class TankLayerScan extends LogicComponent structureTop = tags.getInteger("structureTop"); } - @Override public void readNetworkNBT (NBTTagCompound tags) { completeStructure = tags.getBoolean("Complete"); @@ -582,7 +563,6 @@ public class TankLayerScan extends LogicComponent tags.setInteger("structureTop", structureTop); } - @Override public void writeNetworkNBT (NBTTagCompound tags) { tags.setBoolean("Complete", completeStructure); diff --git a/src/main/java/tconstruct/modifiers/armor/AModDamageBoost.java b/src/main/java/tconstruct/modifiers/armor/AModDamageBoost.java index ac9e36a3..79d032e7 100644 --- a/src/main/java/tconstruct/modifiers/armor/AModDamageBoost.java +++ b/src/main/java/tconstruct/modifiers/armor/AModDamageBoost.java @@ -53,7 +53,7 @@ public class AModDamageBoost extends ArmorModTypeFilter NBTTagList attributes; if (baseTag.hasKey("AttributeModifiers")) { - attributes = baseTag.getTagList("AttributeModifiers", 9); + attributes = baseTag.getTagList("AttributeModifiers", 10); for (int iter = 0; iter < attributes.tagCount(); iter++) { NBTTagCompound tag = (NBTTagCompound) attributes.getCompoundTagAt(iter); diff --git a/src/main/java/tconstruct/modifiers/armor/AModHealthBoost.java b/src/main/java/tconstruct/modifiers/armor/AModHealthBoost.java index 645ee6d7..9377febc 100644 --- a/src/main/java/tconstruct/modifiers/armor/AModHealthBoost.java +++ b/src/main/java/tconstruct/modifiers/armor/AModHealthBoost.java @@ -50,7 +50,7 @@ public class AModHealthBoost extends ArmorModTypeFilter NBTTagList attributes; if (baseTag.hasKey("AttributeModifiers")) { - attributes = baseTag.getTagList("AttributeModifiers", 9); + attributes = baseTag.getTagList("AttributeModifiers", 10); for (int iter = 0; iter < attributes.tagCount(); iter++) { NBTTagCompound tag = (NBTTagCompound) attributes.getCompoundTagAt(iter); diff --git a/src/main/java/tconstruct/modifiers/armor/AModKnockbackResistance.java b/src/main/java/tconstruct/modifiers/armor/AModKnockbackResistance.java index 3fb81ff2..d2f8dc4d 100644 --- a/src/main/java/tconstruct/modifiers/armor/AModKnockbackResistance.java +++ b/src/main/java/tconstruct/modifiers/armor/AModKnockbackResistance.java @@ -50,7 +50,7 @@ public class AModKnockbackResistance extends ArmorModTypeFilter NBTTagList attributes; if (baseTag.hasKey("AttributeModifiers")) { - attributes = baseTag.getTagList("AttributeModifiers", 9); + attributes = baseTag.getTagList("AttributeModifiers", 10); for (int iter = 0; iter < attributes.tagCount(); iter++) { NBTTagCompound tag = (NBTTagCompound) attributes.getCompoundTagAt(iter); diff --git a/src/main/java/tconstruct/modifiers/armor/AModMoveSpeed.java b/src/main/java/tconstruct/modifiers/armor/AModMoveSpeed.java index 6559479a..3d4dc21d 100644 --- a/src/main/java/tconstruct/modifiers/armor/AModMoveSpeed.java +++ b/src/main/java/tconstruct/modifiers/armor/AModMoveSpeed.java @@ -48,7 +48,7 @@ public class AModMoveSpeed extends ArmorModTypeFilter NBTTagList attributes; if (baseTag.hasKey("AttributeModifiers")) { - attributes = baseTag.getTagList("AttributeModifiers", 9); + attributes = baseTag.getTagList("AttributeModifiers", 10); for (int iter = 0; iter < attributes.tagCount(); iter++) { NBTTagCompound tag = (NBTTagCompound) attributes.getCompoundTagAt(iter); diff --git a/src/main/java/tconstruct/util/player/ArmorExtended.java b/src/main/java/tconstruct/util/player/ArmorExtended.java index ec6b8da3..2c98074f 100644 --- a/src/main/java/tconstruct/util/player/ArmorExtended.java +++ b/src/main/java/tconstruct/util/player/ArmorExtended.java @@ -243,7 +243,7 @@ public class ArmorExtended implements IInventory public void readFromNBT (EntityPlayer entityplayer) { NBTTagCompound tags = entityplayer.getEntityData(); - NBTTagList tagList = tags.getTagList("TConstruct.Inventory", 9); + NBTTagList tagList = tags.getTagList("TConstruct.Inventory", 10); for (int i = 0; i < tagList.tagCount(); ++i) { NBTTagCompound nbttagcompound = (NBTTagCompound) tagList.getCompoundTagAt(i); diff --git a/src/main/java/tconstruct/util/player/KnapsackInventory.java b/src/main/java/tconstruct/util/player/KnapsackInventory.java index d8089d4d..06d64917 100644 --- a/src/main/java/tconstruct/util/player/KnapsackInventory.java +++ b/src/main/java/tconstruct/util/player/KnapsackInventory.java @@ -144,7 +144,7 @@ public class KnapsackInventory implements IInventory public void readFromNBT (EntityPlayer entityplayer) { NBTTagCompound tags = entityplayer.getEntityData(); - NBTTagList tagList = tags.getTagList("TConstruct.Knapsack", 9); + NBTTagList tagList = tags.getTagList("TConstruct.Knapsack", 10); for (int i = 0; i < tagList.tagCount(); ++i) { NBTTagCompound nbttagcompound = (NBTTagCompound) tagList.getCompoundTagAt(i);