SPIGOT-5559: Add EntityPotionEffectEvent causes for bee, raiders and wither rose

By: ShaneBee <shanebolenback@me.com>
This commit is contained in:
CraftBukkit/Spigot
2020-02-02 11:16:01 +11:00
parent 0bee4968bb
commit 0b8e05b835
3 changed files with 27 additions and 1 deletions

View File

@@ -1,5 +1,14 @@
--- a/net/minecraft/server/EntityRaider.java
+++ b/net/minecraft/server/EntityRaider.java
@@ -131,7 +131,7 @@
MobEffect mobeffect1 = new MobEffect(MobEffects.BAD_OMEN, 120000, i, false, false, true);
if (!this.world.getGameRules().getBoolean(GameRules.DISABLE_RAIDS)) {
- entityhuman.addEffect(mobeffect1);
+ entityhuman.addEffect(mobeffect1, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.PATROL_CAPTAIN); // CraftBukkit
}
}
}
@@ -397,7 +397,7 @@
while (iterator.hasNext()) {
EntityRaider entityraider = (EntityRaider) iterator.next();