Move the neighbor update to PartAdvanced

This commit is contained in:
Ben Spiers 2013-09-20 03:56:44 +01:00
parent 397bf28db2
commit 9697763856
2 changed files with 10 additions and 1 deletions

View file

@ -1,6 +1,8 @@
package resonantinduction.wire.multipart;
import net.minecraft.block.Block;
import codechicken.multipart.TMultiPart;
import codechicken.multipart.handler.MultipartProxy;
public abstract class PartAdvanced extends TMultiPart
{
@ -21,6 +23,12 @@ public abstract class PartAdvanced extends TMultiPart
this.ticks++;
}
@Override
public void onAdded()
{
world().notifyBlocksOfNeighborChange(x(), y(), z(), ((Block)MultipartProxy.block()).blockID);
}
/**
* Called on the TileEntity's first tick.

View file

@ -344,7 +344,8 @@ public class PartWire extends PartUniversalConductor implements IPacketReceiver,
@Override
public void onAdded()
{
getWorld().notifyBlocksOfNeighborChange(x(), y(), z(), ((Block)MultipartProxy.block()).blockID);
super.onAdded();
refresh();
}
@Override