Change storage/conversion monitor interaction. (#3613)

Fixes #1480
This commit is contained in:
fscan
2018-07-14 16:40:20 +02:00
committed by GitHub
parent 3363acb7db
commit 71a9bb2532
24 changed files with 343 additions and 208 deletions
@@ -93,8 +93,10 @@ public class PartImportBus extends PartSharedItemBus implements IInventoryDestin
try
{
final IMEMonitor<IAEItemStack> inv = this.getProxy().getStorage().getInventory(
AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
final IMEMonitor<IAEItemStack> inv = this.getProxy()
.getStorage()
.getInventory(
AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
final IAEItemStack out = inv.injectItems( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createStack( stack ),
Actionable.SIMULATE,
@@ -128,18 +130,11 @@ public class PartImportBus extends PartSharedItemBus implements IInventoryDestin
@Override
public boolean onPartActivate( final EntityPlayer player, final EnumHand hand, final Vec3d pos )
{
if( !player.isSneaking() )
if( Platform.isServer() )
{
if( Platform.isClient() )
{
return true;
}
Platform.openGUI( player, this.getHost().getTile(), this.getSide(), GuiBridge.GUI_BUS );
return true;
}
return false;
return true;
}
@Override
@@ -173,8 +168,10 @@ public class PartImportBus extends PartSharedItemBus implements IInventoryDestin
{
this.itemsToSend = this.calculateItemsToSend();
final IMEMonitor<IAEItemStack> inv = this.getProxy().getStorage().getInventory(
AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
final IMEMonitor<IAEItemStack> inv = this.getProxy()
.getStorage()
.getInventory(
AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
final IEnergyGrid energy = this.getProxy().getEnergy();
boolean Configured = false;