@@ -1,11 +1,10 @@
|
||||
--- a/net/minecraft/server/EntityZombie.java
|
||||
+++ b/net/minecraft/server/EntityZombie.java
|
||||
@@ -9,6 +9,15 @@
|
||||
@@ -9,6 +9,14 @@
|
||||
import java.util.function.Predicate;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
+import org.bukkit.entity.Zombie;
|
||||
+import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
+import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||
@@ -16,7 +15,7 @@
|
||||
public class EntityZombie extends EntityMonster {
|
||||
|
||||
private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
|
||||
@@ -23,6 +32,7 @@
|
||||
@@ -23,6 +31,7 @@
|
||||
private boolean bs;
|
||||
private int bt;
|
||||
public int drownedConversionTime;
|
||||
@@ -24,7 +23,7 @@
|
||||
|
||||
public EntityZombie(EntityTypes<? extends EntityZombie> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -139,7 +149,10 @@
|
||||
@@ -139,7 +148,10 @@
|
||||
public void tick() {
|
||||
if (!this.world.isClientSide && this.isAlive() && !this.isNoAI()) {
|
||||
if (this.isDrownConverting()) {
|
||||
@@ -36,7 +35,7 @@
|
||||
if (this.drownedConversionTime < 0) {
|
||||
this.eP();
|
||||
}
|
||||
@@ -156,6 +169,7 @@
|
||||
@@ -156,6 +168,7 @@
|
||||
}
|
||||
|
||||
super.tick();
|
||||
@@ -44,7 +43,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -188,6 +202,7 @@
|
||||
@@ -188,6 +201,7 @@
|
||||
}
|
||||
|
||||
public void startDrownedConversion(int i) {
|
||||
@@ -52,7 +51,7 @@
|
||||
this.drownedConversionTime = i;
|
||||
this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true);
|
||||
}
|
||||
@@ -201,11 +216,15 @@
|
||||
@@ -201,11 +215,15 @@
|
||||
}
|
||||
|
||||
protected void b(EntityTypes<? extends EntityZombie> entitytypes) {
|
||||
@@ -69,7 +68,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -245,9 +264,9 @@
|
||||
@@ -245,9 +263,9 @@
|
||||
if (SpawnerCreature.a(entitypositiontypes_surface, (IWorldReader) this.world, blockposition, entitytypes) && EntityPositionTypes.a(entitytypes, worldserver, EnumMobSpawn.REINFORCEMENT, blockposition, this.world.random)) {
|
||||
entityzombie.setPosition((double) i1, (double) j1, (double) k1);
|
||||
if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.j((Entity) entityzombie) && this.world.getCubes(entityzombie) && !this.world.containsLiquid(entityzombie.getBoundingBox())) {
|
||||
@@ -81,7 +80,7 @@
|
||||
this.getAttributeInstance(GenericAttributes.SPAWN_REINFORCEMENTS).addModifier(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, AttributeModifier.Operation.ADDITION));
|
||||
entityzombie.getAttributeInstance(GenericAttributes.SPAWN_REINFORCEMENTS).addModifier(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, AttributeModifier.Operation.ADDITION));
|
||||
break;
|
||||
@@ -268,7 +287,14 @@
|
||||
@@ -268,7 +286,14 @@
|
||||
float f = this.world.getDamageScaler(this.getChunkCoordinates()).b();
|
||||
|
||||
if (this.getItemInMainHand().isEmpty() && this.isBurning() && this.random.nextFloat() < f * 0.3F) {
|
||||
@@ -97,7 +96,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,7 +375,12 @@
|
||||
@@ -349,7 +374,12 @@
|
||||
}
|
||||
|
||||
EntityVillager entityvillager = (EntityVillager) entityliving;
|
||||
@@ -111,7 +110,7 @@
|
||||
|
||||
entityzombievillager.prepare(worldserver, worldserver.getDamageScaler(entityzombievillager.getChunkCoordinates()), EnumMobSpawn.CONVERSION, new EntityZombie.GroupDataZombie(false, true), (NBTTagCompound) null);
|
||||
entityzombievillager.setVillagerData(entityvillager.getVillagerData());
|
||||
@@ -406,7 +437,7 @@
|
||||
@@ -406,7 +436,7 @@
|
||||
entitychicken1.prepare(worldaccess, difficultydamagescaler, EnumMobSpawn.JOCKEY, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
entitychicken1.setChickenJockey(true);
|
||||
this.startRiding(entitychicken1);
|
||||
|
||||
Reference in New Issue
Block a user