Skip to content

Commit

Permalink
Fix all errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander committed Feb 5, 2014
1 parent ffaea7d commit a83e9a3
Show file tree
Hide file tree
Showing 17 changed files with 91 additions and 36 deletions.
6 changes: 0 additions & 6 deletions src/main/java/tconstruct/blocks/CraftingStationBlock.java
Expand Up @@ -106,10 +106,4 @@ public TileEntity createNewTileEntity (World arg0, int arg1)
{
return new CraftingStationLogic();
}

@Override
public TileEntity func_149915_a (World arg0, int arg1)
{
return new CraftingStationLogic();
}
}
Expand Up @@ -120,7 +120,7 @@ else if (activeTemps[i] >= meltingTemps[i] && !world.isRemote)
FluidStack liquid = (FluidStack) alloys.get(al);
multitank.addFluidToTank(liquid, true);
}
master.onInventoryChanged();
master.markDirty();
master.setUpdateFluids();
}
}
Expand Down
13 changes: 10 additions & 3 deletions src/main/java/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java
Expand Up @@ -259,11 +259,11 @@ public ItemStack decrStackSize (int slot, int quantity)
}

@Override
public void onInventoryChanged ()
public void markDirty ()
{
smeltery.updateTemperatures();
updateAir = true;
super.onInventoryChanged();
super.markDirty();
}

void updateWorldBlock (int slot, ItemStack itemstack)
Expand Down Expand Up @@ -574,7 +574,6 @@ public Packet getDescriptionPacket ()
@Override
public String getInventoryName ()
{
// TODO Auto-generated method stub
return getDefaultName();
}

Expand All @@ -583,4 +582,12 @@ public boolean hasCustomInventoryName ()
{
return true;
}

@Override
public void openInventory() {
}

@Override
public void closeInventory() {
}
}
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/blocks/logic/CastingBasinLogic.java
Expand Up @@ -182,9 +182,9 @@ else if (resource.isFluidEqual(this.liquid))
}

@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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/blocks/logic/CastingTableLogic.java
Expand Up @@ -182,9 +182,9 @@ else if (resource.isFluidEqual(this.liquid))
}

@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;
}
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/tconstruct/blocks/logic/FrypanLogic.java
Expand Up @@ -128,7 +128,7 @@ public void updateEntity ()
}
if (updateInventory)
{
onInventoryChanged();
markDirty();
}
}

Expand Down Expand Up @@ -312,4 +312,12 @@ public boolean canDropInventorySlot(int slot)
else
return true;
}*/

@Override
public void openInventory() {
}

@Override
public void closeInventory() {
}
}
10 changes: 9 additions & 1 deletion src/main/java/tconstruct/blocks/logic/FurnaceLogic.java
Expand Up @@ -130,7 +130,7 @@ public void updateEntity ()
}
if (updateInventory)
{
onInventoryChanged();
markDirty();
}
}

Expand Down Expand Up @@ -352,4 +352,12 @@ public boolean hasCustomInventoryName ()
{
return false;
}

@Override
public void openInventory() {
}

@Override
public void closeInventory() {
}
}
8 changes: 8 additions & 0 deletions src/main/java/tconstruct/blocks/logic/PartBuilderLogic.java
Expand Up @@ -189,4 +189,12 @@ public boolean hasCustomInventoryName ()
{
return false;
}

@Override
public void openInventory() {
}

@Override
public void closeInventory() {
}
}
8 changes: 8 additions & 0 deletions src/main/java/tconstruct/blocks/logic/PatternChestLogic.java
Expand Up @@ -41,4 +41,12 @@ public boolean hasCustomInventoryName ()
{
return true;
}

@Override
public void openInventory() {
}

@Override
public void closeInventory() {
}
}
8 changes: 4 additions & 4 deletions src/main/java/tconstruct/blocks/logic/SmelteryLogic.java
Expand Up @@ -439,7 +439,7 @@ else if (activeTemps[i] >= meltingTemps[i])
FluidStack liquid = (FluidStack) alloys.get(al);
addMoltenMetal(liquid, true);
}
onInventoryChanged();
markDirty();
}
}
}
Expand Down Expand Up @@ -654,11 +654,11 @@ public int getInventoryStackLimit ()
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);
Expand Down Expand Up @@ -1141,7 +1141,7 @@ public Packet getDescriptionPacket ()
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
readFromNBT(packet.func_148857_g());
onInventoryChanged();
markDirty();
worldObj.func_147479_m(xCoord, yCoord, zCoord);
this.needsUpdate = true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java
Expand Up @@ -221,9 +221,9 @@ public void closeInventory ()
}

@Override
public void onInventoryChanged ()
public void markDirty ()
{
super.onInventoryChanged();
super.markDirty();
this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/entity/BlueSlime.java
Expand Up @@ -220,7 +220,7 @@ public void setSlimeSize (int size)
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);
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/tconstruct/entity/CartEntity.java
Expand Up @@ -928,7 +928,7 @@ public int getInventoryStackLimit ()
/**
* Called when an the contents of an Inventory change, usually
*/
public void onInventoryChanged ()
public void markDirty ()
{
}

Expand Down Expand Up @@ -1462,4 +1462,12 @@ public boolean hasCustomInventoryName ()
{
return false;
}

@Override
public void openInventory() {
}

@Override
public void closeInventory() {
}
}
8 changes: 4 additions & 4 deletions src/main/java/tconstruct/entity/projectile/ArrowEntity.java
Expand Up @@ -476,7 +476,7 @@ public int getFirstEmptyStack (EntityLivingBase living)
{
for (int i = 0; i < 5; ++i)
{
if (living.getCurrentItemOrArmor(i) == null)
if (living.getEquipmentInSlot(i) == null)
{
return i;
}
Expand Down Expand Up @@ -505,7 +505,7 @@ private int storePartialItemStack (ItemStack par1ItemStack, EntityLivingBase liv
{
this.mainInventory[k] = par1ItemStack;
}*/
if (living.getCurrentItemOrArmor(slotID) == null)
if (living.getEquipmentInSlot(slotID) == null)
{
living.setCurrentItemOrArmor(slotID, par1ItemStack);
if (living instanceof EntityLiving)
Expand All @@ -530,7 +530,7 @@ private int storePartialItemStack (ItemStack par1ItemStack, EntityLivingBase liv
}
else
{
ItemStack stack = living.getCurrentItemOrArmor(slotID);
ItemStack stack = living.getEquipmentInSlot(slotID);
if (stack == null)
{
living.setCurrentItemOrArmor(slotID, par1ItemStack);
Expand Down Expand Up @@ -575,7 +575,7 @@ private int storeItemStack (ItemStack par1ItemStack, EntityLivingBase living)
{
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))
{
Expand Down
Expand Up @@ -221,7 +221,7 @@ public void onUpdate ()
}
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)
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/tconstruct/util/player/ArmorExtended.java
Expand Up @@ -113,7 +113,7 @@ public int getInventoryStackLimit ()
}

@Override
public void onInventoryChanged ()
public void markDirty ()
{
EntityPlayer player = parent.get();
TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.getDisplayName());
Expand Down Expand Up @@ -284,4 +284,12 @@ public void dropItems ()
}
}
}

@Override
public void openInventory() {
}

@Override
public void closeInventory() {
}
}
18 changes: 12 additions & 6 deletions src/main/java/tconstruct/util/player/KnapsackInventory.java
Expand Up @@ -94,12 +94,6 @@ public boolean hasCustomInventoryName ()
return false;
}

@Override
public void onInventoryChanged ()
{

}

public ItemStack getStackInSlotOnClosing (int slot)
{
return null;
Expand Down Expand Up @@ -195,4 +189,16 @@ void dropItemEntity (Entity dropper, ItemStack dropStack)
dropper.worldObj.spawnEntityInWorld(entityitem);
}

@Override
public void markDirty() {
}

@Override
public void openInventory() {
}

@Override
public void closeInventory() {
}

}

0 comments on commit a83e9a3

Please sign in to comment.