update directly instead of relying on forge events
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ aechannel=stable
|
|||||||
aebuild=7
|
aebuild=7
|
||||||
aegroup=appeng
|
aegroup=appeng
|
||||||
aebasename=appliedenergistics2
|
aebasename=appliedenergistics2
|
||||||
trousers=omni-fixes-v47c
|
trousers=omni-fixes-v47d
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
# Versions #
|
# Versions #
|
||||||
|
|||||||
@@ -25,7 +25,9 @@ import java.util.Objects;
|
|||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import appeng.api.networking.storage.IStorageGrid;
|
||||||
import appeng.fluids.helper.IConfigurableFluidInventory;
|
import appeng.fluids.helper.IConfigurableFluidInventory;
|
||||||
|
import appeng.me.cache.GridStorageCache;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
@@ -374,7 +376,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 com.jaquadro.minecraft.storagedrawers.api.capabilities.IItemRepository;
|
import com.jaquadro.minecraft.storagedrawers.api.capabilities.IItemRepository;
|
||||||
@@ -557,7 +559,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