@@ -97,16 +97,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -411,18 +437,28 @@
|
||||
@@ -412,21 +438,30 @@
|
||||
}
|
||||
|
||||
EntityVillager entityvillager = (EntityVillager) entityliving;
|
||||
- EntityZombieVillager entityzombievillager = (EntityZombieVillager) entityvillager.convertTo(EntityTypes.ZOMBIE_VILLAGER, false);
|
||||
+ // CraftBukkit start
|
||||
+ zombifyVillager(worldserver, entityvillager, this.blockPosition(), this.isSilent(), CreatureSpawnEvent.SpawnReason.INFECTION);
|
||||
+ flag = zombifyVillager(worldserver, entityvillager, this.blockPosition(), this.isSilent(), CreatureSpawnEvent.SpawnReason.INFECTION) == null;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
+ return flag;
|
||||
+ }
|
||||
+
|
||||
+ public static EntityZombieVillager zombifyVillager(WorldServer worldserver, EntityVillager entityvillager, net.minecraft.core.BlockPosition blockPosition, boolean silent, CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
+ EntityZombieVillager entityzombievillager = (EntityZombieVillager) entityvillager.convertTo(EntityTypes.ZOMBIE_VILLAGER, false, EntityTransformEvent.TransformReason.INFECTION, spawnReason);
|
||||
+ if (entityzombievillager != null) {
|
||||
@@ -122,14 +124,17 @@
|
||||
+ if (!silent) {
|
||||
+ worldserver.levelEvent((EntityHuman) null, 1026, blockPosition, 0);
|
||||
}
|
||||
-
|
||||
- flag = false;
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
- return flag;
|
||||
+ return entityzombievillager; // CraftBukkit
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -473,7 +509,7 @@
|
||||
@@ -478,7 +513,7 @@
|
||||
entitychicken1.finalizeSpawn(worldaccess, difficultydamagescaler, EnumMobSpawn.JOCKEY, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
entitychicken1.setChickenJockey(true);
|
||||
this.startRiding(entitychicken1);
|
||||
|
||||
Reference in New Issue
Block a user