mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
fix bad method call in PreBlockExplodeEvent event
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Add PreExplodeEvents
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index dcc3b333f3647631e2fb695d0854036d3bc009be..6772c4584f1d243df76b42a730376247c8f04e3b 100644
|
||||
index dcc3b333f3647631e2fb695d0854036d3bc009be..4932374ab9a3d8582fb0ef024d817ad896dd23c4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -141,6 +141,23 @@ public class Explosion {
|
||||
@@ -22,7 +22,7 @@ index dcc3b333f3647631e2fb695d0854036d3bc009be..6772c4584f1d243df76b42a730376247
|
||||
+ }
|
||||
+ }else {
|
||||
+ Location location = new Location(this.level.getWorld(), this.x, this.y, this.z);
|
||||
+ if(!new org.purpurmc.purpur.event.PreBlockExplodeEvent(location.getBlock(), this.blockInteraction == Explosion.BlockInteraction.DESTROY_WITH_DECAY ? 1.0F / this.radius : 1.0F).callEvent()) {
|
||||
+ if(!new org.purpurmc.purpur.event.PreBlockExplodeEvent(location.getBlock(), this.blockInteraction == Explosion.BlockInteraction.DESTROY_WITH_DECAY ? 1.0F / this.radius : 1.0F, this.damageSource.explodedBlockState).callEvent()) {
|
||||
+ this.wasCanceled = true;
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user