fix fluid slots offsets

This commit is contained in:
PrototypeTrousers
2022-10-10 20:02:22 -03:00
parent 63dd035c85
commit 024b5c6503
3 changed files with 4 additions and 7 deletions
@@ -203,7 +203,6 @@ public class GuiFluidInterfaceConfigurationTerminal extends AEBaseGui implements
if (slot instanceof GuiFluidTank) { if (slot instanceof GuiFluidTank) {
if (this.isPointInRegion(slot.xPos(), slot.yPos(), slot.getWidth(), slot.getHeight(), xCoord, yCoord) && slot.canClick(this.mc.player)) { if (this.isPointInRegion(slot.xPos(), slot.yPos(), slot.getWidth(), slot.getHeight(), xCoord, yCoord) && slot.canClick(this.mc.player)) {
NetworkHandler.instance().sendToServer(new PacketInventoryAction(InventoryAction.PICKUP_OR_SET_DOWN, slot.getId(), guiFluidTankClientDCInternalFluidInvMap.get(slot).getId())); NetworkHandler.instance().sendToServer(new PacketInventoryAction(InventoryAction.PICKUP_OR_SET_DOWN, slot.getId(), guiFluidTankClientDCInternalFluidInvMap.get(slot).getId()));
return; return;
} }
} }
@@ -63,7 +63,7 @@ public class GuiFluidInterface extends GuiUpgradeable implements IConfigManagerH
final IAEFluidTank fluidTank = this.host.getDualityFluidInterface().getTanks(); final IAEFluidTank fluidTank = this.host.getDualityFluidInterface().getTanks();
for (int i = 0; i < DualityFluidInterface.NUMBER_OF_TANKS; ++i) { for (int i = 0; i < DualityFluidInterface.NUMBER_OF_TANKS; ++i) {
this.guiSlots.add(new GuiFluidTank(fluidTank, i, DualityFluidInterface.NUMBER_OF_TANKS + i, 36 + 18 * i, 57, 16, 64)); this.guiSlots.add(new GuiFluidTank(fluidTank, i, DualityFluidInterface.NUMBER_OF_TANKS + i, 35 + 18 * i, 53, 16, 68));
this.guiSlots.add(new GuiFluidSlot(configFluids, i, i, 35 + 18 * i, 35)); this.guiSlots.add(new GuiFluidSlot(configFluids, i, i, 35 + 18 * i, 35));
} }
@@ -96,12 +96,12 @@ public class GuiFluidTank extends GuiCustomSlot implements ITooltip {
@Override @Override
public int xPos() { public int xPos() {
return this.x - 1; return this.x;
} }
@Override @Override
public int yPos() { public int yPos() {
return this.y - 4; return this.y;
} }
@Override @Override
@@ -111,7 +111,7 @@ public class GuiFluidTank extends GuiCustomSlot implements ITooltip {
@Override @Override
public int getHeight() { public int getHeight() {
return this.height + 4; return this.height;
} }
@Override @Override
@@ -125,13 +125,11 @@ public class GuiFluidTank extends GuiCustomSlot implements ITooltip {
@Override @Override
public void slotClicked(ItemStack clickStack, final int mouseButton) { public void slotClicked(ItemStack clickStack, final int mouseButton) {
if (getFluidStack() != null) { if (getFluidStack() != null) {
NetworkHandler.instance().sendToServer(new PacketInventoryAction(InventoryAction.FILL_ITEM, slot, id)); NetworkHandler.instance().sendToServer(new PacketInventoryAction(InventoryAction.FILL_ITEM, slot, id));
} else { } else {
NetworkHandler.instance().sendToServer(new PacketInventoryAction(InventoryAction.EMPTY_ITEM, slot, id)); NetworkHandler.instance().sendToServer(new PacketInventoryAction(InventoryAction.EMPTY_ITEM, slot, id));
} }
} }
} }