diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ExperienceOrb.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ExperienceOrb.java.patch index 518bfe547b..6af717c0bb 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/ExperienceOrb.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/ExperienceOrb.java.patch @@ -159,17 +159,22 @@ } return true; -@@ -228,6 +313,7 @@ +@@ -226,33 +311,35 @@ + public void addAdditionalSaveData(CompoundTag nbt) { + nbt.putShort("Health", (short) this.health); nbt.putShort("Age", (short) this.age); - nbt.putShort("Value", (short) this.value); +- nbt.putShort("Value", (short) this.value); ++ nbt.putInt("Value", this.value); // Paper - save as Integer nbt.putInt("Count", this.count); + this.savePaperNBT(nbt); // Paper } @Override -@@ -236,23 +322,24 @@ + public void readAdditionalSaveData(CompoundTag nbt) { + this.health = nbt.getShort("Health"); this.age = nbt.getShort("Age"); - this.value = nbt.getShort("Value"); +- 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 } diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/allay/Allay.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/allay/Allay.java.patch index 8428a6cf72..8c853dc764 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/animal/allay/Allay.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/allay/Allay.java.patch @@ -8,19 +8,19 @@ public Allay(EntityType type, Level world) { super(type, world); -@@ -113,6 +114,12 @@ - this.dynamicVibrationListener = new DynamicGameEventListener<>(new VibrationSystem.Listener(this)); +@@ -114,6 +115,12 @@ this.dynamicJukeboxListener = new DynamicGameEventListener<>(new Allay.JukeboxListener(this.vibrationUser.getPositionSource(), ((GameEvent) GameEvent.JUKEBOX_PLAY.value()).notificationRadius())); } -+ + + // CraftBukkit start + public void setCanDuplicate(boolean canDuplicate) { + this.entityData.set(Allay.DATA_CAN_DUPLICATE, canDuplicate); + } + // CraftBukkit end - ++ @Override protected Brain.Provider brainProvider() { + return Brain.provider(Allay.MEMORY_TYPES, Allay.SENSOR_TYPES); @@ -126,7 +133,7 @@ @Override @@ -70,6 +70,15 @@ return this.jukeboxPos == null || !this.jukeboxPos.closerToCenterThan(this.position(), (double) ((GameEvent) GameEvent.JUKEBOX_PLAY.value()).notificationRadius()) || !this.level().getBlockState(this.jukeboxPos).is(Blocks.JUKEBOX); } +@@ -486,7 +499,7 @@ + }); + } + +- this.duplicationCooldown = (long) nbt.getInt("DuplicationCooldown"); ++ this.duplicationCooldown = nbt.getLong("DuplicationCooldown"); // Paper - Load as long + this.entityData.set(Allay.DATA_CAN_DUPLICATE, nbt.getBoolean("CanDuplicate")); + } + @@ -506,7 +519,7 @@ }