From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 3 Aug 2018 00:04:54 -0400 Subject: [PATCH] MC-135506: Experience should save as Integers diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java index 628407ad2f8fd01850dd4f9e25799bcd6a93961d..1947905e1e7e0208ad79f521cae8973c31c4eac1 100644 --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java @@ -283,7 +283,7 @@ public class ExperienceOrb extends Entity { public void addAdditionalSaveData(CompoundTag nbt) { nbt.putShort("Health", (short) this.health); nbt.putShort("Age", (short) this.age); - nbt.putShort("Value", (short) this.value); + nbt.putInt("Value", this.value); // Paper - save as Integer nbt.putInt("Count", this.count); this.savePaperNBT(nbt); // Paper } @@ -292,7 +292,7 @@ public class ExperienceOrb extends Entity { public void readAdditionalSaveData(CompoundTag nbt) { this.health = nbt.getShort("Health"); this.age = nbt.getShort("Age"); - this.value = nbt.getShort("Value"); + this.value = nbt.getInt("Value"); // Paper - load as Integer this.count = Math.max(nbt.getInt("Count"), 1); this.loadPaperNBT(nbt); // Paper }