PaperMC/paper-server/nms-patches/net/minecraft/world/level/levelgen/StructureSettings.patch
CraftBukkit/Spigot 97cd7810a3 Add mc-dev imports
By: md_5 <git@md-5.net>
2021-04-07 15:03:29 +10:00

49 lines
5 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.d;
})).apply(instance, StructureSettings::new);
});
- public static final ImmutableMap<StructureGenerator<?>, StructureSettingsFeature> b = 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_PYRAMID, 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.MONUMENT, new StructureSettingsFeature(32, 5, 10387313)).put(StructureGenerator.ENDCITY, new StructureSettingsFeature(20, 11, 10387313)).put(StructureGenerator.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.FORTRESS, new StructureSettingsFeature(27, 4, 30084232)).put(StructureGenerator.NETHER_FOSSIL, new StructureSettingsFeature(2, 1, 14357921)).build();
+ // CraftBukkit - decompile error
+ public static final ImmutableMap<StructureGenerator<?>, StructureSettingsFeature> b = 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_PYRAMID, 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.MONUMENT, new StructureSettingsFeature(32, 5, 10387313)).put(StructureGenerator.ENDCITY, new StructureSettingsFeature(20, 11, 10387313)).put(StructureGenerator.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.FORTRESS, new StructureSettingsFeature(27, 4, 30084232)).put(StructureGenerator.NETHER_FOSSIL, new StructureSettingsFeature(2, 1, 14357921)).build();
public static final StructureSettingsStronghold c;
private final Map<StructureGenerator<?>, StructureSettingsFeature> d;
@Nullable
private final StructureSettingsStronghold e;
public StructureSettings(Optional<StructureSettingsStronghold> optional, Map<StructureGenerator<?>, StructureSettingsFeature> map) {
- this.e = (StructureSettingsStronghold) optional.orElse((Object) null);
+ this.e = (StructureSettingsStronghold) optional.orElse(null); // CraftBukkit - decompile error
this.d = map;
}
@@ -53,6 +55,15 @@
}
static {
+ // CraftBukkit - decompile error start
+ c = new StructureSettingsStronghold(32, 3, 128);
+
+ for (StructureGenerator<?> structuregenerator : IRegistry.STRUCTURE_FEATURE) {
+ if (!StructureSettings.b.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.b.containsKey(structuregenerator));
throw new IllegalStateException("Structure feature without default settings: " + IRegistry.STRUCTURE_FEATURE.getKey(structuregenerator));
+ */
+ // CraftBukkit - decompile error end
}
}