TESR should use less CPU when no-op.
onInventoryChange for FZ. Networks without batteries can store up to 1000 AE. Fixed a bug that cause energy to spiral out of control and go infinite. Fixed a crash with storage buses and fluids.
This commit is contained in:
@@ -57,6 +57,7 @@ public class CableBusContainer implements AEMultiTile, ICableBusContainer
|
||||
public IPartHost tcb;
|
||||
|
||||
boolean inWorld = false;
|
||||
public boolean requiresDynamicRender = false;
|
||||
|
||||
public void setHost(IPartHost host)
|
||||
{
|
||||
@@ -76,6 +77,17 @@ public class CableBusContainer implements AEMultiTile, ICableBusContainer
|
||||
return sides[side.ordinal()];
|
||||
}
|
||||
|
||||
public void updateDynamicRender()
|
||||
{
|
||||
requiresDynamicRender = false;
|
||||
for (ForgeDirection s : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
IPart p = getPart( s );
|
||||
if ( p != null )
|
||||
requiresDynamicRender = requiresDynamicRender || p.requireDynamicRender();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removePart(ForgeDirection side, boolean supressUpdate)
|
||||
{
|
||||
@@ -94,6 +106,7 @@ public class CableBusContainer implements AEMultiTile, ICableBusContainer
|
||||
|
||||
if ( !supressUpdate )
|
||||
{
|
||||
updateDynamicRender();
|
||||
updateConnections();
|
||||
markForUpdate();
|
||||
PartChanged();
|
||||
@@ -262,6 +275,7 @@ public class CableBusContainer implements AEMultiTile, ICableBusContainer
|
||||
}
|
||||
}
|
||||
|
||||
updateDynamicRender();
|
||||
updateConnections();
|
||||
markForUpdate();
|
||||
PartChanged();
|
||||
@@ -543,7 +557,8 @@ public class CableBusContainer implements AEMultiTile, ICableBusContainer
|
||||
if ( part != null )
|
||||
{
|
||||
setSide( s );
|
||||
BusCollisionHelper bch = new BusCollisionHelper( boxes, BusRenderHelper.instance.ax, BusRenderHelper.instance.ay, BusRenderHelper.instance.az, null, true );
|
||||
BusCollisionHelper bch = new BusCollisionHelper( boxes, BusRenderHelper.instance.ax, BusRenderHelper.instance.ay,
|
||||
BusRenderHelper.instance.az, null, true );
|
||||
part.getBoxes( bch );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user