Updated Upstream (Bukkit/CraftBukkit/Spigot) (#5325)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: d264e972 #591: Add option for a consumer before spawning an item 1c537fce #590: Add spawn and transform reasons for piglin zombification. CraftBukkit Changes: ee5006d1 #810: Add option for a consumer before spawning an item f6a39d3c #809: Add spawn and transform reasons for piglin zombification. 0c24068a Organise imports Spigot Changes: bff52619 Organise imports
This commit is contained in:
@@ -5,10 +5,10 @@ Subject: [PATCH] Add more Zombie API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index 422632c9050d0bcc5398ac5d4cf51801cea9cdda..9b1297e564738eb40e6e9329817d8ebab11dce40 100644
|
||||
index f8b969b203cec7341382abf884a084cb4adbd7f9..f2776a9f78745f1bdd270d40b00a3123628c7c9b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -33,6 +33,7 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -32,6 +32,7 @@ public class EntityZombie extends EntityMonster {
|
||||
private int bt;
|
||||
public int drownedConversionTime;
|
||||
private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
|
||||
@@ -16,7 +16,7 @@ index 422632c9050d0bcc5398ac5d4cf51801cea9cdda..9b1297e564738eb40e6e9329817d8eba
|
||||
|
||||
public EntityZombie(EntityTypes<? extends EntityZombie> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -201,6 +202,12 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -200,6 +201,12 @@ public class EntityZombie extends EntityMonster {
|
||||
super.movementTick();
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ index 422632c9050d0bcc5398ac5d4cf51801cea9cdda..9b1297e564738eb40e6e9329817d8eba
|
||||
public void startDrownedConversion(int i) {
|
||||
this.lastTick = MinecraftServer.currentTick; // CraftBukkit
|
||||
this.drownedConversionTime = i;
|
||||
@@ -229,9 +236,16 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -228,9 +235,16 @@ public class EntityZombie extends EntityMonster {
|
||||
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ index 422632c9050d0bcc5398ac5d4cf51801cea9cdda..9b1297e564738eb40e6e9329817d8eba
|
||||
|
||||
@Override
|
||||
public boolean damageEntity(DamageSource damagesource, float f) {
|
||||
@@ -352,6 +366,7 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -351,6 +365,7 @@ public class EntityZombie extends EntityMonster {
|
||||
nbttagcompound.setBoolean("CanBreakDoors", this.eU());
|
||||
nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bt : -1);
|
||||
nbttagcompound.setInt("DrownedConversionTime", this.isDrownConverting() ? this.drownedConversionTime : -1);
|
||||
@@ -55,7 +55,7 @@ index 422632c9050d0bcc5398ac5d4cf51801cea9cdda..9b1297e564738eb40e6e9329817d8eba
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -363,7 +378,11 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -362,7 +377,11 @@ public class EntityZombie extends EntityMonster {
|
||||
if (nbttagcompound.hasKeyOfType("DrownedConversionTime", 99) && nbttagcompound.getInt("DrownedConversionTime") > -1) {
|
||||
this.startDrownedConversion(nbttagcompound.getInt("DrownedConversionTime"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user