fix craftables not working when wireless terminal not being held
remove wrong imports add missing lang entries
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ aebuild=7
|
|||||||
aegroup=appeng
|
aegroup=appeng
|
||||||
aebasename=appliedenergistics2
|
aebasename=appliedenergistics2
|
||||||
extended=extended_life
|
extended=extended_life
|
||||||
extendedversion=v0.55.1
|
extendedversion=v0.55.2
|
||||||
#########################################################
|
#########################################################
|
||||||
# Versions #
|
# Versions #
|
||||||
#########################################################
|
#########################################################
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import static appeng.client.ClientHelper.KEY_CATEGORY;
|
|||||||
|
|
||||||
|
|
||||||
public enum KeyBindings {
|
public enum KeyBindings {
|
||||||
WT(new KeyBinding("open_wireless_terminal", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_T, KEY_CATEGORY)),
|
WT(new KeyBinding("key.open_wireless_terminal.desc", 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)),
|
WCT(new KeyBinding("key.open_wireless_crafting_terminal.desc", 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)),
|
WPT(new KeyBinding("key.open_wireless_pattern_terminal.desc", 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));
|
WFT(new KeyBinding("key.open_wireless_fluid_terminal.desc", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_F, KEY_CATEGORY));
|
||||||
|
|
||||||
private KeyBinding keyBinding;
|
private KeyBinding keyBinding;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import appeng.fluids.items.FluidDummyItem;
|
|||||||
import appeng.fluids.util.AEFluidStack;
|
import appeng.fluids.util.AEFluidStack;
|
||||||
import appeng.util.ReadableNumberConverter;
|
import appeng.util.ReadableNumberConverter;
|
||||||
import appeng.util.item.AEItemStack;
|
import appeng.util.item.AEItemStack;
|
||||||
import li.cil.repack.org.luaj.vm2.ast.Str;
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.fluids.FluidUtil;
|
import net.minecraftforge.fluids.FluidUtil;
|
||||||
|
|||||||
@@ -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) {
|
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 AEPartLocation side = AEPartLocation.fromOrdinal(ordinal & 0x07);
|
||||||
final GuiBridge ID = values()[ordinal >> 4];
|
final GuiBridge ID = values()[ordinal >> 4];
|
||||||
final boolean stem = ((ordinal >> 3) & 1) == 1;
|
|
||||||
if (ID.type.isItem()) {
|
if (ID.type.isItem()) {
|
||||||
ItemStack it = ItemStack.EMPTY;
|
ItemStack it = ItemStack.EMPTY;
|
||||||
if (y == 0) {
|
if (y == 0) {
|
||||||
if (stem) {
|
if (x >= 0 && x < player.inventory.mainInventory.size()) {
|
||||||
it = player.inventory.getCurrentItem();
|
|
||||||
} else if (x >= 0 && x < player.inventory.mainInventory.size()) {
|
|
||||||
it = player.inventory.getStackInSlot(x);
|
it = player.inventory.getStackInSlot(x);
|
||||||
}
|
}
|
||||||
} else if (y == 1 && z == Integer.MIN_VALUE) {
|
} else if (y == 1 && z == Integer.MIN_VALUE) {
|
||||||
if (stem) {
|
it = BaublesApi.getBaublesHandler(player).getStackInSlot(x);
|
||||||
if (player.openContainer instanceof IInventorySlotAware) {
|
|
||||||
int slot = ((IInventorySlotAware) player.openContainer).getInventorySlot();
|
|
||||||
it = BaublesApi.getBaublesHandler(player).getStackInSlot(slot);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
it = BaublesApi.getBaublesHandler(player).getStackInSlot(x);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
final Object myItem = this.getGuiObject(it, player, w, x, y, z);
|
final Object myItem = this.getGuiObject(it, player, w, x, y, z);
|
||||||
if (myItem != null && ID.CorrectTileOrPart(myItem)) {
|
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) {
|
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 AEPartLocation side = AEPartLocation.fromOrdinal(ordinal & 0x07);
|
||||||
final GuiBridge ID = values()[ordinal >> 4];
|
final GuiBridge ID = values()[ordinal >> 4];
|
||||||
final boolean stem = ((ordinal >> 3) & 1) == 1;
|
|
||||||
if (ID.type.isItem()) {
|
if (ID.type.isItem()) {
|
||||||
ItemStack it = ItemStack.EMPTY;
|
ItemStack it = ItemStack.EMPTY;
|
||||||
if (y == 0) {
|
if (y == 0) {
|
||||||
if (stem) {
|
if (x >= 0 && x < player.inventory.mainInventory.size()) {
|
||||||
it = player.inventory.getCurrentItem();
|
|
||||||
} else if (x >= 0 && x < player.inventory.mainInventory.size()) {
|
|
||||||
it = player.inventory.getStackInSlot(x);
|
it = player.inventory.getStackInSlot(x);
|
||||||
}
|
}
|
||||||
} else if (y == 1 && z == Integer.MIN_VALUE) {
|
}
|
||||||
if (stem) {
|
if (y == 1 && z == Integer.MIN_VALUE) {
|
||||||
if (player.openContainer instanceof IInventorySlotAware) {
|
it = BaublesApi.getBaublesHandler(player).getStackInSlot(x);
|
||||||
int slot = ((IInventorySlotAware) player.openContainer).getInventorySlot();
|
|
||||||
it = BaublesApi.getBaublesHandler(player).getStackInSlot(slot);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
it = BaublesApi.getBaublesHandler(player).getStackInSlot(x);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
final Object myItem = this.getGuiObject(it, player, w, x, y, z);
|
final Object myItem = this.getGuiObject(it, player, w, x, y, z);
|
||||||
if (myItem != null && ID.CorrectTileOrPart(myItem)) {
|
if (myItem != null && ID.CorrectTileOrPart(myItem)) {
|
||||||
|
|||||||
@@ -331,13 +331,20 @@ public class Platform {
|
|||||||
x = tile.getPos().getX();
|
x = tile.getPos().getX();
|
||||||
y = tile.getPos().getY();
|
y = tile.getPos().getY();
|
||||||
z = tile.getPos().getZ();
|
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 ((type.getType().isItem() && tile == null) || type.hasPermissions(tile, x, y, z, side, p)) {
|
||||||
if (tile == null && type.getType() == GuiHostType.ITEM) {
|
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) {
|
} 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 {
|
} else {
|
||||||
p.openGui(AppEng.instance(), type.ordinal() << 4 | (side.ordinal()), tile.getWorld(), x, y, z);
|
p.openGui(AppEng.instance(), type.ordinal() << 4 | (side.ordinal()), tile.getWorld(), x, y, z);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -668,3 +668,7 @@ stat.ae2.TurnedCranks=Turned Cranks
|
|||||||
//Keys
|
//Keys
|
||||||
key.appliedenergistics2.category=Applied Energistics 2
|
key.appliedenergistics2.category=Applied Energistics 2
|
||||||
key.toggle_focus.desc=Toggle search box focus
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user