aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/SpawnerBlock.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/SpawnerBlock.java.patch')
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/SpawnerBlock.java.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/SpawnerBlock.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/SpawnerBlock.java.patch
new file mode 100644
index 0000000000..d63a95061e
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/SpawnerBlock.java.patch
@@ -0,0 +1,26 @@
+--- a/net/minecraft/world/level/block/SpawnerBlock.java
++++ b/net/minecraft/world/level/block/SpawnerBlock.java
+@@ -46,10 +45,20 @@
+ @Override
+ public void spawnAfterBreak(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) {
+ super.spawnAfterBreak(state, level, pos, stack, dropExperience);
+- if (dropExperience) {
+- int i = 15 + level.random.nextInt(15) + level.random.nextInt(15);
+- this.popExperience(level, pos, i);
++ // CraftBukkit start - Delegate to getExpDrop
++ }
++
++ @Override
++ public int getExpDrop(IBlockData iblockdata, ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, boolean flag) {
++ if (flag) {
++ int i = 15 + worldserver.random.nextInt(15) + worldserver.random.nextInt(15);
++
++ // this.popExperience(worldserver, blockposition, i);
++ return i;
+ }
++
++ return 0;
++ // CraftBukkit end
+ }
+
+ @Override