--- a/net/minecraft/world/level/levelgen/StructureSettings.java +++ b/net/minecraft/world/level/levelgen/StructureSettings.java @@ -1,3 +1,4 @@ +// mc-dev import package net.minecraft.world.level.levelgen; import com.google.common.annotations.VisibleForTesting; @@ -31,7 +32,8 @@ return structuresettings.structureConfig; })).apply(instance, StructureSettings::new); }); - public static final ImmutableMap, StructureSettingsFeature> DEFAULTS = ImmutableMap.builder().put(StructureGenerator.VILLAGE, new StructureSettingsFeature(34, 8, 10387312)).put(StructureGenerator.DESERT_PYRAMID, new StructureSettingsFeature(32, 8, 14357617)).put(StructureGenerator.IGLOO, new StructureSettingsFeature(32, 8, 14357618)).put(StructureGenerator.JUNGLE_TEMPLE, new StructureSettingsFeature(32, 8, 14357619)).put(StructureGenerator.SWAMP_HUT, new StructureSettingsFeature(32, 8, 14357620)).put(StructureGenerator.PILLAGER_OUTPOST, new StructureSettingsFeature(32, 8, 165745296)).put(StructureGenerator.STRONGHOLD, new StructureSettingsFeature(1, 0, 0)).put(StructureGenerator.OCEAN_MONUMENT, new StructureSettingsFeature(32, 5, 10387313)).put(StructureGenerator.END_CITY, new StructureSettingsFeature(20, 11, 10387313)).put(StructureGenerator.WOODLAND_MANSION, new StructureSettingsFeature(80, 20, 10387319)).put(StructureGenerator.BURIED_TREASURE, new StructureSettingsFeature(1, 0, 0)).put(StructureGenerator.MINESHAFT, new StructureSettingsFeature(1, 0, 0)).put(StructureGenerator.RUINED_PORTAL, new StructureSettingsFeature(40, 15, 34222645)).put(StructureGenerator.SHIPWRECK, new StructureSettingsFeature(24, 4, 165745295)).put(StructureGenerator.OCEAN_RUIN, new StructureSettingsFeature(20, 8, 14357621)).put(StructureGenerator.BASTION_REMNANT, new StructureSettingsFeature(27, 4, 30084232)).put(StructureGenerator.NETHER_BRIDGE, new StructureSettingsFeature(27, 4, 30084232)).put(StructureGenerator.NETHER_FOSSIL, new StructureSettingsFeature(2, 1, 14357921)).build(); + // CraftBukkit - decompile error + public static final ImmutableMap, StructureSettingsFeature> DEFAULTS = ImmutableMap., StructureSettingsFeature>builder().put(StructureGenerator.VILLAGE, new StructureSettingsFeature(34, 8, 10387312)).put(StructureGenerator.DESERT_PYRAMID, new StructureSettingsFeature(32, 8, 14357617)).put(StructureGenerator.IGLOO, new StructureSettingsFeature(32, 8, 14357618)).put(StructureGenerator.JUNGLE_TEMPLE, new StructureSettingsFeature(32, 8, 14357619)).put(StructureGenerator.SWAMP_HUT, new StructureSettingsFeature(32, 8, 14357620)).put(StructureGenerator.PILLAGER_OUTPOST, new StructureSettingsFeature(32, 8, 165745296)).put(StructureGenerator.STRONGHOLD, new StructureSettingsFeature(1, 0, 0)).put(StructureGenerator.OCEAN_MONUMENT, new StructureSettingsFeature(32, 5, 10387313)).put(StructureGenerator.END_CITY, new StructureSettingsFeature(20, 11, 10387313)).put(StructureGenerator.WOODLAND_MANSION, new StructureSettingsFeature(80, 20, 10387319)).put(StructureGenerator.BURIED_TREASURE, new StructureSettingsFeature(1, 0, 0)).put(StructureGenerator.MINESHAFT, new StructureSettingsFeature(1, 0, 0)).put(StructureGenerator.RUINED_PORTAL, new StructureSettingsFeature(40, 15, 34222645)).put(StructureGenerator.SHIPWRECK, new StructureSettingsFeature(24, 4, 165745295)).put(StructureGenerator.OCEAN_RUIN, new StructureSettingsFeature(20, 8, 14357621)).put(StructureGenerator.BASTION_REMNANT, new StructureSettingsFeature(27, 4, 30084232)).put(StructureGenerator.NETHER_BRIDGE, new StructureSettingsFeature(27, 4, 30084232)).put(StructureGenerator.NETHER_FOSSIL, new StructureSettingsFeature(2, 1, 14357921)).build(); public static final StructureSettingsStronghold DEFAULT_STRONGHOLD; private final Map, StructureSettingsFeature> structureConfig; private final ImmutableMap, ImmutableMultimap, ResourceKey>> configuredStructures; @@ -54,7 +56,7 @@ } public StructureSettings(Optional optional, Map, StructureSettingsFeature> map) { - this(map, (StructureSettingsStronghold) optional.orElse((Object) null)); + this(map, (StructureSettingsStronghold) optional.orElse(null)); // CraftBukkit - decompile error } public StructureSettings(boolean flag) { @@ -81,6 +83,15 @@ } static { + // CraftBukkit - decompile error start + DEFAULT_STRONGHOLD = new StructureSettingsStronghold(32, 3, 128); + + for (StructureGenerator structuregenerator : IRegistry.STRUCTURE_FEATURE) { + if (!StructureSettings.DEFAULTS.containsKey(structuregenerator)) { + throw new IllegalStateException("Structure feature without default settings: " + IRegistry.STRUCTURE_FEATURE.getKey(structuregenerator)); + } + } + /* Iterator iterator = IRegistry.STRUCTURE_FEATURE.iterator(); StructureGenerator structuregenerator; @@ -95,5 +106,7 @@ } while (StructureSettings.DEFAULTS.containsKey(structuregenerator)); throw new IllegalStateException("Structure feature without default settings: " + IRegistry.STRUCTURE_FEATURE.getKey(structuregenerator)); + */ + // CraftBukkit - decompile error end } }