diff options
author | Lulu13022002 <[email protected]> | 2024-09-21 21:19:02 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-09-21 21:19:02 +0200 |
commit | 1ed64f82704c299d0f7ae9af710579be995af8de (patch) | |
tree | 8de9a329fed8373ae5eccc59a9ee9558a53ee3fd /patches/server/0760-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch | |
parent | 593faf4fc3ad433ef523672b6553124dd99f8ca3 (diff) | |
download | Paper-1ed64f82704c299d0f7ae9af710579be995af8de.tar.gz Paper-1ed64f82704c299d0f7ae9af710579be995af8de.zip |
Update launchProjectile API (#11300)
Diffstat (limited to 'patches/server/0760-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch')
-rw-r--r-- | patches/server/0760-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/patches/server/0760-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch b/patches/server/0760-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch new file mode 100644 index 0000000000..cd0b3b2cc7 --- /dev/null +++ b/patches/server/0760-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch @@ -0,0 +1,37 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Denery <[email protected]> +Date: Mon, 31 Oct 2022 14:20:52 +0300 +Subject: [PATCH] Fix EntityCombustEvent cancellation cant fully prevent + entities from being set on fire + + +diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java +index 180a86c419cad9873c53a49c8881ced647a753e0..1aa3396a33e24f3849725769fe58b57374ee7611 100644 +--- a/src/main/java/net/minecraft/world/entity/Entity.java ++++ b/src/main/java/net/minecraft/world/entity/Entity.java +@@ -3193,6 +3193,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + pluginManager.callEvent(entityCombustEvent); + if (!entityCombustEvent.isCancelled()) { + this.igniteForSeconds(entityCombustEvent.getDuration(), false); ++ // Paper start - fix EntityCombustEvent cancellation ++ } else { ++ this.setRemainingFireTicks(this.remainingFireTicks - 1); ++ // Paper end - fix EntityCombustEvent cancellation + } + // CraftBukkit end + } +diff --git a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java +index 0c5409af685ef1f251db3d9f9e21295c82a1e02a..8b5918dc07f17ae5001c03dc743128fd9520b819 100644 +--- a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java +@@ -135,6 +135,10 @@ public abstract class BaseFireBlock extends Block { + + if (!event.isCancelled()) { + entity.igniteForSeconds(event.getDuration(), false); ++ // Paper start - fix EntityCombustEvent cancellation ++ } else { ++ entity.setRemainingFireTicks(entity.getRemainingFireTicks() - 1); ++ // Paper end - fix EntityCombustEvent cancellation + } + // CraftBukkit end + } |