diff options
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/world/level/block/DropExperienceBlock.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower/net/minecraft/world/level/block/DropExperienceBlock.java.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/world/level/block/DropExperienceBlock.java.patch b/patch-remap/mache-spigotflower/net/minecraft/world/level/block/DropExperienceBlock.java.patch new file mode 100644 index 0000000000..85e299f3ef --- /dev/null +++ b/patch-remap/mache-spigotflower/net/minecraft/world/level/block/DropExperienceBlock.java.patch @@ -0,0 +1,46 @@ +--- a/net/minecraft/world/level/block/DropExperienceBlock.java ++++ b/net/minecraft/world/level/block/DropExperienceBlock.java +@@ -7,7 +7,7 @@ + import net.minecraft.util.valueproviders.IntProvider; + import net.minecraft.world.item.ItemStack; + import net.minecraft.world.level.block.state.BlockBehaviour; +-import net.minecraft.world.level.block.state.BlockState; ++import net.minecraft.world.level.block.state.IBlockData; + + public class DropExperienceBlock extends Block { + +@@ -19,23 +19,28 @@ + private final IntProvider xpRange; + + @Override +- @Override + public MapCodec<? extends DropExperienceBlock> codec() { + return DropExperienceBlock.CODEC; + } + +- public DropExperienceBlock(IntProvider intprovider, BlockBehaviour.Properties blockbehaviour_properties) { +- super(blockbehaviour_properties); ++ public DropExperienceBlock(IntProvider intprovider, BlockBehaviour.Properties blockbase_info) { ++ super(blockbase_info); + this.xpRange = intprovider; + } + + @Override ++ public void spawnAfterBreak(IBlockData state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) { ++ super.spawnAfterBreak(state, level, pos, stack, dropExperience); ++ // CraftBukkit start - Delegate to getExpDrop ++ } ++ + @Override +- public void spawnAfterBreak(BlockState blockstate, ServerLevel serverlevel, BlockPos blockpos, ItemStack itemstack, boolean flag) { +- super.spawnAfterBreak(blockstate, serverlevel, blockpos, itemstack, flag); ++ public int getExpDrop(IBlockData iblockdata, ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, boolean flag) { + if (flag) { +- this.tryDropExperience(serverlevel, blockpos, itemstack, this.xpRange); ++ return this.tryDropExperience(worldserver, blockposition, itemstack, this.xpRange); + } + ++ return 0; ++ // CraftBukkit end + } + } |