diff options
author | Nassim Jahnke <[email protected]> | 2022-09-12 13:31:45 +0200 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2022-09-12 13:31:45 +0200 |
commit | ef0e5a642d33ac62f070c45a61cb42647b2744cd (patch) | |
tree | 70dff1b36e6d4306f059b3c8e335527af00adf73 /patches/server/0849-Option-to-have-default-CustomSpawners-in-custom-worl.patch | |
parent | 51183af967aafb3d57dc19421da1bcb0aea9d3d2 (diff) | |
download | Paper-ef0e5a642d33ac62f070c45a61cb42647b2744cd.tar.gz Paper-ef0e5a642d33ac62f070c45a61cb42647b2744cd.zip |
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:
9ae3f10f SPIGOT-3842: Add Player#fireworkBoost() and expand Firework API
48c0c547 PR-786: Add methods to get sounds from entities
CraftBukkit Changes:
5cc9c022a SPIGOT-7152: Handle hand item changing during air interact event
4ffa1acf6 SPIGOT-7154: Players get kicked when interacting with a conversation
4daa21123 SPIGOT-3842: Add Player#fireworkBoost() and expand Firework API
e5d6a9bbf PR-1100: Add methods to get sounds from entities
b7e9f1c8b SPIGOT-7146: Reduce use of Material switch in ItemMeta
Spigot Changes:
4c157bb4 Rebuild patches
Diffstat (limited to 'patches/server/0849-Option-to-have-default-CustomSpawners-in-custom-worl.patch')
-rw-r--r-- | patches/server/0849-Option-to-have-default-CustomSpawners-in-custom-worl.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/patches/server/0849-Option-to-have-default-CustomSpawners-in-custom-worl.patch b/patches/server/0849-Option-to-have-default-CustomSpawners-in-custom-worl.patch new file mode 100644 index 0000000000..b1bb942ed4 --- /dev/null +++ b/patches/server/0849-Option-to-have-default-CustomSpawners-in-custom-worl.patch @@ -0,0 +1,32 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic <[email protected]> +Date: Sat, 19 Feb 2022 20:15:41 -0800 +Subject: [PATCH] Option to have default CustomSpawners in custom worlds + +By default, only LevelStem's that specifically match the ResourceKey for +OVERWORLD will have the 5 (currently) impls of CustomSpawner (for +phantoms, wandering traders, etc.). This adds an option to instead of +just looking at the LevelStem key, look at the DimensionType key which +is one level below that. Defaults to off to keep vanilla behavior. + +diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java +index 98654c77b2925228458fae447510ec1d6b217370..d53972b69322e03d7e8054a2dcdbdb963055988c 100644 +--- a/src/main/java/net/minecraft/server/MinecraftServer.java ++++ b/src/main/java/net/minecraft/server/MinecraftServer.java +@@ -589,7 +589,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa + this.commandStorage = new CommandStorage(worldpersistentdata); + } else { + ChunkProgressListener worldloadlistener = this.progressListenerFactory.create(11); +- world = new ServerLevel(this, this.executor, worldSession, iworlddataserver, worldKey, worlddimension, worldloadlistener, flag, j, ImmutableList.of(), true, org.bukkit.World.Environment.getEnvironment(dimension), gen, biomeProvider); ++ // Paper start - option to use the dimension_type to check if spawners should be added. I imagine mojang will add some datapack-y way of managing this in the future. ++ final List<CustomSpawner> spawners; ++ if (io.papermc.paper.configuration.GlobalConfiguration.get().misc.useDimensionTypeForCustomSpawners && this.registryHolder.registryOrThrow(Registry.DIMENSION_TYPE_REGISTRY).getResourceKey(worlddimension.typeHolder().value()).orElseThrow() == net.minecraft.world.level.dimension.BuiltinDimensionTypes.OVERWORLD) { ++ spawners = list; ++ } else { ++ spawners = Collections.emptyList(); ++ } ++ world = new ServerLevel(this, this.executor, worldSession, iworlddataserver, worldKey, worlddimension, worldloadlistener, flag, j, spawners, true, org.bukkit.World.Environment.getEnvironment(dimension), gen, biomeProvider); ++ // Paper end + } + + worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified()); |