Updated Upstream (CraftBukkit) (#5484)

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

CraftBukkit Changes:
6b8cd9a7 SPIGOT-6207: forcibly drop the items of a converted zombie villager
This commit is contained in:
Josh Roy 2021-04-11 21:03:08 -04:00 committed by GitHub
parent d560151ecd
commit be13705177
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
89 changed files with 15 additions and 39 deletions

View File

@ -1,24 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <blake.galbreath@gmail.com>
Date: Tue, 8 Dec 2020 22:06:56 -0600
Subject: [PATCH] Fix curing villager makes equipment disappear
This fixes the CB bug where curing a villager that is holding
equipment (weapons/armor) causes the items to disappear instead of drop
to the ground by forcing the items to drop instead of going to the drops
field for the EntityDeathEvent which does not fire for entity conversions.
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/EntityZombieVillager.java
index e137b1e17edd05d244a9d520bb4435f17d8c7daa..c03f4655dcca3d9635a7e13244b7977425a3f291 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EntityZombieVillager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityZombieVillager.java
@@ -222,7 +222,9 @@ public class EntityZombieVillager extends EntityZombie implements VillagerDataHo
double d0 = (double) this.e(enumitemslot);
if (d0 > 1.0D) {
+ this.forceDrops = true; // Paper - fix SPIGOT-6207
this.a(itemstack);
+ this.forceDrops = false; // Paper - fix SPIGOT-6207
}
}
}

View File

@ -23,7 +23,7 @@ index 7d50aded88f5b7dfebaea1aebc86231f7b5c4e25..652d87fc5d566dba8018c81676329f0e
public static boolean velocityOnlineMode;
public static byte[] velocitySecretKey;
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 9ec4316c8d517f8af9f36f586e833b5a3ad30895..c6b33b355b8e06d4ef6a8f542ab460c55af8c00e 100644
index 2380b7c82d012e466172b32b04601f5c691ca0c5..25eaad51bc7a8593d47804ea2774382d4dd55080 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -1,5 +1,6 @@

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Expose LivingEntity hurt direction
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 9a826ae0319dd52ca7d98ea5d7312fb773736ddb..800a8b8e1a49eb6ec920abaad4514a9a91a3542e 100644
index 358bb6244b7b9e785c7dcc3725ee00cfbb917cec..deffd82dfca1d2eea6e5b8db9228015bf35ad0a3 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -163,7 +163,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add OBSTRUCTED reason to BedEnterResult
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index be2aa53a45b98d6d6de0c464653264399510d630..89c6d1f05878d6c220090af82939cbba4fa2555f 100644
index 2e4dc2fb42b10243ddacbf5af606910a5769ea01..cb577bd576ff099f183b1c9e5d60bd74276c7394 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -264,6 +264,10 @@ public class CraftEventFactory {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Fix interact event not being called in adventure
Call PlayerInteractEvent when left-clicking on a block in adventure mode
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index c6b33b355b8e06d4ef6a8f542ab460c55af8c00e..60b72fc3cf859fab80aba310882b0309fd68ff37 100644
index 25eaad51bc7a8593d47804ea2774382d4dd55080..8009055a7c178dac97364e32d2e689539e45a412 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -1700,7 +1700,7 @@ public class PlayerConnection implements PacketListenerPlayIn {

View File

@ -29,7 +29,7 @@ index ccab4714bf5a6be8afd92430874fd6f881d4f92f..223cc0ba06cf4b007049880daad881e5
} else {
ItemStack itemstack = tileentitydispenser.getItem(i);
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 89c6d1f05878d6c220090af82939cbba4fa2555f..228638d503cb6491e47920386994f2dfd6eb122e 100644
index cb577bd576ff099f183b1c9e5d60bd74276c7394..93157e38f40af84341b8bb20598cf07118e723bc 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -4,6 +4,7 @@ import com.google.common.base.Function;

View File

@ -18,7 +18,7 @@ index 5974cc9f895478eebd4922faa26d5a944064d7b6..1511cf54fea53577a2808b5d84417eee
interactResult = event.useItemInHand() == Event.Result.DENY;
interactPosition = blockposition.immutableCopy();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 228638d503cb6491e47920386994f2dfd6eb122e..40c56301f497f66f8e8f6c737a5c5c8a26d372df 100644
index 93157e38f40af84341b8bb20598cf07118e723bc..d03a9c1946da672509c56416bab9c1878e37ddb7 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -68,7 +68,9 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParameters;

View File

@ -32,7 +32,7 @@ index 37b1febb45b900dfe4b225152e66bc4be83df220..9f2e7d345d98f50e6d47cbf4bb357148
if (movingobjectposition_enummovingobjecttype == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 40c56301f497f66f8e8f6c737a5c5c8a26d372df..acb65ec8bd09b642c79bb8304bd82fb22a48608b 100644
index d03a9c1946da672509c56416bab9c1878e37ddb7..22da2cc26fc526d7222f64c296eaf26cabd23626 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1298,9 +1298,9 @@ public class CraftEventFactory {

View File

@ -17,7 +17,7 @@ index 966051ab3e720e5b3f0fb9ab852c8908c5f23f3b..9b92824f1c2797e321ced953d33d2c2f
tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index acb65ec8bd09b642c79bb8304bd82fb22a48608b..8330c04124c0c1f4f9c78ad43c34d4b00e6b42ed 100644
index 22da2cc26fc526d7222f64c296eaf26cabd23626..47906539c3e6cd7f34c0880a0bab2a185d79b71c 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -69,6 +69,7 @@ import net.minecraft.world.phys.MovingObjectPosition;

View File

@ -138,7 +138,7 @@ index 8f6d2a6a388021f437ac5554e9ece8eca89e1f46..519f0cabadcf97a44a112fd963a8d3ab
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 8330c04124c0c1f4f9c78ad43c34d4b00e6b42ed..97f9ec2706a3cbda76731f84ef80d5a4ea36e713 100644
index 47906539c3e6cd7f34c0880a0bab2a185d79b71c..32fd193d72521525972445199e02c2ae7a0e771a 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1450,8 +1450,10 @@ public class CraftEventFactory {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Skip distance map update when spawning disabled.
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
index f46f3ca87badefd668e70d792de5b3d3c0172a68..e542fe5fb63064e67c7fde8fad614826d6f3344c 100644
index 326c52f9f2cc729fd52162aeae18ec9dae3a4eaf..c5e54c519e1f686761faa53b5e9579c514a65332 100644
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
@@ -825,7 +825,7 @@ public class ChunkProviderServer extends IChunkProvider {

View File

@ -25,7 +25,7 @@ index c4da751bed3014a5521ac0014b07c139b69b1187..5da58830459d2ff10e7fde28b4199569
this.methodProfiler.a(() -> {
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index 5da7d1df97e70248d01cb1c452b26cfba415a5b0..07396504fbabc2eb006f2b7f8e53faafe67d5672 100644
index bf9bf8368b345bf0ac3b14a08e8342f7bd63dead..be7f210bd8be1e393c0c449274ff1a1b030d660e 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -213,6 +213,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@ -37,7 +37,7 @@ index 5da7d1df97e70248d01cb1c452b26cfba415a5b0..07396504fbabc2eb006f2b7f8e53faaf
return new Throwable(entity + " Added to world at " + new java.util.Date());
}
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 800a8b8e1a49eb6ec920abaad4514a9a91a3542e..b0ee9e98d5f1e56c8d82e90dd7761c8ef79cfb1c 100644
index deffd82dfca1d2eea6e5b8db9228015bf35ad0a3..21341eeb8148be119fbc1dd370c1beaf70a319e0 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -10,6 +10,7 @@ import com.mojang.datafixers.util.Pair;

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Allow adding items to BlockDropItemEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 97f9ec2706a3cbda76731f84ef80d5a4ea36e713..926440e846eff2c1aaa262aa2b3975b7dd225332 100644
index 32fd193d72521525972445199e02c2ae7a0e771a..9084aa4b7c0059c995a3d1a89188379b52c9d620 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -383,13 +383,30 @@ public class CraftEventFactory {

View File

@ -19,7 +19,7 @@ index 3e6132211912d29e34c94042b0819f11a3bd123e..921253a06daa414aed7dc6824effc65d
+ }
}
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 60b72fc3cf859fab80aba310882b0309fd68ff37..4a3f6f26da0d99ee2ff6942c2ff7d0595b53b684 100644
index 8009055a7c178dac97364e32d2e689539e45a412..5ee56f3636b299280a7c2bc5a210c63250a47fb3 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -143,6 +143,7 @@ import net.minecraft.world.level.GameRules;

@ -1 +1 @@
Subproject commit 0e26ddb6a3f17222efa24654432b71f89b341c79
Subproject commit 6b8cd9a7cb8f2ed94743d1ed4d4217c9a4138898