Fix WaterBottleSplashEvent not forwarding hit result (#10203)

This commit is contained in:
Lulu13022002 2024-02-10 20:27:29 +01:00 committed by GitHub
parent 99bae594c8
commit bf6e803c6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 79 additions and 35 deletions

View file

@ -6,21 +6,25 @@ Subject: [PATCH] Add WaterBottleSplashEvent
diff --git a/src/main/java/io/papermc/paper/event/entity/WaterBottleSplashEvent.java b/src/main/java/io/papermc/paper/event/entity/WaterBottleSplashEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..749d37256b9298fe866852e2d00cee99d8079f07
index 0000000000000000000000000000000000000000..362afc28190dd6f0ed0407273f2be1aab73bb8f5
--- /dev/null
+++ b/src/main/java/io/papermc/paper/event/entity/WaterBottleSplashEvent.java
@@ -0,0 +1,130 @@
@@ -0,0 +1,137 @@
+package io.papermc.paper.event.entity;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.bukkit.block.Block;
+import org.bukkit.block.BlockFace;
+import org.bukkit.entity.Entity;
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.entity.ThrownPotion;
+import org.bukkit.event.entity.PotionSplashEvent;
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.Unmodifiable;
+
+/**
@ -35,11 +39,14 @@ index 0000000000000000000000000000000000000000..749d37256b9298fe866852e2d00cee99
+ @ApiStatus.Internal
+ public WaterBottleSplashEvent(
+ final @NotNull ThrownPotion potion,
+ final @Nullable Entity hitEntity,
+ final @Nullable Block hitBlock,
+ final @Nullable BlockFace hitFace,
+ final @NotNull Map<LivingEntity, Double> affectedEntities,
+ final @NotNull Set<LivingEntity> rehydrate,
+ final @NotNull Set<LivingEntity> extinguish
+ ) {
+ super(potion, affectedEntities);
+ super(potion, hitEntity, hitBlock, hitFace, affectedEntities);
+ this.rehydrate = rehydrate;
+ this.extinguish = extinguish;
+ }