#809: Add spawn and transform reasons for piglin zombification.
This commit is contained in:
parent
0c24068ad6
commit
f6a39d3ccf
20
nms-patches/EntityPiglinAbstract.patch
Normal file
20
nms-patches/EntityPiglinAbstract.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- a/net/minecraft/server/EntityPiglinAbstract.java
|
||||||
|
+++ b/net/minecraft/server/EntityPiglinAbstract.java
|
||||||
|
@@ -81,7 +81,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void c(WorldServer worldserver) {
|
||||||
|
- EntityPigZombie entitypigzombie = (EntityPigZombie) this.a(EntityTypes.ZOMBIFIED_PIGLIN, true);
|
||||||
|
+ EntityPigZombie entitypigzombie = (EntityPigZombie) this.a(EntityTypes.ZOMBIFIED_PIGLIN, true, org.bukkit.event.entity.EntityTransformEvent.TransformReason.PIGLIN_ZOMBIFIED, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.PIGLIN_ZOMBIFIED); // CraftBukkit - add spawn and transform reasons
|
||||||
|
|
||||||
|
if (entitypigzombie != null) {
|
||||||
|
entitypigzombie.addEffect(new MobEffect(MobEffects.CONFUSION, 200, 0));
|
||||||
|
@@ -96,7 +96,7 @@
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public EntityLiving getGoalTarget() {
|
||||||
|
- return (EntityLiving) this.bg.getMemory(MemoryModuleType.ATTACK_TARGET).orElse((Object) null);
|
||||||
|
+ return (EntityLiving) this.bg.getMemory(MemoryModuleType.ATTACK_TARGET).orElse(null); // CraftBukkit - decompile error
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean eO() {
|
Loading…
x
Reference in New Issue
Block a user