PaperMC/nms-patches/BlockMobSpawner.patch

23 lines
827 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
2018-07-15 02:00:00 +02:00
@@ -16,9 +16,19 @@
2018-07-15 02:00:00 +02:00
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
2018-07-15 02:00:00 +02:00
+ 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
}
2018-07-15 02:00:00 +02:00
public EnumRenderType c(IBlockData iblockdata) {