3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-16 19:40:07 +01:00
Paper/Remapped-Spigot-Server-Patches/0259-MC-135506-Experience-should-save-as-Integers.patch
2021-06-11 13:56:17 +02:00

29 Zeilen
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
}