Fixed furnace invalidation in network issue

This commit is contained in:
Calclavia 2013-10-17 14:35:29 +08:00
parent 1288e7ecd5
commit 467a6c2907
4 changed files with 23 additions and 19 deletions

@ -1 +1 @@
Subproject commit 7508caa166af6c208bc930b96a46a0dcd5d9215d Subproject commit 990cf57f2b8e30766bc848e5802b1e80d27ddb77

View file

@ -71,13 +71,13 @@ public class TileEntityAdvancedFurnace extends TileEntityFurnace implements IEle
{ {
this.produceUE(direction); this.produceUE(direction);
} }
hasRequest = true; hasRequest = true;
break; break;
} }
} }
} }
if (hasRequest) if (hasRequest)
{ {
/** /**
@ -94,9 +94,8 @@ public class TileEntityAdvancedFurnace extends TileEntityFurnace implements IEle
if (doBlockStateUpdate != this.furnaceBurnTime > 0) if (doBlockStateUpdate != this.furnaceBurnTime > 0)
{ {
BlockFurnace.updateFurnaceBlockState(this.furnaceBurnTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord); //BlockFurnace.updateFurnaceBlockState(this.furnaceBurnTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
if (this.isInvalid()) this.refreshConductors();
this.refreshConductors();
} }
} }
} }
@ -131,7 +130,7 @@ public class TileEntityAdvancedFurnace extends TileEntityFurnace implements IEle
if (tileEntity instanceof IConductor) if (tileEntity instanceof IConductor)
{ {
((IConductor)tileEntity).refresh(); ((IConductor) tileEntity).refresh();
} }
} }
} }

View file

@ -167,14 +167,16 @@ public abstract class PartConductor extends PartAdvanced implements IConductor
} }
} }
currentWireConnections = possibleWireConnections; this.currentWireConnections = possibleWireConnections;
} }
currentAcceptorConnections = possibleAcceptorConnections; this.currentAcceptorConnections = possibleAcceptorConnections;
this.getNetwork().refresh(); this.getNetwork().refresh();
this.sendDescUpdate(); this.sendDescUpdate();
} }
tile().markRender();
this.tile().markRender();
} }
/** /**
@ -222,20 +224,20 @@ public abstract class PartConductor extends PartAdvanced implements IConductor
public void onAdded() public void onAdded()
{ {
super.onAdded(); super.onAdded();
refresh(); this.refresh();
} }
@Override @Override
public void onChunkLoad() public void onChunkLoad()
{ {
super.onChunkLoad(); super.onChunkLoad();
refresh(); this.refresh();
} }
@Override @Override
public void onNeighborChanged() public void onNeighborChanged()
{ {
super.onNeighborChanged(); super.onNeighborChanged();
refresh(); this.refresh();
} }
} }

View file

@ -329,17 +329,20 @@ public class PartWire extends PartUniversalConductor implements TSlottedPart, JN
{ {
if (isInsulated() && !world().isRemote) if (isInsulated() && !world().isRemote)
{ {
tile().dropItems(Collections.singletonList(new ItemStack(Block.cloth, 1, BlockColored.getBlockFromDye(dyeID)))); this.tile().dropItems(Collections.singletonList(new ItemStack(Block.cloth, 1, BlockColored.getBlockFromDye(dyeID))));
} }
setInsulated(BlockColored.getDyeFromBlock(item.getItemDamage())); this.setInsulated(BlockColored.getDyeFromBlock(item.getItemDamage()));
player.inventory.decrStackSize(player.inventory.currentItem, 1); player.inventory.decrStackSize(player.inventory.currentItem, 1);
return true; return true;
} }
else if ((item.itemID == Item.shears.itemID || item.getItem() instanceof ItemShears) && this.isInsulated()) else if ((item.itemID == Item.shears.itemID || item.getItem() instanceof ItemShears) && this.isInsulated())
{ {
if (!world().isRemote) if (!this.world().isRemote)
tile().dropItems(Collections.singletonList(new ItemStack(Block.cloth, 1, BlockColored.getBlockFromDye(dyeID)))); {
setInsulated(false); this.tile().dropItems(Collections.singletonList(new ItemStack(Block.cloth, 1, BlockColored.getBlockFromDye(dyeID))));
}
this.setInsulated(false);
return true; return true;
} }
} }
@ -451,7 +454,7 @@ public class PartWire extends PartUniversalConductor implements TSlottedPart, JN
@Override @Override
public void onPartChanged(TMultiPart part) public void onPartChanged(TMultiPart part)
{ {
refresh(); this.refresh();
} }
} }