-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix creepers being able to blow up watered blocks
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
...ra-server/minecraft-patches/sources/net/minecraft/world/entity/monster/Creeper.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- a/net/minecraft/world/entity/monster/Creeper.java | ||
+++ b/net/minecraft/world/entity/monster/Creeper.java | ||
@@ -250,7 +_,12 @@ | ||
if (!event.isCancelled()) { | ||
// CraftBukkit end | ||
this.dead = true; | ||
- serverLevel.explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); // CraftBukkit // Paper - fix DamageSource API (revert to vanilla, no, just no, don't change this) | ||
+ // Sakura start - fix creepers blowing up watered blocks | ||
+ // Entities can clip up to 1.0e-7 inside blocks which can be abused to cegg watered blocks. | ||
+ // This is patched by adding a slight offset to the explosion position. | ||
+ final double explosionY = this.getY() + 1.0e-5; | ||
+ serverLevel.explode(this, this.getX(), explosionY, this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); // CraftBukkit // Paper - fix DamageSource API (revert to vanilla, no, just no, don't change this) | ||
+ // Sakura end - fix creepers blowing up watered blocks | ||
this.spawnLingeringCloud(); | ||
this.triggerOnDeathMobEffects(serverLevel, Entity.RemovalReason.KILLED); | ||
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause |