Move the neighbor update to PartAdvanced
This commit is contained in:
parent
397bf28db2
commit
9697763856
2 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
{
|
||||
|
@ -22,6 +24,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.
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue