@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityZombie.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityZombie.java
|
||||
@@ -66,6 +66,15 @@
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
@@ -67,6 +67,15 @@
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import org.joml.Vector3f;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
@@ -16,7 +16,7 @@
|
||||
public class EntityZombie extends EntityMonster {
|
||||
|
||||
private static final UUID SPEED_MODIFIER_BABY_UUID = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
|
||||
@@ -86,6 +95,7 @@
|
||||
@@ -87,6 +96,7 @@
|
||||
private boolean canBreakDoors;
|
||||
private int inWaterTime;
|
||||
public int conversionTime;
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
public EntityZombie(EntityTypes<? extends EntityZombie> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -202,7 +212,10 @@
|
||||
@@ -203,7 +213,10 @@
|
||||
public void tick() {
|
||||
if (!this.level().isClientSide && this.isAlive() && !this.isNoAi()) {
|
||||
if (this.isUnderWaterConverting()) {
|
||||
@@ -36,7 +36,7 @@
|
||||
if (this.conversionTime < 0) {
|
||||
this.doUnderWaterConversion();
|
||||
}
|
||||
@@ -219,6 +232,7 @@
|
||||
@@ -220,6 +233,7 @@
|
||||
}
|
||||
|
||||
super.tick();
|
||||
@@ -44,7 +44,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -251,6 +265,7 @@
|
||||
@@ -252,6 +266,7 @@
|
||||
}
|
||||
|
||||
public void startUnderWaterConversion(int i) {
|
||||
@@ -52,7 +52,7 @@
|
||||
this.conversionTime = i;
|
||||
this.getEntityData().set(EntityZombie.DATA_DROWNED_CONVERSION_ID, true);
|
||||
}
|
||||
@@ -264,11 +279,15 @@
|
||||
@@ -265,11 +280,15 @@
|
||||
}
|
||||
|
||||
protected void convertToZombieType(EntityTypes<? extends EntityZombie> entitytypes) {
|
||||
@@ -69,7 +69,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -308,9 +327,9 @@
|
||||
@@ -309,9 +328,9 @@
|
||||
if (SpawnerCreature.isSpawnPositionOk(entitypositiontypes_surface, this.level(), blockposition, entitytypes) && EntityPositionTypes.checkSpawnRules(entitytypes, worldserver, EnumMobSpawn.REINFORCEMENT, blockposition, this.level().random)) {
|
||||
entityzombie.setPos((double) i1, (double) j1, (double) k1);
|
||||
if (!this.level().hasNearbyAlivePlayer((double) i1, (double) j1, (double) k1, 7.0D) && this.level().isUnobstructed(entityzombie) && this.level().noCollision((Entity) entityzombie) && !this.level().containsAnyLiquid(entityzombie.getBoundingBox())) {
|
||||
@@ -81,7 +81,7 @@
|
||||
this.getAttribute(GenericAttributes.SPAWN_REINFORCEMENTS_CHANCE).addPermanentModifier(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, AttributeModifier.Operation.ADDITION));
|
||||
entityzombie.getAttribute(GenericAttributes.SPAWN_REINFORCEMENTS_CHANCE).addPermanentModifier(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, AttributeModifier.Operation.ADDITION));
|
||||
break;
|
||||
@@ -331,7 +350,14 @@
|
||||
@@ -332,7 +351,14 @@
|
||||
float f = this.level().getCurrentDifficultyAt(this.blockPosition()).getEffectiveDifficulty();
|
||||
|
||||
if (this.getMainHandItem().isEmpty() && this.isOnFire() && this.random.nextFloat() < f * 0.3F) {
|
||||
@@ -97,7 +97,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,8 +439,17 @@
|
||||
@@ -414,8 +440,17 @@
|
||||
if (worldserver.getDifficulty() != EnumDifficulty.HARD && this.random.nextBoolean()) {
|
||||
return flag;
|
||||
}
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
if (entityzombievillager != null) {
|
||||
entityzombievillager.finalizeSpawn(worldserver, worldserver.getCurrentDifficultyAt(entityzombievillager.blockPosition()), EnumMobSpawn.CONVERSION, new EntityZombie.GroupDataZombie(false, true), (NBTTagCompound) null);
|
||||
@@ -422,15 +457,17 @@
|
||||
@@ -423,15 +458,17 @@
|
||||
entityzombievillager.setGossips((NBTBase) entityvillager.getGossips().store(DynamicOpsNBT.INSTANCE));
|
||||
entityzombievillager.setTradeOffers(entityvillager.getOffers().createTag());
|
||||
entityzombievillager.setVillagerXp(entityvillager.getVillagerXp());
|
||||
@@ -139,7 +139,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -483,7 +520,7 @@
|
||||
@@ -484,7 +521,7 @@
|
||||
entitychicken1.finalizeSpawn(worldaccess, difficultydamagescaler, EnumMobSpawn.JOCKEY, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
entitychicken1.setChickenJockey(true);
|
||||
this.startRiding(entitychicken1);
|
||||
|
||||
Reference in New Issue
Block a user