Rebuild itemlist only once per tick
re-enabled level-emitters update
This commit is contained in:
@@ -173,6 +173,7 @@ public class PartFluidLevelEmitter extends PartUpgradeable implements IStackWatc
|
|||||||
@Override
|
@Override
|
||||||
public void postChange( final IBaseMonitor<IAEFluidStack> monitor, final Iterable<IAEFluidStack> change, final IActionSource actionSource )
|
public void postChange( final IBaseMonitor<IAEFluidStack> monitor, final Iterable<IAEFluidStack> change, final IActionSource actionSource )
|
||||||
{
|
{
|
||||||
|
this.updateReportingValue( (IMEMonitor<IAEFluidStack>) monitor );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+5
-2
@@ -64,6 +64,7 @@ public class NetworkMonitor<T extends IAEStack<T>> implements IMEMonitor<T>
|
|||||||
private boolean hasChanged = false;
|
private boolean hasChanged = false;
|
||||||
@Nonnegative
|
@Nonnegative
|
||||||
private int localDepthSemaphore = 0;
|
private int localDepthSemaphore = 0;
|
||||||
|
private boolean ticked;
|
||||||
|
|
||||||
public NetworkMonitor( final GridStorageCache cache, final IStorageChannel<T> chan )
|
public NetworkMonitor( final GridStorageCache cache, final IStorageChannel<T> chan )
|
||||||
{
|
{
|
||||||
@@ -139,9 +140,10 @@ public class NetworkMonitor<T extends IAEStack<T>> implements IMEMonitor<T>
|
|||||||
@Override
|
@Override
|
||||||
public IItemList<T> getStorageList()
|
public IItemList<T> getStorageList()
|
||||||
{
|
{
|
||||||
if( this.hasChanged )
|
if( hasChanged && ticked )
|
||||||
{
|
{
|
||||||
this.hasChanged = false;
|
hasChanged = false;
|
||||||
|
ticked = false;
|
||||||
this.cachedList.resetStatus();
|
this.cachedList.resetStatus();
|
||||||
return this.getAvailableItems( this.cachedList );
|
return this.getAvailableItems( this.cachedList );
|
||||||
}
|
}
|
||||||
@@ -326,6 +328,7 @@ public class NetworkMonitor<T extends IAEStack<T>> implements IMEMonitor<T>
|
|||||||
|
|
||||||
void onTick()
|
void onTick()
|
||||||
{
|
{
|
||||||
|
ticked = true;
|
||||||
if( this.sendEvent )
|
if( this.sendEvent )
|
||||||
{
|
{
|
||||||
this.sendEvent = false;
|
this.sendEvent = false;
|
||||||
|
|||||||
@@ -400,6 +400,7 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
|
|||||||
@Override
|
@Override
|
||||||
public void postChange( final IBaseMonitor<IAEItemStack> monitor, final Iterable<IAEItemStack> change, final IActionSource actionSource )
|
public void postChange( final IBaseMonitor<IAEItemStack> monitor, final Iterable<IAEItemStack> change, final IActionSource actionSource )
|
||||||
{
|
{
|
||||||
|
this.updateReportingValue( (IMEMonitor<IAEItemStack>) monitor );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user