Fix EntityCombustEvent cancellation cant fully prevent entities from being set on fire
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
if (!entity.fireImmune()) {
|
||||
if (entity.getRemainingFireTicks() < 0) {
|
||||
entity.setRemainingFireTicks(entity.getRemainingFireTicks() + 1);
|
||||
@@ -137,7 +139,14 @@
|
||||
@@ -137,7 +139,18 @@
|
||||
}
|
||||
|
||||
if (entity.getRemainingFireTicks() >= 0) {
|
||||
@@ -27,12 +27,16 @@
|
||||
+
|
||||
+ 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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,26 +155,26 @@
|
||||
@@ -146,26 +159,26 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -66,7 +70,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -213,4 +222,12 @@
|
||||
@@ -213,4 +226,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user