Refactored StorageChannel enum into an interface (#3138)
This replaces the static enum with a more dynamic interface providing factory methods for handling network storage.
This commit is contained in:
@@ -58,7 +58,7 @@ public class TileCraftingMonitorTile extends TileCraftingTile implements IColora
|
||||
|
||||
if( hasItem )
|
||||
{
|
||||
this.dspPlay = AEItemStack.loadItemStackFromPacket( data );
|
||||
this.dspPlay = AEItemStack.fromPacket( data );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -40,6 +40,7 @@ import appeng.api.networking.events.MENetworkChannelsChanged;
|
||||
import appeng.api.networking.events.MENetworkEventSubscribe;
|
||||
import appeng.api.networking.events.MENetworkPowerStatusChange;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.channels.IItemStorageChannel;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.api.util.WorldCoord;
|
||||
@@ -314,7 +315,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
throw new IllegalStateException( this.cluster + " does not contain any kind of blocks, which were destroyed." );
|
||||
}
|
||||
|
||||
for( IAEItemStack ais : inv.getAvailableItems( AEApi.instance().storage().createItemList() ) )
|
||||
for( IAEItemStack ais : inv.getAvailableItems( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList() ) )
|
||||
{
|
||||
ais = ais.copy();
|
||||
ais.setStackSize( ais.getDefinition().getMaxStackSize() );
|
||||
|
||||
@@ -479,7 +479,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
try
|
||||
{
|
||||
final TargetPoint where = new TargetPoint( this.world.provider.getDimension(), this.pos.getX(), this.pos.getY(), this.pos.getZ(), 32 );
|
||||
final IAEItemStack item = AEItemStack.create( output );
|
||||
final IAEItemStack item = AEItemStack.fromItemStack( output );
|
||||
NetworkHandler.instance().sendToAllAround( new PacketAssemblerAnimation( this.pos, (byte) speed, item ), where );
|
||||
}
|
||||
catch( final IOException e )
|
||||
|
||||
Reference in New Issue
Block a user