Update patches to latest 1.21.4 #1

Merged
Chaoscaot merged 242 commits from update/1.21.4 into main 2025-04-23 22:27:11 +02:00
Showing only changes of commit 93b6829e83 - Show all commits

View File

@@ -50,12 +50,12 @@ public class CraftInventoryAbstractHorse extends CraftInventory implements Abstr
@Override @Override
public int getSize() { public int getSize() {
return this.getMainInventory().getContainerSize() + this.getArmorInventory().getContainerSize(); return this.getMainInventory().getContainerSize() + this.getArmorInventory().getContainerSize() + this.getSaddleInventory().getContainerSize();
} }
@Override @Override
public boolean isEmpty() { public boolean isEmpty() {
return this.getMainInventory().isEmpty() && this.getArmorInventory().isEmpty(); return this.getMainInventory().isEmpty() && this.getArmorInventory().isEmpty() && this.getSaddleInventory().isEmpty();
} }
@Override @Override
@@ -116,8 +116,10 @@ public class CraftInventoryAbstractHorse extends CraftInventory implements Abstr
if (index > HorseInventoryMenu.SLOT_BODY_ARMOR) { if (index > HorseInventoryMenu.SLOT_BODY_ARMOR) {
shiftedIndex--; shiftedIndex--;
} }
if (index > HorseInventoryMenu.SLOT_SADDLE) {
shiftedIndex--;
}
this.getMainInventory().setItem(shiftedIndex, CraftItemStack.asNMSCopy(item)); this.getMainInventory().setItem(shiftedIndex, CraftItemStack.asNMSCopy(item));
} }
} }
// Paper end - combine both horse inventories
} }