diff --git a/src/main/java/tconstruct/blocks/CraftingStationBlock.java b/src/main/java/tconstruct/blocks/CraftingStationBlock.java index 9710e597..9d9f9a3c 100644 --- a/src/main/java/tconstruct/blocks/CraftingStationBlock.java +++ b/src/main/java/tconstruct/blocks/CraftingStationBlock.java @@ -106,10 +106,4 @@ public class CraftingStationBlock extends InventoryBlock { return new CraftingStationLogic(); } - - @Override - public TileEntity func_149915_a (World arg0, int arg1) - { - return new CraftingStationLogic(); - } } diff --git a/src/main/java/tconstruct/blocks/component/SmelteryComponent.java b/src/main/java/tconstruct/blocks/component/SmelteryComponent.java index 4711803f..2167fe36 100644 --- a/src/main/java/tconstruct/blocks/component/SmelteryComponent.java +++ b/src/main/java/tconstruct/blocks/component/SmelteryComponent.java @@ -120,7 +120,7 @@ public class SmelteryComponent extends LogicComponent FluidStack liquid = (FluidStack) alloys.get(al); multitank.addFluidToTank(liquid, true); } - master.onInventoryChanged(); + master.markDirty(); master.setUpdateFluids(); } } diff --git a/src/main/java/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java b/src/main/java/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java index c2ef2807..939d0b89 100644 --- a/src/main/java/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java +++ b/src/main/java/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java @@ -259,11 +259,11 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc } @Override - public void onInventoryChanged () + public void markDirty () { smeltery.updateTemperatures(); updateAir = true; - super.onInventoryChanged(); + super.markDirty(); } void updateWorldBlock (int slot, ItemStack itemstack) @@ -574,7 +574,6 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc @Override public String getInventoryName () { - // TODO Auto-generated method stub return getDefaultName(); } @@ -583,4 +582,12 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc { return true; } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } } diff --git a/src/main/java/tconstruct/blocks/logic/CastingBasinLogic.java b/src/main/java/tconstruct/blocks/logic/CastingBasinLogic.java index 00d186f1..2595002e 100644 --- a/src/main/java/tconstruct/blocks/logic/CastingBasinLogic.java +++ b/src/main/java/tconstruct/blocks/logic/CastingBasinLogic.java @@ -182,9 +182,9 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl } @Override - public void onInventoryChanged () //Isn't actually called? + public void markDirty () //Isn't actually called? { - super.onInventoryChanged(); + super.markDirty(); worldObj.func_147479_m(xCoord, yCoord, zCoord); needsUpdate = true; } diff --git a/src/main/java/tconstruct/blocks/logic/CastingTableLogic.java b/src/main/java/tconstruct/blocks/logic/CastingTableLogic.java index 9a254e9f..6d42b2f2 100644 --- a/src/main/java/tconstruct/blocks/logic/CastingTableLogic.java +++ b/src/main/java/tconstruct/blocks/logic/CastingTableLogic.java @@ -182,9 +182,9 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl } @Override - public void onInventoryChanged () //Isn't actually called? + public void markDirty () //Isn't actually called? { - super.onInventoryChanged(); + super.markDirty(); getWorld().func_147479_m(xCoord, yCoord, zCoord); needsUpdate = true; } diff --git a/src/main/java/tconstruct/blocks/logic/FrypanLogic.java b/src/main/java/tconstruct/blocks/logic/FrypanLogic.java index 75ac7c0e..f55a60fe 100644 --- a/src/main/java/tconstruct/blocks/logic/FrypanLogic.java +++ b/src/main/java/tconstruct/blocks/logic/FrypanLogic.java @@ -128,7 +128,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic } if (updateInventory) { - onInventoryChanged(); + markDirty(); } } @@ -312,4 +312,12 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic else return true; }*/ + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } } diff --git a/src/main/java/tconstruct/blocks/logic/FurnaceLogic.java b/src/main/java/tconstruct/blocks/logic/FurnaceLogic.java index d352f6c2..666befbd 100644 --- a/src/main/java/tconstruct/blocks/logic/FurnaceLogic.java +++ b/src/main/java/tconstruct/blocks/logic/FurnaceLogic.java @@ -130,7 +130,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin } if (updateInventory) { - onInventoryChanged(); + markDirty(); } } @@ -352,4 +352,12 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin { return false; } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } } diff --git a/src/main/java/tconstruct/blocks/logic/PartBuilderLogic.java b/src/main/java/tconstruct/blocks/logic/PartBuilderLogic.java index 90b7a936..308b0b1e 100644 --- a/src/main/java/tconstruct/blocks/logic/PartBuilderLogic.java +++ b/src/main/java/tconstruct/blocks/logic/PartBuilderLogic.java @@ -189,4 +189,12 @@ public class PartBuilderLogic extends InventoryLogic implements ISidedInventory { return false; } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } } diff --git a/src/main/java/tconstruct/blocks/logic/PatternChestLogic.java b/src/main/java/tconstruct/blocks/logic/PatternChestLogic.java index 4718bbd2..6abc783e 100644 --- a/src/main/java/tconstruct/blocks/logic/PatternChestLogic.java +++ b/src/main/java/tconstruct/blocks/logic/PatternChestLogic.java @@ -41,4 +41,12 @@ public class PatternChestLogic extends InventoryLogic { return true; } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } } diff --git a/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java b/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java index 8bf9d673..d3886d3c 100644 --- a/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java +++ b/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java @@ -439,7 +439,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci FluidStack liquid = (FluidStack) alloys.get(al); addMoltenMetal(liquid, true); } - onInventoryChanged(); + markDirty(); } } } @@ -654,11 +654,11 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci return 1; } - public void onInventoryChanged () + public void markDirty () { updateTemperatures(); updateEntity(); - super.onInventoryChanged(); + super.markDirty(); needsUpdate = true; //worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); //worldObj.func_147479_m(xCoord, yCoord, zCoord); @@ -1141,7 +1141,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet) { readFromNBT(packet.func_148857_g()); - onInventoryChanged(); + markDirty(); worldObj.func_147479_m(xCoord, yCoord, zCoord); this.needsUpdate = true; } diff --git a/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java b/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java index 5eb04ddc..013302a9 100644 --- a/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java +++ b/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java @@ -221,9 +221,9 @@ public class TileEntityLandmine extends TileEntity implements IInventory } @Override - public void onInventoryChanged () + public void markDirty () { - super.onInventoryChanged(); + super.markDirty(); this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } diff --git a/src/main/java/tconstruct/entity/BlueSlime.java b/src/main/java/tconstruct/entity/BlueSlime.java index d148ad04..0290beb6 100644 --- a/src/main/java/tconstruct/entity/BlueSlime.java +++ b/src/main/java/tconstruct/entity/BlueSlime.java @@ -220,7 +220,7 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData this.dataWatcher.updateObject(16, new Byte((byte) size)); this.setSize(0.6F * (float) size, 0.6F * (float) size); this.setPosition(this.posX, this.posY, this.posZ); - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.getMaxHealth()); + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.getMaxHealth()); this.setHealth(this.getMaxHealth()); this.experienceValue = size + 2 ^ (size); diff --git a/src/main/java/tconstruct/entity/CartEntity.java b/src/main/java/tconstruct/entity/CartEntity.java index 3124ec70..4418e3a3 100644 --- a/src/main/java/tconstruct/entity/CartEntity.java +++ b/src/main/java/tconstruct/entity/CartEntity.java @@ -928,7 +928,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS /** * Called when an the contents of an Inventory change, usually */ - public void onInventoryChanged () + public void markDirty () { } @@ -1462,4 +1462,12 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS { return false; } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } } diff --git a/src/main/java/tconstruct/entity/projectile/ArrowEntity.java b/src/main/java/tconstruct/entity/projectile/ArrowEntity.java index c6e3a877..c896dad5 100644 --- a/src/main/java/tconstruct/entity/projectile/ArrowEntity.java +++ b/src/main/java/tconstruct/entity/projectile/ArrowEntity.java @@ -476,7 +476,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa { for (int i = 0; i < 5; ++i) { - if (living.getCurrentItemOrArmor(i) == null) + if (living.getEquipmentInSlot(i) == null) { return i; } @@ -505,7 +505,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa { this.mainInventory[k] = par1ItemStack; }*/ - if (living.getCurrentItemOrArmor(slotID) == null) + if (living.getEquipmentInSlot(slotID) == null) { living.setCurrentItemOrArmor(slotID, par1ItemStack); if (living instanceof EntityLiving) @@ -530,7 +530,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa } else { - ItemStack stack = living.getCurrentItemOrArmor(slotID); + ItemStack stack = living.getEquipmentInSlot(slotID); if (stack == null) { living.setCurrentItemOrArmor(slotID, par1ItemStack); @@ -575,7 +575,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa { for (int slotID = 0; slotID < 5; ++slotID) { - ItemStack stack = living.getCurrentItemOrArmor(slotID); + ItemStack stack = living.getEquipmentInSlot(slotID); if (stack != null && stack == par1ItemStack && stack.isStackable() && stack.stackSize < stack.getMaxStackSize() && stack.stackSize < 64 && (!stack.getHasSubtypes() || stack.getItemDamage() == par1ItemStack.getItemDamage()) && ItemStack.areItemStackTagsEqual(stack, par1ItemStack)) { diff --git a/src/main/java/tconstruct/entity/projectile/RotatingBase.java b/src/main/java/tconstruct/entity/projectile/RotatingBase.java index 84bd8b3e..c71793b7 100644 --- a/src/main/java/tconstruct/entity/projectile/RotatingBase.java +++ b/src/main/java/tconstruct/entity/projectile/RotatingBase.java @@ -221,7 +221,7 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData } Vec3 vec3d = Vec3.createVectorHelper(posX, posY, posZ); Vec3 vec3d1 = Vec3.createVectorHelper(posX + motionX, posY + motionY, posZ + motionZ); - MovingObjectPosition movingobjectposition = worldObj.clip(vec3d, vec3d1); + MovingObjectPosition movingobjectposition = worldObj.rayTraceBlocks(vec3d, vec3d1); vec3d = Vec3.createVectorHelper(posX, posY, posZ); vec3d1 = Vec3.createVectorHelper(posX + motionX, posY + motionY, posZ + motionZ); if (movingobjectposition != null) diff --git a/src/main/java/tconstruct/util/player/ArmorExtended.java b/src/main/java/tconstruct/util/player/ArmorExtended.java index 8cea1f58..c37d2073 100644 --- a/src/main/java/tconstruct/util/player/ArmorExtended.java +++ b/src/main/java/tconstruct/util/player/ArmorExtended.java @@ -113,7 +113,7 @@ public class ArmorExtended implements IInventory } @Override - public void onInventoryChanged () + public void markDirty () { EntityPlayer player = parent.get(); TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.getDisplayName()); @@ -284,4 +284,12 @@ public class ArmorExtended implements IInventory } } } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } } diff --git a/src/main/java/tconstruct/util/player/KnapsackInventory.java b/src/main/java/tconstruct/util/player/KnapsackInventory.java index edcb9ef3..8dcb00e5 100644 --- a/src/main/java/tconstruct/util/player/KnapsackInventory.java +++ b/src/main/java/tconstruct/util/player/KnapsackInventory.java @@ -94,12 +94,6 @@ public class KnapsackInventory implements IInventory return false; } - @Override - public void onInventoryChanged () - { - - } - public ItemStack getStackInSlotOnClosing (int slot) { return null; @@ -195,4 +189,16 @@ public class KnapsackInventory implements IInventory dropper.worldObj.spawnEntityInWorld(entityitem); } + @Override + public void markDirty() { + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + } \ No newline at end of file