aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNoah van der Aa <[email protected]>2024-04-29 23:40:36 +0200
committerNoah van der Aa <[email protected]>2024-04-29 23:40:36 +0200
commit471cf5e9aa6bf7c47b653e781f2791d51386229a (patch)
treec9735ad741419e183e2b32b3dd27e4d1bb49c421
parent09d49ff9feef42383186369194b9566545c820ca (diff)
downloadPaper-471cf5e9aa6bf7c47b653e781f2791d51386229a.tar.gz
Paper-471cf5e9aa6bf7c47b653e781f2791d51386229a.zip
fix compile?
-rw-r--r--patches/api/0394-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch14
-rw-r--r--patches/server/0812-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch6
2 files changed, 6 insertions, 14 deletions
diff --git a/patches/api/0394-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch b/patches/api/0394-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch
index e788ef02f6..a1998880e0 100644
--- a/patches/api/0394-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch
+++ b/patches/api/0394-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch
@@ -6,20 +6,10 @@ Subject: [PATCH] Add exploded block state to BlockExplodeEvent and
diff --git a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
-index 8309b030c2120f1496d244f3ebc1094def41c869..c924279a84a1979517a7b79936966c5c543df2a8 100644
+index 8309b030c2120f1496d244f3ebc1094def41c869..a7c297364805c58ae16895055d8eae0484384b7d 100644
--- a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
+++ b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
-@@ -13,9 +13,6 @@ import org.jetbrains.annotations.NotNull;
- * Note that due to the nature of explosions, {@link #getBlock()} will always be
- * an air block. {@link #getExplodedBlockState()} should be used to get
- * information about the block state that exploded.
-- * <p>
-- * The event isn't called if the {@link org.bukkit.GameRule#MOB_GRIEFING}
-- * is disabled as no block interaction will occur.
- */
- public class BlockExplodeEvent extends BlockEvent implements Cancellable {
- private static final HandlerList handlers = new HandlerList();
-@@ -32,6 +29,7 @@ public class BlockExplodeEvent extends BlockEvent implements Cancellable {
+@@ -32,6 +32,7 @@ public class BlockExplodeEvent extends BlockEvent implements Cancellable {
this.cancel = false;
}
diff --git a/patches/server/0812-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch b/patches/server/0812-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch
index e4d0a1d431..413455c787 100644
--- a/patches/server/0812-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch
+++ b/patches/server/0812-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch
@@ -4,9 +4,11 @@ Date: Fri, 22 Oct 2021 16:25:07 -0700
Subject: [PATCH] Add exploded block state to BlockExplodeEvent and
EntityDamageByBlockEvent
+== AT ==
+public org.bukkit.craftbukkit.block.CraftBlockStates getBlockState(Lorg/bukkit/World;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/block/entity/BlockEntity;)Lorg/bukkit/craftbukkit/block/CraftBlockState;
diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSources.java b/src/main/java/net/minecraft/world/damagesource/DamageSources.java
-index 89928dad3182a0131c3fba19c9c131d6997028eb..f30b5c355e979e7782a046ebb111e472d39b132d 100644
+index 89928dad3182a0131c3fba19c9c131d6997028eb..349d1683458ec5d641c9823aa7a68dec8820a664 100644
--- a/src/main/java/net/minecraft/world/damagesource/DamageSources.java
+++ b/src/main/java/net/minecraft/world/damagesource/DamageSources.java
@@ -265,6 +265,7 @@ public class DamageSources {
@@ -22,7 +24,7 @@ index 89928dad3182a0131c3fba19c9c131d6997028eb..f30b5c355e979e7782a046ebb111e472
DamageSource damageSource = new DamageSource(this.damageTypes.getHolderOrThrow(DamageTypes.BAD_RESPAWN_POINT), vec3d);
if (world != null && blockData != null && position != null) {
- damageSource.blockState = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(world, position, blockData, null);
-+ damageSource.blockState = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(world, position, blockData, world.getBlockEntity(position)); // Paper
++ damageSource.blockState = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(world.getWorld(), position, blockData, world.getBlockEntity(position)); // Paper
}
return damageSource;
// CraftBukkit end