Skip to content

Commit

Permalink
Do not handle yield process
Browse files Browse the repository at this point in the history
  • Loading branch information
HaHaWTH committed Dec 28, 2024
1 parent 80464c4 commit ea1e938
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/main/java/io/wdsj/hybridfix/handler/ExplosionHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public void onExplosionDetonate(ExplosionEvent.Detonate event) {
Location location = new Location(bworld, explosionPos.x, explosionPos.y, explosionPos.z);
List<Block> bukkitBlocks;
boolean cancelled;
float yield;
final List<Block> blockList = Lists.newArrayList();
List<BlockPos> affectedBlockPositions = event.getAffectedBlocks();
for (int i1 = affectedBlockPositions.size() - 1; i1 >= 0; i1--) {
Expand All @@ -47,13 +46,11 @@ public void onExplosionDetonate(ExplosionEvent.Detonate event) {
Bukkit.getServer().getPluginManager().callEvent(bukkitEvent);
cancelled = bukkitEvent.isCancelled();
bukkitBlocks = bukkitEvent.blockList();
yield = bukkitEvent.getYield();
} else {
BlockExplodeEvent bukkitEvent = new BlockExplodeEvent(location.getBlock(), blockList, 1.0F / explosion.size);
Bukkit.getServer().getPluginManager().callEvent(bukkitEvent);
cancelled = bukkitEvent.isCancelled();
bukkitBlocks = bukkitEvent.blockList();
yield = bukkitEvent.getYield();
}
explosion.getAffectedBlockPositions().clear();

Expand All @@ -64,7 +61,6 @@ public void onExplosionDetonate(ExplosionEvent.Detonate event) {
BlockPos coords = new BlockPos(bblock.getX(), bblock.getY(), bblock.getZ());
explosion.getAffectedBlockPositions().add(coords);
}
explosion.size = yield * explosion.size;
}
}
}
Expand Down

0 comments on commit ea1e938

Please sign in to comment.