fix craftables not working when wireless terminal not being held

remove wrong imports
add missing lang entries
This commit is contained in:
PrototypeTrousers
2023-02-08 12:14:13 -03:00
parent 854676a33c
commit 96ab73001b
6 changed files with 24 additions and 33 deletions
+9 -2
View File
@@ -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);
}