testserver/Spigot-Server-Patches/0385-Fire-EntityCombustEven...

28 lines
1.0 KiB
Diff
Raw Normal View History

From b1d82c1797ab63209d5a318cc9deec15a64cf048 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Sat, 13 Oct 2018 22:29:17 +0200
Subject: [PATCH] Fire EntityCombustEvent for phantoms
diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java
index 7a48719c9..d7be396ee 100644
--- a/src/main/java/net/minecraft/server/EntityPhantom.java
+++ b/src/main/java/net/minecraft/server/EntityPhantom.java
@@ -106,7 +106,12 @@ public class EntityPhantom extends EntityFlying implements IMonster {
public void movementTick() {
if (this.dq()) {
- this.setOnFire(8);
+ // Paper start - fire EntityCombustEvent
+ org.bukkit.event.entity.EntityCombustEvent event = new org.bukkit.event.entity.EntityCombustEvent(this.getBukkitEntity(), 8);
+ if (event.callEvent()) {
+ this.setOnFire(event.getDuration());
+ }
+ // Paper end
}
super.movementTick();
--
2.20.0