diff --git a/nms-patches/net/minecraft/world/level/Explosion.patch b/nms-patches/net/minecraft/world/level/Explosion.patch index 4974f7b1b..1e269ca6e 100644 --- a/nms-patches/net/minecraft/world/level/Explosion.patch +++ b/nms-patches/net/minecraft/world/level/Explosion.patch @@ -109,13 +109,13 @@ + float yield; + + if (explode != null) { -+ EntityExplodeEvent event = new EntityExplodeEvent(explode, location, blockList, this.blockInteraction == Explosion.Effect.DESTROY ? 1.0F / this.radius : 1.0F); ++ EntityExplodeEvent event = new EntityExplodeEvent(explode, location, blockList, this.blockInteraction == Explosion.Effect.DESTROY_WITH_DECAY ? 1.0F / this.radius : 1.0F); + this.level.getCraftServer().getPluginManager().callEvent(event); + cancelled = event.isCancelled(); + bukkitBlocks = event.blockList(); + yield = event.getYield(); + } else { -+ BlockExplodeEvent event = new BlockExplodeEvent(location.getBlock(), blockList, this.blockInteraction == Explosion.Effect.DESTROY ? 1.0F / this.radius : 1.0F); ++ BlockExplodeEvent event = new BlockExplodeEvent(location.getBlock(), blockList, this.blockInteraction == Explosion.Effect.DESTROY_WITH_DECAY ? 1.0F / this.radius : 1.0F); + this.level.getCraftServer().getPluginManager().callEvent(event); + cancelled = event.isCancelled(); + bukkitBlocks = event.blockList(); @@ -144,7 +144,7 @@ - if (this.blockInteraction == Explosion.Effect.DESTROY_WITH_DECAY) { - loottableinfo_builder.withParameter(LootContextParameters.EXPLOSION_RADIUS, this.radius); -+ if (this.blockInteraction == Explosion.Effect.DESTROY_WITH_DECAY || yield < 1.0F) { // CraftBukkit - add yield ++ if (yield < 1.0F) { // CraftBukkit - add yield + loottableinfo_builder.withParameter(LootContextParameters.EXPLOSION_RADIUS, 1.0F / yield); // CraftBukkit - add yield }