mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 02:07:37 +01:00
#809: Add spawn and transform reasons for piglin zombification.
By: Nathat23 <nathat890@outlook.com>
This commit is contained in:
parent
b2efd58164
commit
11d6de6800
20
paper-server/nms-patches/EntityPiglinAbstract.patch
Normal file
20
paper-server/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…
Reference in New Issue
Block a user