SPIGOT-7617: Add BlockExplodeEvent#getExplodedBlockState()

By: 2008Choco <hawkeboyz2@hotmail.com>
This commit is contained in:
CraftBukkit/Spigot
2024-04-29 20:08:56 +10:00
parent 1390477e34
commit a78a169340
5 changed files with 38 additions and 6 deletions

View File

@@ -1,12 +1,14 @@
--- a/net/minecraft/world/damagesource/DamageSource.java
+++ b/net/minecraft/world/damagesource/DamageSource.java
@@ -21,6 +21,86 @@
@@ -21,6 +21,88 @@
private final Entity directEntity;
@Nullable
private final Vec3D damageSourcePosition;
+ // CraftBukkit start
+ @Nullable
+ private org.bukkit.block.Block directBlock; // The block that caused the damage. damageSourcePosition is not used for all block damages
+ @Nullable
+ public org.bukkit.block.BlockState blockState; // The block state of the block relevant to this damage source
+ private boolean withSweep = false;
+ private boolean melting = false;
+ private boolean poison = false;