Override bind to replace tile in network when it changes

This commit is contained in:
Ben Spiers 2013-09-26 20:29:06 +01:00
parent 5e832d86ac
commit a70bf89aac

View file

@ -98,6 +98,21 @@ public class PartWire extends PartUniversalConductor implements TSlottedPart, JN
this.material = type;
}
@Override
public void bind(TileMultipart t)
{
if (tile() != null)
{
this.getNetwork().getConductors().remove(tile());
super.bind(t);
this.getNetwork().getConductors().add((IConductor) tile());
}
else
{
super.bind(t);
}
}
@Override
public boolean canConnect(ForgeDirection direction)
{