1.12.2 backports

This commit is contained in:
raoulvdberge
2020-04-26 12:36:13 +02:00
parent 6724969c1b
commit b0d86b2e11
2 changed files with 20 additions and 14 deletions

View File

@@ -58,10 +58,24 @@ public abstract class BaseContainer extends Container {
}
protected void addPlayerInventory(int xInventory, int yInventory) {
int id = 0;
int disabledSlotNumber = getDisabledSlotNumber();
int id = 9;
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 9; x++) {
if (id == disabledSlotNumber) {
addSlot(new LegacyDisabledSlot(player.inventory, id, xInventory + x * 18, yInventory + y * 18));
} else {
addSlot(new Slot(player.inventory, id, xInventory + x * 18, yInventory + y * 18));
}
id++;
}
}
id = 0;
for (int i = 0; i < 9; i++) {
int x = xInventory + i * 18;
int y = yInventory + 4 + (3 * 18);
@@ -74,18 +88,6 @@ public abstract class BaseContainer extends Container {
id++;
}
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 9; x++) {
if (id == disabledSlotNumber) {
addSlot(new LegacyDisabledSlot(player.inventory, id, xInventory + x * 18, yInventory + y * 18));
} else {
addSlot(new Slot(player.inventory, id, xInventory + x * 18, yInventory + y * 18));
}
id++;
}
}
}
public List<FluidFilterSlot> getFluidSlots() {