Override bind to replace tile in network when it changes
This commit is contained in:
parent
5e832d86ac
commit
a70bf89aac
1 changed files with 15 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue