From 27fddd665dba3e1c2d386c09a055687077da0d23 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke <nassim@njahnke.dev> Date: Thu, 8 Dec 2022 11:53:14 +0100 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit/Spigot) 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: dea9ce0a SPIGOT-7198: Add Sittable interface to Camel CraftBukkit Changes: eecb4c0dc SPIGOT-7196: Exception loading alternate worlds 0ff61e8fa SPIGOT-7198: Add Sittable interface to Camel 676441aac PR-1121: Handle additional missing SpawnEggs in MetaSpawnEgg e85280e02 Handle missing SpawnEggs in MetaSpawnEgg Spigot Changes: d90018e0 SPIGOT-7199: NPE loading or creating world with custom chunk generator --- patches/server/Add-missing-spawn-eggs.patch | 72 ------------------- ...vanilla-BiomeProvider-from-WorldInfo.patch | 2 +- patches/server/Rewrite-chunk-system.patch | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 6 files changed, 5 insertions(+), 77 deletions(-) delete mode 100644 patches/server/Add-missing-spawn-eggs.patch diff --git a/patches/server/Add-missing-spawn-eggs.patch b/patches/server/Add-missing-spawn-eggs.patch deleted file mode 100644 index d6991a0e21..0000000000 --- a/patches/server/Add-missing-spawn-eggs.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> -Date: Wed, 8 Jun 2022 15:58:20 -0400 -Subject: [PATCH] Add missing spawn eggs - - -diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -0,0 +0,0 @@ public final class CraftItemFactory implements ItemFactory { - case ZOMBIE_SPAWN_EGG: - case ZOMBIE_VILLAGER_SPAWN_EGG: - case ZOMBIFIED_PIGLIN_SPAWN_EGG: -+ // Paper start -+ case ALLAY_SPAWN_EGG: -+ case CAMEL_SPAWN_EGG: -+ case ENDER_DRAGON_SPAWN_EGG: -+ case FROG_SPAWN_EGG: -+ case IRON_GOLEM_SPAWN_EGG: -+ case TADPOLE_SPAWN_EGG: -+ case SNOW_GOLEM_SPAWN_EGG: -+ case WARDEN_SPAWN_EGG: -+ case WITHER_SPAWN_EGG: -+ // Paper end - return meta instanceof CraftMetaSpawnEgg ? meta : new CraftMetaSpawnEgg(meta); - case ARMOR_STAND: - return meta instanceof CraftMetaArmorStand ? meta : new CraftMetaArmorStand(meta); -diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -0,0 +0,0 @@ public final class CraftItemStack extends ItemStack { - case ZOMBIE_SPAWN_EGG: - case ZOMBIE_VILLAGER_SPAWN_EGG: - case ZOMBIFIED_PIGLIN_SPAWN_EGG: -+ // Paper start -+ case ALLAY_SPAWN_EGG: -+ case CAMEL_SPAWN_EGG: -+ case ENDER_DRAGON_SPAWN_EGG: -+ case FROG_SPAWN_EGG: -+ case IRON_GOLEM_SPAWN_EGG: -+ case TADPOLE_SPAWN_EGG: -+ case SNOW_GOLEM_SPAWN_EGG: -+ case WARDEN_SPAWN_EGG: -+ case WITHER_SPAWN_EGG: -+ // Paper end - return new CraftMetaSpawnEgg(item.getTag()); - case ARMOR_STAND: - return new CraftMetaArmorStand(item.getTag()); -diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java -+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java -@@ -0,0 +0,0 @@ import org.bukkit.material.MaterialData; - public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { - - private static final Set<Material> SPAWN_EGG_MATERIALS = Sets.newHashSet( -+ // Paper start -+ Material.ALLAY_SPAWN_EGG, -+ Material.CAMEL_SPAWN_EGG, -+ Material.ENDER_DRAGON_SPAWN_EGG, -+ Material.FROG_SPAWN_EGG, -+ Material.IRON_GOLEM_SPAWN_EGG, -+ Material.TADPOLE_SPAWN_EGG, -+ Material.SNOW_GOLEM_SPAWN_EGG, -+ Material.WARDEN_SPAWN_EGG, -+ Material.WITHER_SPAWN_EGG, -+ // Paper end - Material.AXOLOTL_SPAWN_EGG, - Material.BAT_SPAWN_EGG, - Material.BEE_SPAWN_EGG, diff --git a/patches/server/Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/Expose-vanilla-BiomeProvider-from-WorldInfo.patch index fcaea74e3d..d776899e31 100644 --- a/patches/server/Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -23,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(worlddata)); - LevelStem worlddimension = (LevelStem) iregistry.get(actualDimension); + LevelStem worlddimension = this.getServer().registries().compositeAccess().registryOrThrow(Registries.LEVEL_STEM).get(actualDimension); - WorldInfo worldInfo = new CraftWorldInfo(worlddata, worldSession, creator.environment(), worlddimension.type().value()); + WorldInfo worldInfo = new CraftWorldInfo(worlddata, worldSession, creator.environment(), worlddimension.type().value(), worlddimension.generator(), this.getHandle().getServer().registryAccess()); // Paper diff --git a/patches/server/Rewrite-chunk-system.patch b/patches/server/Rewrite-chunk-system.patch index c73bbf9aa9..9505044f59 100644 --- a/patches/server/Rewrite-chunk-system.patch +++ b/patches/server/Rewrite-chunk-system.patch @@ -13638,7 +13638,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.entityMap = new Int2ObjectOpenHashMap(); @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - this.chunkGeneratorState = chunkGenerator.createState(iregistrycustom.lookupOrThrow(Registries.STRUCTURE_SET), this.randomState, j); + this.chunkGeneratorState = chunkGenerator.createState(iregistrycustom.lookupOrThrow(Registries.STRUCTURE_SET), this.randomState, j, world.spigotConfig); // Spigot this.mainThreadExecutor = mainThreadExecutor; - ProcessorMailbox<Runnable> threadedmailbox = ProcessorMailbox.create(executor, "worldgen"); + // Paper - rewrite chunk system diff --git a/work/Bukkit b/work/Bukkit index bf3239f7a3..dea9ce0a79 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit bf3239f7a3d8ff0359bcacd13012081146ff3c3b +Subproject commit dea9ce0a799f48e90e17e0f8c3db89bfb7cda3cd diff --git a/work/CraftBukkit b/work/CraftBukkit index 19e6be0209..eecb4c0dc0 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 19e6be0209d7547c7cdcceae54d4b299f9cd751c +Subproject commit eecb4c0dc069b91ea5be52ca8fa831ecde666c19 diff --git a/work/Spigot b/work/Spigot index 61bffe0cce..d90018e043 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 61bffe0cce4e22325a65715f407823d860a32c5c +Subproject commit d90018e043c1bdf8dd894701e61927c4f1a8b064