restore breaking API change
This commit is contained in:
@@ -5,6 +5,7 @@ package appeng.fluids.parts;
|
||||
import java.util.Random;
|
||||
|
||||
import appeng.api.networking.events.MENetworkChannelChanged;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.fluids.helper.IConfigurableFluidInventory;
|
||||
import appeng.me.cache.NetworkMonitor;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -113,7 +114,7 @@ public class PartFluidLevelEmitter extends PartUpgradeable implements IStackWatc
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStackChange( IAEStack<?> diffStack, IStorageChannel<?> chan )
|
||||
public void onStackChange( IItemList<?> o, IAEStack<?> fullStack, IAEStack<?> diffStack, IActionSource src, IStorageChannel<?> chan )
|
||||
{
|
||||
if( chan == AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class ) && diffStack.equals( this.config.getFluidInSlot( 0 ) ) )
|
||||
{
|
||||
|
||||
+11
-3
@@ -219,7 +219,7 @@ public class NetworkMonitor<T extends IAEStack<T>> implements IMEMonitor<T>
|
||||
|
||||
protected void postChange( final boolean add, final Iterable<T> changes, final IActionSource src )
|
||||
{
|
||||
if ( GLOBAL_DEPTH.contains( this ))
|
||||
if( GLOBAL_DEPTH.contains( this ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -228,7 +228,7 @@ public class NetworkMonitor<T extends IAEStack<T>> implements IMEMonitor<T>
|
||||
|
||||
this.sendEvent = true;
|
||||
|
||||
for ( final T changedItem : changes )
|
||||
for( final T changedItem : changes )
|
||||
{
|
||||
if( !add && changedItem != null )
|
||||
{
|
||||
@@ -244,11 +244,19 @@ public class NetworkMonitor<T extends IAEStack<T>> implements IMEMonitor<T>
|
||||
|
||||
if( !list.isEmpty() )
|
||||
{
|
||||
IAEStack<T> fullStack = this.getStorageList().findPrecise( changedItem );
|
||||
|
||||
if( fullStack == null )
|
||||
{
|
||||
fullStack = changedItem.copy();
|
||||
fullStack.setStackSize( 0 );
|
||||
}
|
||||
|
||||
this.myGridCache.getInterestManager().enableTransactions();
|
||||
|
||||
for( final ItemWatcher iw : list )
|
||||
{
|
||||
iw.getHost().onStackChange( changedItem, this.getChannel() );
|
||||
iw.getHost().onStackChange( this.getStorageList(), fullStack, changedItem, src, this.getChannel() );
|
||||
}
|
||||
|
||||
this.myGridCache.getInterestManager().disableTransactions();
|
||||
|
||||
@@ -41,6 +41,7 @@ import appeng.api.storage.IStorageChannel;
|
||||
import appeng.api.storage.channels.IItemStorageChannel;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.api.util.IConfigManager;
|
||||
@@ -362,7 +363,7 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStackChange( final IAEStack diffStack, final IStorageChannel chan )
|
||||
public void onStackChange( IItemList<?> o, IAEStack<?> fullStack, IAEStack<?> diffStack, IActionSource src, IStorageChannel<?> chan )
|
||||
{
|
||||
if( chan == AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) )
|
||||
{
|
||||
|
||||
@@ -24,8 +24,10 @@ import java.io.IOException;
|
||||
import appeng.api.networking.events.MENetworkChannelsChanged;
|
||||
import appeng.api.networking.events.MENetworkEventSubscribe;
|
||||
import appeng.api.networking.events.MENetworkPowerStatusChange;
|
||||
import appeng.api.networking.security.IActionSource;
|
||||
import appeng.api.storage.channels.IFluidStorageChannel;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.fluids.util.AEFluidStack;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
@@ -460,7 +462,7 @@ public abstract class AbstractPartMonitor extends AbstractPartDisplay implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStackChange( final IAEStack diffStack, final IStorageChannel chan )
|
||||
public void onStackChange( IItemList<?> o, IAEStack<?> fullStack, IAEStack<?> diffStack, IActionSource src, IStorageChannel<?> chan )
|
||||
{
|
||||
if( this.configuredItem != null )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user