geforkt von Mirrors/Paper
SPIGOT-5559: Add EntityPotionEffectEvent causes for bee, raiders and wither rose
Dieser Commit ist enthalten in:
Ursprung
0098037647
Commit
ae45e09223
11
nms-patches/BlockWitherRose.patch
Normale Datei
11
nms-patches/BlockWitherRose.patch
Normale Datei
@ -0,0 +1,11 @@
|
|||||||
|
--- a/net/minecraft/server/BlockWitherRose.java
|
||||||
|
+++ b/net/minecraft/server/BlockWitherRose.java
|
||||||
|
@@ -20,7 +20,7 @@
|
||||||
|
EntityLiving entityliving = (EntityLiving) entity;
|
||||||
|
|
||||||
|
if (!entityliving.isInvulnerable(DamageSource.WITHER)) {
|
||||||
|
- entityliving.addEffect(new MobEffect(MobEffects.WITHER, 40));
|
||||||
|
+ entityliving.addEffect(new MobEffect(MobEffects.WITHER, 40), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.WITHER_ROSE); // CraftBukkit
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,12 @@
|
|||||||
--- a/net/minecraft/server/EntityBee.java
|
--- a/net/minecraft/server/EntityBee.java
|
||||||
+++ b/net/minecraft/server/EntityBee.java
|
+++ b/net/minecraft/server/EntityBee.java
|
||||||
@@ -157,7 +157,7 @@
|
@@ -152,12 +152,12 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
if (b0 > 0) {
|
||||||
|
- ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.POISON, b0 * 20, 0));
|
||||||
|
+ ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.POISON, b0 * 20, 0), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setHasStung(true);
|
this.setHasStung(true);
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
--- a/net/minecraft/server/EntityRaider.java
|
--- a/net/minecraft/server/EntityRaider.java
|
||||||
+++ b/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 @@
|
@@ -397,7 +397,7 @@
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
EntityRaider entityraider = (EntityRaider) iterator.next();
|
EntityRaider entityraider = (EntityRaider) iterator.next();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren