Paper/nms-patches/BlockMobSpawner.patch

23 lines
870 B
Diff
Raw Normal View History

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/BlockMobSpawner.java
+++ b/net/minecraft/server/BlockMobSpawner.java
2019-04-23 04:00:00 +02:00
@@ -14,9 +14,19 @@
@Override
2020-08-11 23:00:00 +02:00
public void dropNaturally(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) {
super.dropNaturally(iblockdata, worldserver, blockposition, itemstack);
+ /* CraftBukkit start - Delegate to getExpDrop
2020-08-11 23:00:00 +02:00
int i = 15 + worldserver.random.nextInt(15) + worldserver.random.nextInt(15);
2020-08-11 23:00:00 +02:00
this.dropExperience(worldserver, blockposition, i);
+ */
+ }
+
+ @Override
2020-08-11 23:00:00 +02:00
+ public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) {
+ int i = 15 + worldserver.random.nextInt(15) + worldserver.random.nextInt(15);
+
2019-04-23 04:00:00 +02:00
+ return i;
+ // CraftBukkit end
}
2019-04-23 04:00:00 +02:00
@Override