From 4023949412a0fce2a5f557bdc289fc7a812e89a3 Mon Sep 17 00:00:00 2001 From: personalized-advertising <265311956+personalized-advertising@users.noreply.github.com> Date: Mon, 7 Sep 2026 18:42:10 +0100 Subject: [PATCH 1/5] PotentSulfurBlockEntity.java.patch --- .../entity/PotentSulfurBlockEntity.java.patch | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/PotentSulfurBlockEntity.java.patch diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/PotentSulfurBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/PotentSulfurBlockEntity.java.patch new file mode 100644 index 000000000000..c20e77d56fc1 --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/PotentSulfurBlockEntity.java.patch @@ -0,0 +1,23 @@ +--- a/net/minecraft/world/level/block/entity/PotentSulfurBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/PotentSulfurBlockEntity.java +@@ -128,7 +_,19 @@ + && !entityToBeLaunched.isPassenger() + && !entityToBeLaunched.is(EntityTypeTags.NOT_AFFECTED_BY_GEYSERS) + && entityVelocity.y < 0.3F + waterBlocks * 0.1) { +- entityToBeLaunched.addDeltaMovement(new Vec3(0.0, 0.2F, 0.0)); ++ // Paper start - add EntityPotentSulfurLaunchEvent ++ io.papermc.paper.event.entity.EntityPotentSulfurLaunchEvent event = new io.papermc.paper.event.entity.EntityPotentSulfurLaunchEvent( ++ entityToBeLaunched.getBukkitEntity(), ++ org.bukkit.craftbukkit.util.CraftLocation.toBukkit(pos, level.getWorld()), ++ org.bukkit.craftbukkit.util.CraftLocation.toBukkit(sourceBlock, level.getWorld()), ++ new org.bukkit.util.Vector(0.0, 0.2F, 0.0) ++ ); ++ if (!event.callEvent()) { ++ continue; ++ } ++ org.bukkit.util.Vector launchVelocity = event.getLaunchVelocity(); ++ entityToBeLaunched.addDeltaMovement(new Vec3(launchVelocity.getX(), launchVelocity.getY(), launchVelocity.getZ())); ++ // Paper end - add EntityPotentSulfurLaunchEvent + entityToBeLaunched.needsSync = true; + } + } From 867a932e4963181f9b04e17c303d7069f33f4c74 Mon Sep 17 00:00:00 2001 From: personalized-advertising <265311956+personalized-advertising@users.noreply.github.com> Date: Mon, 7 Sep 2026 18:42:56 +0100 Subject: [PATCH 2/5] EntityPotentSulfurLaunchEvent --- .../entity/EntityPotentSulfurLaunchEvent.java | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 paper-api/src/main/java/io/papermc/paper/event/entity/EntityPotentSulfurLaunchEvent.java diff --git a/paper-api/src/main/java/io/papermc/paper/event/entity/EntityPotentSulfurLaunchEvent.java b/paper-api/src/main/java/io/papermc/paper/event/entity/EntityPotentSulfurLaunchEvent.java new file mode 100644 index 000000000000..8f408f458893 --- /dev/null +++ b/paper-api/src/main/java/io/papermc/paper/event/entity/EntityPotentSulfurLaunchEvent.java @@ -0,0 +1,78 @@ +package io.papermc.paper.event.entity; + +import org.bukkit.Location; +import org.bukkit.entity.Entity; +import org.bukkit.event.Cancellable; +import org.bukkit.event.HandlerList; +import org.bukkit.event.entity.EntityEvent; +import org.bukkit.util.Vector; +import org.jetbrains.annotations.ApiStatus; +import org.jetbrains.annotations.NotNull; + +/** + * Called when an entity is launched upward by a Potent Sulfur geyser. + */ +public class EntityPotentSulfurLaunchEvent extends EntityEvent implements Cancellable { + private static final HandlerList HANDLER_LIST = new HandlerList(); + + private final Location sulfurLocation; + private final Location sourceLocation; + + private Vector launchVelocity; + private boolean cancelled; + + @ApiStatus.Internal + public EntityPotentSulfurLaunchEvent(@NotNull Entity entity, @NotNull Location sulfurLocation, @NotNull Location sourceLocation, @NotNull Vector launchVelocity) { + super(entity); + this.sulfurLocation = sulfurLocation; + this.sourceLocation = sourceLocation; + this.launchVelocity = launchVelocity; + } + + /** + * Gets the location of the Potent Sulfur block. + */ + public @NotNull Location getSulfurLocation() { + return this.sulfurLocation.clone(); + } + + /** + * Gets the location where the geyser exits the water column. + */ + public @NotNull Location getSourceLocation() { + return this.sourceLocation.clone(); + } + + /** + * Gets the velocity that will be added to the entity. + */ + public @NotNull Vector getLaunchVelocity() { + return this.launchVelocity.clone(); + } + + /** + * Changes the velocity that will be added to the entity. + */ + public void setLaunchVelocity(@NotNull Vector launchVelocity) { + this.launchVelocity = launchVelocity.clone(); + } + + @Override + public boolean isCancelled() { + return this.cancelled; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public @NotNull HandlerList getHandlers() { + return HANDLER_LIST; + } + + public static @NotNull HandlerList getHandlerList() { + return HANDLER_LIST; + } +} From 6d06804722f2c98fc5145eb07803dd46c2ff97dc Mon Sep 17 00:00:00 2001 From: personalized-advertising <265311956+personalized-advertising@users.noreply.github.com> Date: Wed, 9 Sep 2026 11:54:05 +0100 Subject: [PATCH 3/5] use constant instead --- .../world/level/block/entity/PotentSulfurBlockEntity.java.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/PotentSulfurBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/PotentSulfurBlockEntity.java.patch index c20e77d56fc1..54ad2ec86f6f 100644 --- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/PotentSulfurBlockEntity.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/PotentSulfurBlockEntity.java.patch @@ -10,7 +10,7 @@ + entityToBeLaunched.getBukkitEntity(), + org.bukkit.craftbukkit.util.CraftLocation.toBukkit(pos, level.getWorld()), + org.bukkit.craftbukkit.util.CraftLocation.toBukkit(sourceBlock, level.getWorld()), -+ new org.bukkit.util.Vector(0.0, 0.2F, 0.0) ++ new org.bukkit.util.Vector(0.0, GEYSER_LAUNCH_FORCE, 0.0) + ); + if (!event.callEvent()) { + continue; From 35c21891eeaee2c7071f3f9f410e2cf1bf4d03c2 Mon Sep 17 00:00:00 2001 From: personalized-advertising <265311956+personalized-advertising@users.noreply.github.com> Date: Wed, 9 Sep 2026 19:01:07 +0100 Subject: [PATCH 4/5] switch to jspecify --- .../entity/EntityPotentSulfurLaunchEvent.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/paper-api/src/main/java/io/papermc/paper/event/entity/EntityPotentSulfurLaunchEvent.java b/paper-api/src/main/java/io/papermc/paper/event/entity/EntityPotentSulfurLaunchEvent.java index 8f408f458893..20e847f4321b 100644 --- a/paper-api/src/main/java/io/papermc/paper/event/entity/EntityPotentSulfurLaunchEvent.java +++ b/paper-api/src/main/java/io/papermc/paper/event/entity/EntityPotentSulfurLaunchEvent.java @@ -7,11 +7,12 @@ import org.bukkit.event.entity.EntityEvent; import org.bukkit.util.Vector; import org.jetbrains.annotations.ApiStatus; -import org.jetbrains.annotations.NotNull; +import org.jspecify.annotations.NullMarked; /** * Called when an entity is launched upward by a Potent Sulfur geyser. */ +@NullMarked public class EntityPotentSulfurLaunchEvent extends EntityEvent implements Cancellable { private static final HandlerList HANDLER_LIST = new HandlerList(); @@ -22,7 +23,12 @@ public class EntityPotentSulfurLaunchEvent extends EntityEvent implements Cancel private boolean cancelled; @ApiStatus.Internal - public EntityPotentSulfurLaunchEvent(@NotNull Entity entity, @NotNull Location sulfurLocation, @NotNull Location sourceLocation, @NotNull Vector launchVelocity) { + public EntityPotentSulfurLaunchEvent( + Entity entity, + Location sulfurLocation, + Location sourceLocation, + Vector launchVelocity + ) { super(entity); this.sulfurLocation = sulfurLocation; this.sourceLocation = sourceLocation; @@ -32,28 +38,28 @@ public EntityPotentSulfurLaunchEvent(@NotNull Entity entity, @NotNull Location s /** * Gets the location of the Potent Sulfur block. */ - public @NotNull Location getSulfurLocation() { + public Location getSulfurLocation() { return this.sulfurLocation.clone(); } /** * Gets the location where the geyser exits the water column. */ - public @NotNull Location getSourceLocation() { + public Location getSourceLocation() { return this.sourceLocation.clone(); } /** * Gets the velocity that will be added to the entity. */ - public @NotNull Vector getLaunchVelocity() { + public Vector getLaunchVelocity() { return this.launchVelocity.clone(); } /** * Changes the velocity that will be added to the entity. */ - public void setLaunchVelocity(@NotNull Vector launchVelocity) { + public void setLaunchVelocity(Vector launchVelocity) { this.launchVelocity = launchVelocity.clone(); } @@ -68,11 +74,11 @@ public void setCancelled(boolean cancelled) { } @Override - public @NotNull HandlerList getHandlers() { + public HandlerList getHandlers() { return HANDLER_LIST; } - public static @NotNull HandlerList getHandlerList() { + public static HandlerList getHandlerList() { return HANDLER_LIST; } } From 96bc6bdc2947be9d00e2bd2c0437df263241e287 Mon Sep 17 00:00:00 2001 From: personalized-advertising <265311956+personalized-advertising@users.noreply.github.com> Date: Wed, 9 Sep 2026 19:08:25 +0100 Subject: [PATCH 5/5] use CraftVector --- .../world/level/block/entity/PotentSulfurBlockEntity.java.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/PotentSulfurBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/PotentSulfurBlockEntity.java.patch index 54ad2ec86f6f..12deabfd88fa 100644 --- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/PotentSulfurBlockEntity.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/PotentSulfurBlockEntity.java.patch @@ -16,7 +16,7 @@ + continue; + } + org.bukkit.util.Vector launchVelocity = event.getLaunchVelocity(); -+ entityToBeLaunched.addDeltaMovement(new Vec3(launchVelocity.getX(), launchVelocity.getY(), launchVelocity.getZ())); ++ entityToBeLaunched.addDeltaMovement(org.bukkit.craftbukkit.util.CraftVector.toVec3(launchVelocity)); + // Paper end - add EntityPotentSulfurLaunchEvent entityToBeLaunched.needsSync = true; }