3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-27 08:30:12 +01:00

Fix offset issue

Dieser Commit ist enthalten in:
Camotoy 2020-12-26 13:24:50 -05:00
Ursprung c1f5380ed1
Commit 06f346b30b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F

Datei anzeigen

@ -66,7 +66,7 @@ public abstract class ChestedHorseInventoryTranslator extends AbstractHorseInven
if (slot == this.equipSlot) { if (slot == this.equipSlot) {
return new BedrockContainerSlot(ContainerSlotType.HORSE_EQUIP, 0); return new BedrockContainerSlot(ContainerSlotType.HORSE_EQUIP, 0);
} }
if (slot <= this.size) { if (slot <= this.size - 1) { // Accommodate for the lack of one slot (saddle or armor)
return new BedrockContainerSlot(ContainerSlotType.CONTAINER, slot - 1); return new BedrockContainerSlot(ContainerSlotType.CONTAINER, slot - 1);
} }
return super.javaSlotToBedrockContainer(slot); return super.javaSlotToBedrockContainer(slot);
@ -77,7 +77,7 @@ public abstract class ChestedHorseInventoryTranslator extends AbstractHorseInven
if (slot == 0 && this.equipSlot == 0) { if (slot == 0 && this.equipSlot == 0) {
return 0; return 0;
} }
if (slot <= this.size) { if (slot <= this.size - 1) {
return slot - 1; return slot - 1;
} }
return super.javaSlotToBedrock(slot); return super.javaSlotToBedrock(slot);