3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-24 15:20:11 +01:00

Fix interact event call override (#9387)

Dieser Commit ist enthalten in:
Owen 2023-06-23 12:03:43 -04:00 committet von GitHub
Ursprung 206dd3af05
Commit aea9cdd37d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -30,7 +30,7 @@ index 6a5e3649d9843d85eceb0eae225200fa2551e844..1635fee928d64f4d2c336dca6675ed46
this.interactResult = event.useItemInHand() == Event.Result.DENY; this.interactResult = event.useItemInHand() == Event.Result.DENY;
this.interactPosition = blockposition.immutable(); this.interactPosition = blockposition.immutable();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 9201e143ff520126c27a649bba62b359a01669c4..e813b58d724b9e5900df68f763ad0b59c84e47f4 100644 index 9201e143ff520126c27a649bba62b359a01669c4..a4653a660e74f5d65489ddbb7b0e46134f2472c0 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -512,7 +512,13 @@ public class CraftEventFactory { @@ -512,7 +512,13 @@ public class CraftEventFactory {
@ -40,7 +40,7 @@ index 9201e143ff520126c27a649bba62b359a01669c4..e813b58d724b9e5900df68f763ad0b59
+ +
+ // Paper start - cancelledItem param + // Paper start - cancelledItem param
public static PlayerInteractEvent callPlayerInteractEvent(net.minecraft.world.entity.player.Player who, Action action, BlockPos position, Direction direction, ItemStack itemstack, boolean cancelledBlock, InteractionHand hand, Vec3 targetPos) { public static PlayerInteractEvent callPlayerInteractEvent(net.minecraft.world.entity.player.Player who, Action action, BlockPos position, Direction direction, ItemStack itemstack, boolean cancelledBlock, InteractionHand hand, Vec3 targetPos) {
+ return CraftEventFactory.callPlayerInteractEvent(who, action, position, direction, itemstack, false, false, hand, null); + return CraftEventFactory.callPlayerInteractEvent(who, action, position, direction, itemstack, cancelledBlock, false, hand, targetPos);
+ } + }
+ public static PlayerInteractEvent callPlayerInteractEvent(net.minecraft.world.entity.player.Player who, Action action, BlockPos position, Direction direction, ItemStack itemstack, boolean cancelledBlock, boolean cancelledItem, InteractionHand hand, Vec3 targetPos) { + public static PlayerInteractEvent callPlayerInteractEvent(net.minecraft.world.entity.player.Player who, Action action, BlockPos position, Direction direction, ItemStack itemstack, boolean cancelledBlock, boolean cancelledItem, InteractionHand hand, Vec3 targetPos) {
+ // Paper end - cancelledItem param + // Paper end - cancelledItem param