35 lines
2.0 KiB
Diff
35 lines
2.0 KiB
Diff
--- a/net/minecraft/world/level/levelgen/structure/PersistentStructureLegacy.java
|
|
+++ b/net/minecraft/world/level/levelgen/structure/PersistentStructureLegacy.java
|
|
@@ -21,6 +21,10 @@
|
|
import net.minecraft.world.level.World;
|
|
import net.minecraft.world.level.storage.WorldPersistentData;
|
|
|
|
+// CraftBukkit start
|
|
+import net.minecraft.world.level.dimension.WorldDimension;
|
|
+// CraftBukkit end
|
|
+
|
|
public class PersistentStructureLegacy {
|
|
|
|
private static final Map<String, String> CURRENT_TO_LEGACY_MAP = (Map) SystemUtils.make(Maps.newHashMap(), (hashmap) -> {
|
|
@@ -236,16 +240,16 @@
|
|
}
|
|
}
|
|
|
|
- public static PersistentStructureLegacy getLegacyStructureHandler(ResourceKey<World> resourcekey, @Nullable WorldPersistentData worldpersistentdata) {
|
|
- if (resourcekey == World.OVERWORLD) {
|
|
+ public static PersistentStructureLegacy getLegacyStructureHandler(ResourceKey<WorldDimension> resourcekey, @Nullable WorldPersistentData worldpersistentdata) { // CraftBukkit
|
|
+ if (resourcekey == WorldDimension.OVERWORLD) { // CraftBukkit
|
|
return new PersistentStructureLegacy(worldpersistentdata, ImmutableList.of("Monument", "Stronghold", "Village", "Mineshaft", "Temple", "Mansion"), ImmutableList.of("Village", "Mineshaft", "Mansion", "Igloo", "Desert_Pyramid", "Jungle_Pyramid", "Swamp_Hut", "Stronghold", "Monument"));
|
|
} else {
|
|
ImmutableList immutablelist;
|
|
|
|
- if (resourcekey == World.NETHER) {
|
|
+ if (resourcekey == WorldDimension.NETHER) { // CraftBukkit
|
|
immutablelist = ImmutableList.of("Fortress");
|
|
return new PersistentStructureLegacy(worldpersistentdata, immutablelist, immutablelist);
|
|
- } else if (resourcekey == World.END) {
|
|
+ } else if (resourcekey == WorldDimension.END) { // CraftBukkit
|
|
immutablelist = ImmutableList.of("EndCity");
|
|
return new PersistentStructureLegacy(worldpersistentdata, immutablelist, immutablelist);
|
|
} else {
|