Repackage NMS

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-03-16 09:00:00 +11:00
parent 18496e998f
commit 9da047989c
968 changed files with 5448 additions and 5050 deletions

View File

@@ -1,10 +1,11 @@
--- a/net/minecraft/server/EntityZombie.java
+++ b/net/minecraft/server/EntityZombie.java
@@ -9,6 +9,14 @@
import java.util.function.Predicate;
import javax.annotation.Nullable;
--- a/net/minecraft/world/entity/monster/EntityZombie.java
+++ b/net/minecraft/world/entity/monster/EntityZombie.java
@@ -70,6 +70,15 @@
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.IBlockData;
+// CraftBukkit start
+import net.minecraft.server.MinecraftServer;
+import org.bukkit.entity.Zombie;
+import org.bukkit.event.entity.CreatureSpawnEvent;
+import org.bukkit.event.entity.EntityCombustByEntityEvent;
@@ -15,7 +16,7 @@
public class EntityZombie extends EntityMonster {
private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
@@ -23,6 +31,7 @@
@@ -84,6 +93,7 @@
private boolean bs;
private int bt;
public int drownedConversionTime;
@@ -23,7 +24,7 @@
public EntityZombie(EntityTypes<? extends EntityZombie> entitytypes, World world) {
super(entitytypes, world);
@@ -139,7 +148,10 @@
@@ -200,7 +210,10 @@
public void tick() {
if (!this.world.isClientSide && this.isAlive() && !this.isNoAI()) {
if (this.isDrownConverting()) {
@@ -35,7 +36,7 @@
if (this.drownedConversionTime < 0) {
this.eP();
}
@@ -156,6 +168,7 @@
@@ -217,6 +230,7 @@
}
super.tick();
@@ -43,7 +44,7 @@
}
@Override
@@ -188,6 +201,7 @@
@@ -249,6 +263,7 @@
}
public void startDrownedConversion(int i) {
@@ -51,7 +52,7 @@
this.drownedConversionTime = i;
this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true);
}
@@ -201,11 +215,15 @@
@@ -262,11 +277,15 @@
}
protected void b(EntityTypes<? extends EntityZombie> entitytypes) {
@@ -68,7 +69,7 @@
}
}
@@ -245,9 +263,9 @@
@@ -306,9 +325,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())) {
@@ -80,7 +81,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 +286,14 @@
@@ -329,7 +348,14 @@
float f = this.world.getDamageScaler(this.getChunkCoordinates()).b();
if (this.getItemInMainHand().isEmpty() && this.isBurning() && this.random.nextFloat() < f * 0.3F) {
@@ -96,7 +97,7 @@
}
}
@@ -349,7 +374,12 @@
@@ -410,7 +436,12 @@
}
EntityVillager entityvillager = (EntityVillager) entityliving;
@@ -110,7 +111,7 @@
entityzombievillager.prepare(worldserver, worldserver.getDamageScaler(entityzombievillager.getChunkCoordinates()), EnumMobSpawn.CONVERSION, new EntityZombie.GroupDataZombie(false, true), (NBTTagCompound) null);
entityzombievillager.setVillagerData(entityvillager.getVillagerData());
@@ -406,7 +436,7 @@
@@ -467,7 +498,7 @@
entitychicken1.prepare(worldaccess, difficultydamagescaler, EnumMobSpawn.JOCKEY, (GroupDataEntity) null, (NBTTagCompound) null);
entitychicken1.setChickenJockey(true);
this.startRiding(entitychicken1);