mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 18:27:41 +01:00
b3a8254758
By: md_5 <git@md-5.net>
50 lines
5.2 KiB
Diff
50 lines
5.2 KiB
Diff
--- 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.collect.ImmutableMap;
|
|
@@ -22,14 +23,15 @@
|
|
return structuresettings.structureConfig;
|
|
})).apply(instance, StructureSettings::new);
|
|
});
|
|
- public static final ImmutableMap<StructureGenerator<?>, StructureSettingsFeature> DEFAULTS = ImmutableMap.builder().put(StructureGenerator.VILLAGE, new StructureSettingsFeature(32, 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<StructureGenerator<?>, StructureSettingsFeature> DEFAULTS = ImmutableMap.<StructureGenerator<?>, StructureSettingsFeature>builder().put(StructureGenerator.VILLAGE, new StructureSettingsFeature(32, 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<StructureGenerator<?>, StructureSettingsFeature> structureConfig;
|
|
@Nullable
|
|
private final StructureSettingsStronghold stronghold;
|
|
|
|
public StructureSettings(Optional<StructureSettingsStronghold> optional, Map<StructureGenerator<?>, StructureSettingsFeature> map) {
|
|
- this.stronghold = (StructureSettingsStronghold) optional.orElse((Object) null);
|
|
+ this.stronghold = (StructureSettingsStronghold) optional.orElse(null); // CraftBukkit - decompile error
|
|
this.structureConfig = map;
|
|
}
|
|
|
|
@@ -53,6 +55,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;
|
|
@@ -67,5 +78,7 @@
|
|
} while (StructureSettings.DEFAULTS.containsKey(structuregenerator));
|
|
|
|
throw new IllegalStateException("Structure feature without default settings: " + IRegistry.STRUCTURE_FEATURE.getKey(structuregenerator));
|
|
+ */
|
|
+ // CraftBukkit - decompile error end
|
|
}
|
|
}
|