diff options
author | Tamion <[email protected]> | 2023-11-04 21:20:13 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-11-04 13:20:13 -0700 |
commit | bffb08c2f99a5527b7357d005cb10ba21cf048d9 (patch) | |
tree | c25ad5490b0ede8ce30bc0f23b5e0255eecc0dbc /patches/server/0752-Fix-xp-reward-for-baby-zombies.patch | |
parent | 6592fed511ee2ea17de9e05463579bd1923cf8aa (diff) | |
download | Paper-bffb08c2f99a5527b7357d005cb10ba21cf048d9.tar.gz Paper-bffb08c2f99a5527b7357d005cb10ba21cf048d9.zip |
Deprecate Player#boostElytra (#9899)
The Paper method was chosen for deprecation because it was more
restrictive in that it has an isGliding check.
Diffstat (limited to 'patches/server/0752-Fix-xp-reward-for-baby-zombies.patch')
-rw-r--r-- | patches/server/0752-Fix-xp-reward-for-baby-zombies.patch | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/patches/server/0752-Fix-xp-reward-for-baby-zombies.patch b/patches/server/0752-Fix-xp-reward-for-baby-zombies.patch deleted file mode 100644 index a8293675b5..0000000000 --- a/patches/server/0752-Fix-xp-reward-for-baby-zombies.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jake Potrebic <[email protected]> -Date: Sun, 16 Jan 2022 10:34:02 -0800 -Subject: [PATCH] Fix xp reward for baby zombies - -The field that tracks the xpReward was not -getting reset if the death was cancelled -so this resets it after each call to -Zombie#getExperienceReward - -diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index bcf31d0b784241b4f2b71bced4a431763d538a69..5fdad1600cc7a7c22d1d9a58b6b2dda605521b97 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java -+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -@@ -175,11 +175,16 @@ public class Zombie extends Monster { - - @Override - public int getExperienceReward() { -+ final int previousReward = this.xpReward; // Paper - store previous value to reset after calculating XP reward - if (this.isBaby()) { - this.xpReward = (int) ((double) this.xpReward * 2.5D); - } - -- return super.getExperienceReward(); -+ // Paper start - only change the XP reward for the calculations in the super method -+ int reward = super.getExperienceReward(); -+ this.xpReward = previousReward; -+ return reward; -+ // Paper end - } - - @Override |