mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-23 17:09:29 +00:00
Backport some fixes from Paper 1.21.6
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Pascalpex <pascalpex@gmail.com>
|
||||
Date: Wed, 4 Jun 2025 17:03:32 +0200
|
||||
Subject: [PATCH] Add BlockExplosionHitEvent
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java
|
||||
index 619d00f79276665777f3a58dec7a5f353bd7d660..33cd3a7755ada2fb632cfc97a80c8a9000ab0bd9 100644
|
||||
--- a/net/minecraft/world/level/ServerExplosion.java
|
||||
+++ b/net/minecraft/world/level/ServerExplosion.java
|
||||
@@ -612,9 +612,13 @@ public class ServerExplosion implements Explosion {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
- this.level
|
||||
- .getBlockState(blockPos)
|
||||
- .onExplosionHit(this.level, blockPos, this, (itemStack, blockPos1) -> addOrAppendStack(list, itemStack, blockPos1));
|
||||
+ // Leaf start - Add BlockExplosionHitEvent
|
||||
+ if (new org.dreeam.leaf.event.BlockExplosionHitEvent(CraftLocation.toBukkit(blockPos, this.level.getWorld()).getBlock(), this.source == null ? null : this.source.getBukkitEntity(), org.bukkit.craftbukkit.CraftExplosionResult.toExplosionResult(this.blockInteraction)).callEvent()) {
|
||||
+ this.level
|
||||
+ .getBlockState(blockPos)
|
||||
+ .onExplosionHit(this.level, blockPos, this, (itemStack, blockPos1) -> addOrAppendStack(list, itemStack, blockPos1));
|
||||
+ }
|
||||
+ // Leaf end - Add BlockExplosionHitEvent
|
||||
}
|
||||
|
||||
for (ServerExplosion.StackCollector stackCollector : list) {
|
||||
Reference in New Issue
Block a user