Fix some bugs with LogiTransporters
This commit is contained in:
parent
16ce88f09a
commit
c13b3b240f
3 changed files with 8 additions and 9 deletions
|
@ -88,7 +88,7 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
}
|
||||
updateCapacity();
|
||||
clampBuffer();
|
||||
queueClientUpdate((Collection<IGridTransmitter<A, N>>)transmittersToAdd.clone());
|
||||
queueClientUpdate(new ArrayList<>(transmittersToAdd));
|
||||
transmittersToAdd.clear();
|
||||
}
|
||||
|
||||
|
|
|
@ -639,7 +639,7 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
|
|||
|
||||
protected void onModeChange(ForgeDirection side)
|
||||
{
|
||||
refreshConnections();
|
||||
markDirtyAcceptor(side);
|
||||
}
|
||||
|
||||
protected void markDirtyTransmitters()
|
||||
|
@ -773,7 +773,7 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
|
|||
connectionTypes[hit.subHit] = connectionTypes[hit.subHit].next();
|
||||
sendDesc = true;
|
||||
|
||||
onModeChange(ForgeDirection.getOrientation(side));
|
||||
onModeChange(ForgeDirection.getOrientation(hit.subHit));
|
||||
player.addChatMessage(new ChatComponentText("Connection type changed to " + connectionTypes[hit.subHit].toString()));
|
||||
|
||||
return true;
|
||||
|
|
|
@ -64,12 +64,6 @@ public abstract class PartTransmitter<A, N extends DynamicNetwork<A, N>> extends
|
|||
super.preRemove();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onModeChange(ForgeDirection side)
|
||||
{
|
||||
super.onModeChange(side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborTileChanged(int side, boolean weak)
|
||||
{
|
||||
|
@ -98,6 +92,11 @@ public abstract class PartTransmitter<A, N extends DynamicNetwork<A, N>> extends
|
|||
|
||||
public A getCachedAcceptor(ForgeDirection side)
|
||||
{
|
||||
ConnectionType type = connectionTypes[side.ordinal()];
|
||||
if(type == ConnectionType.PULL || type == ConnectionType.NONE)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return connectionMapContainsSide(currentAcceptorConnections, side) ? (A)cachedAcceptors[side.ordinal()] : null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue