GUI/Container fixes Ugh

This commit is contained in:
PrototypeTrousers
2023-02-02 18:22:20 -03:00
parent 17c38a6418
commit 0e797b2120
13 changed files with 103 additions and 36 deletions
+11 -3
View File
@@ -43,6 +43,7 @@ import appeng.container.AEBaseContainer;
import appeng.container.ContainerNull;
import appeng.container.ContainerOpenContext;
import appeng.container.implementations.*;
import appeng.container.interfaces.IInventorySlotAware;
import appeng.fluids.container.*;
import appeng.fluids.helper.IFluidInterfaceHost;
import appeng.fluids.parts.PartFluidFormationPlane;
@@ -243,10 +244,10 @@ public enum GuiBridge implements IGuiHandler {
} else {
if (stem) {
if (player.openContainer instanceof IInventorySlotAware) {
int slot = ((IInventorySlotAware)player.openContainer).getInventorySlot();
int slot = ((IInventorySlotAware) player.openContainer).getInventorySlot();
it = BaublesApi.getBaublesHandler(player).getStackInSlot(slot);
}
}else {
} else {
it = BaublesApi.getBaublesHandler(player).getStackInSlot(x);
}
}
@@ -363,7 +364,14 @@ public enum GuiBridge implements IGuiHandler {
it = player.inventory.getStackInSlot(x);
}
} else {
it = BaublesApi.getBaublesHandler(player).getStackInSlot(x);
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);
}
}
final Object myItem = this.getGuiObject(it, player, w, x, y, z);
if (myItem != null && ID.CorrectTileOrPart(myItem)) {