summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityZombie.patch
diff options
context:
space:
mode:
authornathat890 <nathat890@outlook.com>2018-12-05 09:51:20 +1100
committermd_5 <git@md-5.net>2018-12-05 09:51:45 +1100
commit20fc5bea2c51de8d5239b68d83e878896b8ff505 (patch)
treecd93f48fe1c8d6a33fb2d14f54b328c7611505f9 /nms-patches/EntityZombie.patch
parent38e4c013b66d2a870e83fe61b2da6bad608c69af (diff)
downloadcraftbukkit-20fc5bea2c51de8d5239b68d83e878896b8ff505.tar
craftbukkit-20fc5bea2c51de8d5239b68d83e878896b8ff505.tar.gz
craftbukkit-20fc5bea2c51de8d5239b68d83e878896b8ff505.tar.lz
craftbukkit-20fc5bea2c51de8d5239b68d83e878896b8ff505.tar.xz
craftbukkit-20fc5bea2c51de8d5239b68d83e878896b8ff505.zip
Add list of entities to EntityTransformEvent & move die calls
Diffstat (limited to 'nms-patches/EntityZombie.patch')
-rw-r--r--nms-patches/EntityZombie.patch20
1 files changed, 15 insertions, 5 deletions
diff --git a/nms-patches/EntityZombie.patch b/nms-patches/EntityZombie.patch
index e0c799e0..b85809fe 100644
--- a/nms-patches/EntityZombie.patch
+++ b/nms-patches/EntityZombie.patch
@@ -96,7 +96,16 @@
}
}
-@@ -372,7 +405,12 @@
+@@ -362,7 +395,7 @@
+ EntityZombieVillager entityzombievillager = new EntityZombieVillager(this.world);
+
+ entityzombievillager.u(entityvillager);
+- this.world.kill(entityvillager);
++ // this.world.kill(entityvillager); // CraftBukkit - moved down
+ entityzombievillager.prepare(this.world.getDamageScaler(new BlockPosition(entityzombievillager)), new EntityZombie.GroupDataZombie(false, null), (NBTTagCompound) null);
+ entityzombievillager.setProfession(entityvillager.getProfession());
+ entityzombievillager.setBaby(entityvillager.isBaby());
+@@ -372,7 +405,13 @@
entityzombievillager.setCustomNameVisible(entityvillager.getCustomNameVisible());
}
@@ -105,12 +114,13 @@
+ if (CraftEventFactory.callEntityTransformEvent(this, entityzombievillager, EntityTransformEvent.TransformReason.INFECTION).isCancelled()) {
+ return;
+ }
-+ // CraftBukkit end
++ this.world.kill(entityvillager); // CraftBukkit - from above
+ this.world.addEntity(entityzombievillager, CreatureSpawnEvent.SpawnReason.INFECTION); // CraftBukkit - add SpawnReason
++ // CraftBukkit end
this.world.a((EntityHuman) null, 1026, new BlockPosition(this), 0);
}
-@@ -422,7 +460,7 @@
+@@ -422,7 +461,7 @@
entitychicken1.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
entitychicken1.prepare(difficultydamagescaler, (GroupDataEntity) null, (NBTTagCompound) null);
entitychicken1.s(true);
@@ -119,7 +129,7 @@
this.startRiding(entitychicken1);
}
}
-@@ -495,7 +533,7 @@
+@@ -495,7 +534,7 @@
}
public void die(DamageSource damagesource) {
@@ -128,7 +138,7 @@
if (damagesource.getEntity() instanceof EntityCreeper) {
EntityCreeper entitycreeper = (EntityCreeper) damagesource.getEntity();
-@@ -508,6 +546,7 @@
+@@ -508,6 +547,7 @@
}
}
}