PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/BlockMobSpawner.patch
CraftBukkit/Spigot b3a8254758 Update to Minecraft 1.17
By: md_5 <git@md-5.net>
2021-06-11 15:00:00 +10:00

22 lines
892 B
Diff

--- a/net/minecraft/world/level/block/BlockMobSpawner.java
+++ b/net/minecraft/world/level/block/BlockMobSpawner.java
@@ -33,9 +33,19 @@
@Override
public void dropNaturally(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) {
super.dropNaturally(iblockdata, worldserver, blockposition, itemstack);
+ /* CraftBukkit start - Delegate to getExpDrop
int i = 15 + worldserver.random.nextInt(15) + worldserver.random.nextInt(15);
this.dropExperience(worldserver, blockposition, i);
+ */
+ }
+
+ @Override
+ public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) {
+ int i = 15 + worldserver.random.nextInt(15) + worldserver.random.nextInt(15);
+
+ return i;
+ // CraftBukkit end
}
@Override