diff --git a/gradle.properties b/gradle.properties index 6b0246cda..7cb1c0690 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ aebuild=7 aegroup=appeng aebasename=appliedenergistics2 extended=extended_life -extendedversion=v0.55.1 +extendedversion=v0.55.2 ######################################################### # Versions # ######################################################### diff --git a/src/main/java/appeng/client/KeyBindings.java b/src/main/java/appeng/client/KeyBindings.java index 6dd711313..a7e0daebe 100644 --- a/src/main/java/appeng/client/KeyBindings.java +++ b/src/main/java/appeng/client/KeyBindings.java @@ -9,10 +9,10 @@ import static appeng.client.ClientHelper.KEY_CATEGORY; public enum KeyBindings { - WT(new KeyBinding("open_wireless_terminal", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_T, KEY_CATEGORY)), - WCT(new KeyBinding("open_wireless_crafting_terminal", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_E, KEY_CATEGORY)), - WPT(new KeyBinding("open_wireless_pattern_terminal", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_R, KEY_CATEGORY)), - WFT(new KeyBinding("open_wireless_fluid_terminal", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_F, KEY_CATEGORY)); + WT(new KeyBinding("key.open_wireless_terminal.desc", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_T, KEY_CATEGORY)), + WCT(new KeyBinding("key.open_wireless_crafting_terminal.desc", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_E, KEY_CATEGORY)), + WPT(new KeyBinding("key.open_wireless_pattern_terminal.desc", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_R, KEY_CATEGORY)), + WFT(new KeyBinding("key.open_wireless_fluid_terminal.desc", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_F, KEY_CATEGORY)); private KeyBinding keyBinding; diff --git a/src/main/java/appeng/core/api/ApiClientHelper.java b/src/main/java/appeng/core/api/ApiClientHelper.java index 6d4286ab2..d2ef20cf8 100644 --- a/src/main/java/appeng/core/api/ApiClientHelper.java +++ b/src/main/java/appeng/core/api/ApiClientHelper.java @@ -16,7 +16,6 @@ import appeng.fluids.items.FluidDummyItem; import appeng.fluids.util.AEFluidStack; import appeng.util.ReadableNumberConverter; import appeng.util.item.AEItemStack; -import li.cil.repack.org.luaj.vm2.ast.Str; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidUtil; diff --git a/src/main/java/appeng/core/sync/GuiBridge.java b/src/main/java/appeng/core/sync/GuiBridge.java index 1a87a138b..e48de9eeb 100644 --- a/src/main/java/appeng/core/sync/GuiBridge.java +++ b/src/main/java/appeng/core/sync/GuiBridge.java @@ -232,24 +232,14 @@ public enum GuiBridge implements IGuiHandler { public Object getServerGuiElement(final int ordinal, final EntityPlayer player, final World w, final int x, final int y, final int z) { final AEPartLocation side = AEPartLocation.fromOrdinal(ordinal & 0x07); final GuiBridge ID = values()[ordinal >> 4]; - final boolean stem = ((ordinal >> 3) & 1) == 1; if (ID.type.isItem()) { ItemStack it = ItemStack.EMPTY; if (y == 0) { - if (stem) { - it = player.inventory.getCurrentItem(); - } else if (x >= 0 && x < player.inventory.mainInventory.size()) { + if (x >= 0 && x < player.inventory.mainInventory.size()) { it = player.inventory.getStackInSlot(x); } } else if (y == 1 && z == Integer.MIN_VALUE) { - if (stem) { - if (player.openContainer instanceof IInventorySlotAware) { - int slot = ((IInventorySlotAware) player.openContainer).getInventorySlot(); - it = BaublesApi.getBaublesHandler(player).getStackInSlot(slot); - } - } else { - it = BaublesApi.getBaublesHandler(player).getStackInSlot(x); - } + it = BaublesApi.getBaublesHandler(player).getStackInSlot(x); } final Object myItem = this.getGuiObject(it, player, w, x, y, z); if (myItem != null && ID.CorrectTileOrPart(myItem)) { @@ -354,24 +344,15 @@ public enum GuiBridge implements IGuiHandler { public Object getClientGuiElement(final int ordinal, final EntityPlayer player, final World w, final int x, final int y, final int z) { final AEPartLocation side = AEPartLocation.fromOrdinal(ordinal & 0x07); final GuiBridge ID = values()[ordinal >> 4]; - final boolean stem = ((ordinal >> 3) & 1) == 1; if (ID.type.isItem()) { ItemStack it = ItemStack.EMPTY; if (y == 0) { - if (stem) { - it = player.inventory.getCurrentItem(); - } else if (x >= 0 && x < player.inventory.mainInventory.size()) { + if (x >= 0 && x < player.inventory.mainInventory.size()) { it = player.inventory.getStackInSlot(x); } - } else if (y == 1 && z == Integer.MIN_VALUE) { - if (stem) { - if (player.openContainer instanceof IInventorySlotAware) { - int slot = ((IInventorySlotAware) player.openContainer).getInventorySlot(); - it = BaublesApi.getBaublesHandler(player).getStackInSlot(slot); - } - } else { - it = BaublesApi.getBaublesHandler(player).getStackInSlot(x); - } + } + if (y == 1 && z == Integer.MIN_VALUE) { + it = BaublesApi.getBaublesHandler(player).getStackInSlot(x); } final Object myItem = this.getGuiObject(it, player, w, x, y, z); if (myItem != null && ID.CorrectTileOrPart(myItem)) { diff --git a/src/main/java/appeng/util/Platform.java b/src/main/java/appeng/util/Platform.java index 922638dce..7188e66d6 100644 --- a/src/main/java/appeng/util/Platform.java +++ b/src/main/java/appeng/util/Platform.java @@ -331,13 +331,20 @@ public class Platform { x = tile.getPos().getX(); y = tile.getPos().getY(); z = tile.getPos().getZ(); + } else { + if (p.openContainer instanceof IInventorySlotAware) { + x = ((IInventorySlotAware) p.openContainer).getInventorySlot(); + y = ((IInventorySlotAware) p.openContainer).isBaubleSlot() ? 1 : 0; + } else { + x = p.inventory.currentItem; + } } if ((type.getType().isItem() && tile == null) || type.hasPermissions(tile, x, y, z, side, p)) { if (tile == null && type.getType() == GuiHostType.ITEM) { - p.openGui(AppEng.instance(), type.ordinal() << 4, p.getEntityWorld(), p.inventory.currentItem, 0, 0); + p.openGui(AppEng.instance(), type.ordinal() << 4, p.getEntityWorld(), x, 0, 0); } else if (tile == null || type.getType() == GuiHostType.ITEM) { - p.openGui(AppEng.instance(), type.ordinal() << 4 | (1 << 3), p.getEntityWorld(), x, y, z); + p.openGui(AppEng.instance(), type.ordinal() << 4, p.getEntityWorld(), x, y, z); } else { p.openGui(AppEng.instance(), type.ordinal() << 4 | (side.ordinal()), tile.getWorld(), x, y, z); } diff --git a/src/main/resources/assets/appliedenergistics2/lang/en_us.lang b/src/main/resources/assets/appliedenergistics2/lang/en_us.lang index 419c6a767..1146ec9e0 100644 --- a/src/main/resources/assets/appliedenergistics2/lang/en_us.lang +++ b/src/main/resources/assets/appliedenergistics2/lang/en_us.lang @@ -668,3 +668,7 @@ stat.ae2.TurnedCranks=Turned Cranks //Keys key.appliedenergistics2.category=Applied Energistics 2 key.toggle_focus.desc=Toggle search box focus +key.open_wireless_terminal.desc=Open Wireless Terminal +key.open_wireless_crafting_terminal.desc=Open Wireless Crafting Terminal +key.open_wireless_pattern_terminal.desc=Open Wireless Pattern Terminal +key.open_wireless_fluid_terminal.desc=Open Wireless Fluid Terminal