3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-21 05:50:05 +01:00
Paper/nms-patches/BlockMobSpawner.patch
2020-08-12 07:00:00 +10:00

23 Zeilen
870 B
Diff

--- a/net/minecraft/server/BlockMobSpawner.java
+++ b/net/minecraft/server/BlockMobSpawner.java
@@ -14,9 +14,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