aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0243-MC-135506-Experience-should-save-as-Integers.patch
blob: 8248a48e4a38e373e9cbacd6005647bd5ddef19d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 80f4dfdbc410aa3346897e2ca63272a081712b6e..d6527396939d9a1dd2f1cfb6cb66dc64fa0e5332 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
@@ -286,7 +286,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
     }
@@ -295,7 +295,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
     }