summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockMobSpawner.patch
blob: 2b95d6b1dbf5ee5c29d9b1f70ff78280603a641c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- a/net/minecraft/server/BlockMobSpawner.java
+++ b/net/minecraft/server/BlockMobSpawner.java
@@ -16,9 +16,19 @@
 
     public void dropNaturally(IBlockData iblockdata, World world, BlockPosition blockposition, float f, int i) {
         super.dropNaturally(iblockdata, world, blockposition, f, i);
+        /* CraftBukkit start - Delegate to getExpDrop
         int j = 15 + world.random.nextInt(15) + world.random.nextInt(15);
 
         this.dropExperience(world, blockposition, j);
+        */
+    }
+
+    @Override
+    public int getExpDrop(IBlockData iblockdata, World world, BlockPosition blockposition, int enchantmentLevel) {
+        int j = 15 + world.random.nextInt(15) + world.random.nextInt(15);
+
+        return j;
+        // CraftBukkit end
     }
 
     public EnumRenderType c(IBlockData iblockdata) {