update directly instead of relying on forge events
This commit is contained in:
@@ -25,8 +25,10 @@ import java.util.Objects;
|
|||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import appeng.api.networking.storage.IStorageGrid;
|
||||||
import appeng.api.storage.channels.IItemStorageChannel;
|
import appeng.api.storage.channels.IItemStorageChannel;
|
||||||
import appeng.fluids.helper.IConfigurableFluidInventory;
|
import appeng.fluids.helper.IConfigurableFluidInventory;
|
||||||
|
import appeng.me.cache.GridStorageCache;
|
||||||
import appeng.util.ConfigManager;
|
import appeng.util.ConfigManager;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@@ -415,7 +417,7 @@ public class PartFluidStorageBus extends PartSharedStorageBus implements IMEMoni
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// force grid to update handlers...
|
// force grid to update handlers...
|
||||||
this.getProxy().getGrid().postEvent( new MENetworkCellArrayUpdate() );
|
(( GridStorageCache ) this.getProxy().getGrid().getCache( IStorageGrid.class )).cellUpdate( null );
|
||||||
}
|
}
|
||||||
catch( final GridAccessException ignore )
|
catch( final GridAccessException ignore )
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -94,7 +94,7 @@ public class GridStorageCache implements IStorageGrid
|
|||||||
|
|
||||||
this.removeCellProvider( cc, tracker );
|
this.removeCellProvider( cc, tracker );
|
||||||
this.inactiveCellProviders.remove( cc );
|
this.inactiveCellProviders.remove( cc );
|
||||||
this.getGrid().postEvent( new MENetworkCellArrayUpdate() );
|
cellUpdate( null );
|
||||||
|
|
||||||
tracker.applyChanges();
|
tracker.applyChanges();
|
||||||
}
|
}
|
||||||
@@ -119,7 +119,7 @@ public class GridStorageCache implements IStorageGrid
|
|||||||
final ICellContainer cc = (ICellContainer) machine;
|
final ICellContainer cc = (ICellContainer) machine;
|
||||||
this.inactiveCellProviders.add( cc );
|
this.inactiveCellProviders.add( cc );
|
||||||
|
|
||||||
this.getGrid().postEvent( new MENetworkCellArrayUpdate() );
|
cellUpdate( null );
|
||||||
|
|
||||||
if( node.isActive() )
|
if( node.isActive() )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import appeng.api.networking.storage.IStorageGrid;
|
||||||
|
import appeng.me.cache.GridStorageCache;
|
||||||
import appeng.tile.misc.TileInterface;
|
import appeng.tile.misc.TileInterface;
|
||||||
import appeng.tile.networking.TileCableBus;
|
import appeng.tile.networking.TileCableBus;
|
||||||
import appeng.util.ConfigManager;
|
import appeng.util.ConfigManager;
|
||||||
@@ -600,7 +602,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// force grid to update handlers...
|
// force grid to update handlers...
|
||||||
this.getProxy().getGrid().postEvent( new MENetworkCellArrayUpdate() );
|
(( GridStorageCache ) this.getProxy().getGrid().getCache( IStorageGrid.class )).cellUpdate( null );
|
||||||
}
|
}
|
||||||
catch( final GridAccessException e )
|
catch( final GridAccessException e )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user