Fixed Bug: #0431 - Weird Inventory behaviour in SkyChests with InvTweaks
This commit is contained in:
+24
-16
@@ -190,26 +190,29 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
|
|
||||||
if ( Keyboard.isKeyDown( Keyboard.KEY_SPACE ) )
|
if ( Keyboard.isKeyDown( Keyboard.KEY_SPACE ) )
|
||||||
{
|
{
|
||||||
IAEItemStack stack = null;
|
if ( enableSpaceClicking() )
|
||||||
if ( slot instanceof SlotME )
|
|
||||||
stack = ((SlotME) slot).getAEStack();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
int slotNum = inventorySlots.inventorySlots.size();
|
IAEItemStack stack = null;
|
||||||
|
if ( slot instanceof SlotME )
|
||||||
|
stack = ((SlotME) slot).getAEStack();
|
||||||
|
|
||||||
if ( !(slot instanceof SlotME) && slot != null )
|
try
|
||||||
slotNum = slot.slotNumber;
|
{
|
||||||
|
int slotNum = inventorySlots.inventorySlots.size();
|
||||||
|
|
||||||
((AEBaseContainer) inventorySlots).setTargetStack( stack );
|
if ( !(slot instanceof SlotME) && slot != null )
|
||||||
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, null );
|
slotNum = slot.slotNumber;
|
||||||
NetworkHandler.instance.sendToServer( p );
|
|
||||||
|
((AEBaseContainer) inventorySlots).setTargetStack( stack );
|
||||||
|
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, null );
|
||||||
|
NetworkHandler.instance.sendToServer( p );
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
AELog.error( e );
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( slot instanceof SlotME )
|
if ( slot instanceof SlotME )
|
||||||
@@ -265,6 +268,11 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
super.handleMouseClick( slot, slotIdx, ctrlDown, key );
|
super.handleMouseClick( slot, slotIdx, ctrlDown, key );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean enableSpaceClicking()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean checkHotbarKeys(int p_146983_1_)
|
protected boolean checkHotbarKeys(int p_146983_1_)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package appeng.client.gui.implementations;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import appeng.client.gui.AEBaseGui;
|
import appeng.client.gui.AEBaseGui;
|
||||||
import appeng.container.implementations.ContainerSkyChest;
|
import appeng.container.implementations.ContainerSkyChest;
|
||||||
|
import appeng.core.AppEng;
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.tile.storage.TileSkyChest;
|
import appeng.tile.storage.TileSkyChest;
|
||||||
|
|
||||||
@@ -28,4 +29,10 @@ public class GuiSkyChest extends AEBaseGui
|
|||||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 2, 4210752 );
|
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 2, 4210752 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean enableSpaceClicking()
|
||||||
|
{
|
||||||
|
return !AppEng.instance.isIntegrationEnabled( "InvTweaks" );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,20 +4,19 @@ import invtweaks.api.InvTweaksAPI;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import appeng.integration.BaseModule;
|
import appeng.integration.BaseModule;
|
||||||
import appeng.integration.abstraction.IInvTweaks;
|
import appeng.integration.abstraction.IInvTweaks;
|
||||||
import cpw.mods.fml.common.Mod.Instance;
|
import cpw.mods.fml.common.Loader;
|
||||||
|
|
||||||
public class InvTweaks extends BaseModule implements IInvTweaks
|
public class InvTweaks extends BaseModule implements IInvTweaks
|
||||||
{
|
{
|
||||||
|
|
||||||
public static InvTweaks instance;
|
public static InvTweaks instance;
|
||||||
|
|
||||||
@Instance("inventorytweaks")
|
|
||||||
static InvTweaksAPI api;
|
static InvTweaksAPI api;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void Init()
|
public void Init()
|
||||||
{
|
{
|
||||||
|
api = (InvTweaksAPI) Loader.instance().getIndexedModList().get( "inventorytweaks" ).getMod();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ public class ASMIntegration implements IClassTransformer
|
|||||||
// integrationModules.add( IntegrationSide.BOTH, "Greg Tech", "gregtech_addon", "GT" );
|
// integrationModules.add( IntegrationSide.BOTH, "Greg Tech", "gregtech_addon", "GT" );
|
||||||
// integrationModules.add( IntegrationSide.BOTH, "Universal Electricity", null, "UE" );
|
// integrationModules.add( IntegrationSide.BOTH, "Universal Electricity", null, "UE" );
|
||||||
// integrationModules.add( IntegrationSide.BOTH, "Logistics Pipes", "LogisticsPipes|Main", "LP" );
|
// integrationModules.add( IntegrationSide.BOTH, "Logistics Pipes", "LogisticsPipes|Main", "LP" );
|
||||||
integrationModules.add( IntegrationSide.CLIENT, "Inventory Tweaks", "", "InvTweaks" );
|
|
||||||
integrationModules.add( IntegrationSide.BOTH, "Mine Factory Reloaded", "MineFactoryReloaded", "MFR" );
|
integrationModules.add( IntegrationSide.BOTH, "Mine Factory Reloaded", "MineFactoryReloaded", "MFR" );
|
||||||
integrationModules.add( IntegrationSide.BOTH, "Deep Storage Unit", null, "DSU" );
|
integrationModules.add( IntegrationSide.BOTH, "Deep Storage Unit", null, "DSU" );
|
||||||
// integrationModules.add( IntegrationSide.BOTH, "Better Storage", "betterstorage" );
|
// integrationModules.add( IntegrationSide.BOTH, "Better Storage", "betterstorage" );
|
||||||
|
|||||||
Reference in New Issue
Block a user