PaperMC/patches/server-remapped/0261-MC-135506-Experience-should-save-as-Integers.patch
Mariell Hoversholm a207d14a0e
Rename all patches to correct numbering scheme
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 15:46:44 +02:00

28 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
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 52b90ef3a145325209d3d903a2b7c9a44c332cbe..37758cff3c4a8406c2f1496ae827ecdc953cf9f4 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
@@ -217,7 +217,7 @@ public class ExperienceOrb extends Entity {
public void addAdditionalSaveData(CompoundTag tag) {
tag.putShort("Health", (short) this.health);
tag.putShort("Age", (short) this.age);
- tag.putShort("Value", (short) this.value);
+ tag.putInt("Value", this.value); // Paper - save as Integer
this.savePaperNBT(tag); // Paper
}
@@ -225,7 +225,7 @@ public class ExperienceOrb extends Entity {
public void readAdditionalSaveData(CompoundTag tag) {
this.health = tag.getShort("Health");
this.age = tag.getShort("Age");
- this.value = tag.getShort("Value");
+ this.value = tag.getInt("Value"); // Paper - load as Integer
this.loadPaperNBT(tag); // Paper
}