414 lines
18 KiB
Diff
414 lines
18 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MrHua269 <wangxyper@163.com>
|
|
Date: Tue, 28 Jan 2025 18:56:59 +0800
|
|
Subject: [PATCH] Leaf Secure seed and matter seed command
|
|
|
|
|
|
diff --git a/src/main/java/me/earthme/luminol/config/modules/misc/SecureSeedConfig.java b/src/main/java/me/earthme/luminol/config/modules/misc/SecureSeedConfig.java
|
|
new file mode 100644
|
|
index 0000000000000000000000000000000000000000..923e6dee55b765e46737ee145c32b767558c0132
|
|
--- /dev/null
|
|
+++ b/src/main/java/me/earthme/luminol/config/modules/misc/SecureSeedConfig.java
|
|
@@ -0,0 +1,22 @@
|
|
+package me.earthme.luminol.config.modules.misc;
|
|
+
|
|
+import me.earthme.luminol.config.ConfigInfo;
|
|
+import me.earthme.luminol.config.EnumConfigCategory;
|
|
+import me.earthme.luminol.config.IConfigModule;
|
|
+
|
|
+public class SecureSeedConfig implements IConfigModule {
|
|
+ @ConfigInfo(baseName = "enabled", comments = """
|
|
+ Once you enable secure seed, all ores and structures are generated with 1024-bit seed
|
|
+ instead of using 64-bit seed in vanilla, made seed cracker become impossible.""")
|
|
+ public static boolean enabled = false;
|
|
+
|
|
+ @Override
|
|
+ public EnumConfigCategory getCategory() {
|
|
+ return EnumConfigCategory.MISC;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public String getBaseName() {
|
|
+ return "secure_seed";
|
|
+ }
|
|
+}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
|
index f42692cd4f0154705c3d5b030d281cfc333803ed..39cc976f65f826a00e2e637c139f9134c5e74715 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
|
@@ -206,7 +206,12 @@ public class CraftChunk implements Chunk {
|
|
@Override
|
|
public boolean isSlimeChunk() {
|
|
// 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk
|
|
- return this.worldServer.paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), worldServer.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
|
+ // Leaf start - Matter - Secure Seed
|
|
+ boolean isSlimeChunk = me.earthme.luminol.config.modules.misc.SecureSeedConfig.enabled
|
|
+ ? worldServer.getChunk(this.getX(), this.getZ()).isSlimeChunk()
|
|
+ : WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), worldServer.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
|
+ return this.worldServer.paperConfig().entities.spawning.allChunksAreSlimeChunks || isSlimeChunk;
|
|
+ // Leaf end - Matter - Secure Seed
|
|
}
|
|
|
|
@Override
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index f9f20e9fd4530d0130046b56c55e798d4ede29d1..d34502a826b1582dd13c6983ed1060373837353f 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -1422,7 +1422,11 @@ public final class CraftServer implements Server {
|
|
registryAccess = levelDataAndDimensions.dimensions().dimensionsRegistryAccess();
|
|
} else {
|
|
LevelSettings levelSettings;
|
|
- WorldOptions worldOptions = new WorldOptions(creator.seed(), creator.generateStructures(), false);
|
|
+ // Leaf start - Matter - Secure Seed
|
|
+ WorldOptions worldOptions = me.earthme.luminol.config.modules.misc.SecureSeedConfig.enabled
|
|
+ ? new WorldOptions(creator.seed(), su.plo.matter.Globals.createRandomWorldSeed(), creator.generateStructures(), false)
|
|
+ : new WorldOptions(creator.seed(), creator.generateStructures(), false);
|
|
+ // Leaf end - Matter - Secure Seed
|
|
WorldDimensions worldDimensions;
|
|
|
|
DedicatedServerProperties.WorldDimensionData properties = new DedicatedServerProperties.WorldDimensionData(GsonHelper.parse((creator.generatorSettings().isEmpty()) ? "{}" : creator.generatorSettings()), creator.type().name().toLowerCase(Locale.ROOT));
|
|
diff --git a/src/main/java/su/plo/matter/Globals.java b/src/main/java/su/plo/matter/Globals.java
|
|
new file mode 100644
|
|
index 0000000000000000000000000000000000000000..3cb89c197ca82c7f86c821fd96f6342428fff5d3
|
|
--- /dev/null
|
|
+++ b/src/main/java/su/plo/matter/Globals.java
|
|
@@ -0,0 +1,94 @@
|
|
+package su.plo.matter;
|
|
+
|
|
+import com.google.common.collect.Iterables;
|
|
+import net.minecraft.server.level.ServerLevel;
|
|
+
|
|
+import java.math.BigInteger;
|
|
+import java.security.SecureRandom;
|
|
+import java.util.Optional;
|
|
+
|
|
+public class Globals {
|
|
+ public static final int WORLD_SEED_LONGS = 16;
|
|
+ public static final int WORLD_SEED_BITS = WORLD_SEED_LONGS * 64;
|
|
+
|
|
+ public static final long[] worldSeed = new long[WORLD_SEED_LONGS];
|
|
+ public static final ThreadLocal<Integer> dimension = ThreadLocal.withInitial(() -> 0);
|
|
+
|
|
+ public enum Salt {
|
|
+ UNDEFINED,
|
|
+ BASTION_FEATURE,
|
|
+ WOODLAND_MANSION_FEATURE,
|
|
+ MINESHAFT_FEATURE,
|
|
+ BURIED_TREASURE_FEATURE,
|
|
+ NETHER_FORTRESS_FEATURE,
|
|
+ PILLAGER_OUTPOST_FEATURE,
|
|
+ GEODE_FEATURE,
|
|
+ NETHER_FOSSIL_FEATURE,
|
|
+ OCEAN_MONUMENT_FEATURE,
|
|
+ RUINED_PORTAL_FEATURE,
|
|
+ POTENTIONAL_FEATURE,
|
|
+ GENERATE_FEATURE,
|
|
+ JIGSAW_PLACEMENT,
|
|
+ STRONGHOLDS,
|
|
+ POPULATION,
|
|
+ DECORATION,
|
|
+ SLIME_CHUNK
|
|
+ }
|
|
+
|
|
+ public static void setupGlobals(ServerLevel world) {
|
|
+ if (!me.earthme.luminol.config.modules.misc.SecureSeedConfig.enabled) return;
|
|
+
|
|
+ long[] seed = world.getServer().getWorldData().worldGenOptions().featureSeed();
|
|
+ System.arraycopy(seed, 0, worldSeed, 0, WORLD_SEED_LONGS);
|
|
+ int worldIndex = Iterables.indexOf(world.getServer().levelKeys(), it -> it == world.dimension());
|
|
+ if (worldIndex == -1)
|
|
+ worldIndex = world.getServer().levelKeys().size(); // if we are in world construction it may not have been added to the map yet
|
|
+ dimension.set(worldIndex);
|
|
+ }
|
|
+
|
|
+ public static long[] createRandomWorldSeed() {
|
|
+ long[] seed = new long[WORLD_SEED_LONGS];
|
|
+ SecureRandom rand = new SecureRandom();
|
|
+ for (int i = 0; i < WORLD_SEED_LONGS; i++) {
|
|
+ seed[i] = rand.nextLong();
|
|
+ }
|
|
+ return seed;
|
|
+ }
|
|
+
|
|
+ // 1024-bit string -> 16 * 64 long[]
|
|
+ public static Optional<long[]> parseSeed(String seedStr) {
|
|
+ if (seedStr.isEmpty()) return Optional.empty();
|
|
+
|
|
+ if (seedStr.length() != WORLD_SEED_BITS) {
|
|
+ throw new IllegalArgumentException("Secure seed length must be " + WORLD_SEED_BITS + "-bit but found " + seedStr.length() + "-bit.");
|
|
+ }
|
|
+
|
|
+ long[] seed = new long[WORLD_SEED_LONGS];
|
|
+
|
|
+ for (int i = 0; i < WORLD_SEED_LONGS; i++) {
|
|
+ int start = i * 64;
|
|
+ int end = start + 64;
|
|
+ String seedSection = seedStr.substring(start, end);
|
|
+
|
|
+ BigInteger seedInDecimal = new BigInteger(seedSection, 2);
|
|
+ seed[i] = seedInDecimal.longValue();
|
|
+ }
|
|
+
|
|
+ return Optional.of(seed);
|
|
+ }
|
|
+
|
|
+ // 16 * 64 long[] -> 1024-bit string
|
|
+ public static String seedToString(long[] seed) {
|
|
+ StringBuilder sb = new StringBuilder();
|
|
+
|
|
+ for (long longV : seed) {
|
|
+ // Convert to 64-bit binary string per long
|
|
+ // Use format to keep 64-bit length, and use 0 to complete space
|
|
+ String binaryStr = String.format("%64s", Long.toBinaryString(longV)).replace(' ', '0');
|
|
+
|
|
+ sb.append(binaryStr);
|
|
+ }
|
|
+
|
|
+ return sb.toString();
|
|
+ }
|
|
+}
|
|
diff --git a/src/main/java/su/plo/matter/Hashing.java b/src/main/java/su/plo/matter/Hashing.java
|
|
new file mode 100644
|
|
index 0000000000000000000000000000000000000000..ec7a57c6af5d5f4fd27a643d253c2ecce90c01ac
|
|
--- /dev/null
|
|
+++ b/src/main/java/su/plo/matter/Hashing.java
|
|
@@ -0,0 +1,73 @@
|
|
+package su.plo.matter;
|
|
+
|
|
+public class Hashing {
|
|
+ // https://en.wikipedia.org/wiki/BLAKE_(hash_function)
|
|
+ // https://github.com/bcgit/bc-java/blob/master/core/src/main/java/org/bouncycastle/crypto/digests/Blake2bDigest.java
|
|
+
|
|
+ private final static long[] blake2b_IV = {
|
|
+ 0x6a09e667f3bcc908L, 0xbb67ae8584caa73bL, 0x3c6ef372fe94f82bL,
|
|
+ 0xa54ff53a5f1d36f1L, 0x510e527fade682d1L, 0x9b05688c2b3e6c1fL,
|
|
+ 0x1f83d9abfb41bd6bL, 0x5be0cd19137e2179L
|
|
+ };
|
|
+
|
|
+ private final static byte[][] blake2b_sigma = {
|
|
+ {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
|
|
+ {14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3},
|
|
+ {11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4},
|
|
+ {7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8},
|
|
+ {9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13},
|
|
+ {2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9},
|
|
+ {12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11},
|
|
+ {13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10},
|
|
+ {6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5},
|
|
+ {10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0},
|
|
+ {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
|
|
+ {14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3}
|
|
+ };
|
|
+
|
|
+ public static long[] hashWorldSeed(long[] worldSeed) {
|
|
+ long[] result = blake2b_IV.clone();
|
|
+ result[0] ^= 0x01010040;
|
|
+ hash(worldSeed, result, new long[16], 0, false);
|
|
+ return result;
|
|
+ }
|
|
+
|
|
+ public static void hash(long[] message, long[] chainValue, long[] internalState, long messageOffset, boolean isFinal) {
|
|
+ assert message.length == 16;
|
|
+ assert chainValue.length == 8;
|
|
+ assert internalState.length == 16;
|
|
+
|
|
+ System.arraycopy(chainValue, 0, internalState, 0, chainValue.length);
|
|
+ System.arraycopy(blake2b_IV, 0, internalState, chainValue.length, 4);
|
|
+ internalState[12] = messageOffset ^ blake2b_IV[4];
|
|
+ internalState[13] = blake2b_IV[5];
|
|
+ if (isFinal) internalState[14] = ~blake2b_IV[6];
|
|
+ internalState[15] = blake2b_IV[7];
|
|
+
|
|
+ for (int round = 0; round < 12; round++) {
|
|
+ G(message[blake2b_sigma[round][0]], message[blake2b_sigma[round][1]], 0, 4, 8, 12, internalState);
|
|
+ G(message[blake2b_sigma[round][2]], message[blake2b_sigma[round][3]], 1, 5, 9, 13, internalState);
|
|
+ G(message[blake2b_sigma[round][4]], message[blake2b_sigma[round][5]], 2, 6, 10, 14, internalState);
|
|
+ G(message[blake2b_sigma[round][6]], message[blake2b_sigma[round][7]], 3, 7, 11, 15, internalState);
|
|
+ G(message[blake2b_sigma[round][8]], message[blake2b_sigma[round][9]], 0, 5, 10, 15, internalState);
|
|
+ G(message[blake2b_sigma[round][10]], message[blake2b_sigma[round][11]], 1, 6, 11, 12, internalState);
|
|
+ G(message[blake2b_sigma[round][12]], message[blake2b_sigma[round][13]], 2, 7, 8, 13, internalState);
|
|
+ G(message[blake2b_sigma[round][14]], message[blake2b_sigma[round][15]], 3, 4, 9, 14, internalState);
|
|
+ }
|
|
+
|
|
+ for (int i = 0; i < 8; i++) {
|
|
+ chainValue[i] ^= internalState[i] ^ internalState[i + 8];
|
|
+ }
|
|
+ }
|
|
+
|
|
+ private static void G(long m1, long m2, int posA, int posB, int posC, int posD, long[] internalState) {
|
|
+ internalState[posA] = internalState[posA] + internalState[posB] + m1;
|
|
+ internalState[posD] = Long.rotateRight(internalState[posD] ^ internalState[posA], 32);
|
|
+ internalState[posC] = internalState[posC] + internalState[posD];
|
|
+ internalState[posB] = Long.rotateRight(internalState[posB] ^ internalState[posC], 24); // replaces 25 of BLAKE
|
|
+ internalState[posA] = internalState[posA] + internalState[posB] + m2;
|
|
+ internalState[posD] = Long.rotateRight(internalState[posD] ^ internalState[posA], 16);
|
|
+ internalState[posC] = internalState[posC] + internalState[posD];
|
|
+ internalState[posB] = Long.rotateRight(internalState[posB] ^ internalState[posC], 63); // replaces 11 of BLAKE
|
|
+ }
|
|
+}
|
|
diff --git a/src/main/java/su/plo/matter/WorldgenCryptoRandom.java b/src/main/java/su/plo/matter/WorldgenCryptoRandom.java
|
|
new file mode 100644
|
|
index 0000000000000000000000000000000000000000..fab359afe44c573b8b315115810ddefd85b4d22b
|
|
--- /dev/null
|
|
+++ b/src/main/java/su/plo/matter/WorldgenCryptoRandom.java
|
|
@@ -0,0 +1,159 @@
|
|
+package su.plo.matter;
|
|
+
|
|
+import net.minecraft.util.Mth;
|
|
+import net.minecraft.util.RandomSource;
|
|
+import net.minecraft.world.level.levelgen.LegacyRandomSource;
|
|
+import net.minecraft.world.level.levelgen.WorldgenRandom;
|
|
+import org.jetbrains.annotations.NotNull;
|
|
+
|
|
+import java.util.Arrays;
|
|
+
|
|
+public class WorldgenCryptoRandom extends WorldgenRandom {
|
|
+ // hash the world seed to guard against badly chosen world seeds
|
|
+ private static final long[] HASHED_ZERO_SEED = Hashing.hashWorldSeed(new long[Globals.WORLD_SEED_LONGS]);
|
|
+ private static final ThreadLocal<long[]> LAST_SEEN_WORLD_SEED = ThreadLocal.withInitial(() -> new long[Globals.WORLD_SEED_LONGS]);
|
|
+ private static final ThreadLocal<long[]> HASHED_WORLD_SEED = ThreadLocal.withInitial(() -> HASHED_ZERO_SEED);
|
|
+
|
|
+ private final long[] worldSeed = new long[Globals.WORLD_SEED_LONGS];
|
|
+ private final long[] randomBits = new long[8];
|
|
+ private int randomBitIndex;
|
|
+ private static final int MAX_RANDOM_BIT_INDEX = 64 * 8;
|
|
+ private static final int LOG2_MAX_RANDOM_BIT_INDEX = 9;
|
|
+ private long counter;
|
|
+ private final long[] message = new long[16];
|
|
+ private final long[] cachedInternalState = new long[16];
|
|
+
|
|
+ public WorldgenCryptoRandom(int x, int z, Globals.Salt typeSalt, long salt) {
|
|
+ super(new LegacyRandomSource(0L));
|
|
+ if (typeSalt != null) {
|
|
+ this.setSecureSeed(x, z, typeSalt, salt);
|
|
+ }
|
|
+ }
|
|
+
|
|
+ public void setSecureSeed(int x, int z, Globals.Salt typeSalt, long salt) {
|
|
+ System.arraycopy(Globals.worldSeed, 0, this.worldSeed, 0, Globals.WORLD_SEED_LONGS);
|
|
+ message[0] = ((long) x << 32) | ((long) z & 0xffffffffL);
|
|
+ message[1] = ((long) Globals.dimension.get() << 32) | ((long) salt & 0xffffffffL);
|
|
+ message[2] = typeSalt.ordinal();
|
|
+ message[3] = counter = 0;
|
|
+ randomBitIndex = MAX_RANDOM_BIT_INDEX;
|
|
+ }
|
|
+
|
|
+ private long[] getHashedWorldSeed() {
|
|
+ if (!Arrays.equals(worldSeed, LAST_SEEN_WORLD_SEED.get())) {
|
|
+ HASHED_WORLD_SEED.set(Hashing.hashWorldSeed(worldSeed));
|
|
+ System.arraycopy(worldSeed, 0, LAST_SEEN_WORLD_SEED.get(), 0, Globals.WORLD_SEED_LONGS);
|
|
+ }
|
|
+ return HASHED_WORLD_SEED.get();
|
|
+ }
|
|
+
|
|
+ private void moreRandomBits() {
|
|
+ message[3] = counter++;
|
|
+ System.arraycopy(getHashedWorldSeed(), 0, randomBits, 0, 8);
|
|
+ Hashing.hash(message, randomBits, cachedInternalState, 64, true);
|
|
+ }
|
|
+
|
|
+ private long getBits(int count) {
|
|
+ if (randomBitIndex >= MAX_RANDOM_BIT_INDEX) {
|
|
+ moreRandomBits();
|
|
+ randomBitIndex -= MAX_RANDOM_BIT_INDEX;
|
|
+ }
|
|
+
|
|
+ int alignment = randomBitIndex & 63;
|
|
+ if ((randomBitIndex >>> 6) == ((randomBitIndex + count) >>> 6)) {
|
|
+ long result = (randomBits[randomBitIndex >>> 6] >>> alignment) & ((1L << count) - 1);
|
|
+ randomBitIndex += count;
|
|
+ return result;
|
|
+ } else {
|
|
+ long result = (randomBits[randomBitIndex >>> 6] >>> alignment) & ((1L << (64 - alignment)) - 1);
|
|
+ randomBitIndex += count;
|
|
+ if (randomBitIndex >= MAX_RANDOM_BIT_INDEX) {
|
|
+ moreRandomBits();
|
|
+ randomBitIndex -= MAX_RANDOM_BIT_INDEX;
|
|
+ }
|
|
+ alignment = randomBitIndex & 63;
|
|
+ result <<= alignment;
|
|
+ result |= (randomBits[randomBitIndex >>> 6] >>> (64 - alignment)) & ((1L << alignment) - 1);
|
|
+
|
|
+ return result;
|
|
+ }
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public @NotNull RandomSource fork() {
|
|
+ WorldgenCryptoRandom fork = new WorldgenCryptoRandom(0, 0, null, 0);
|
|
+
|
|
+ System.arraycopy(Globals.worldSeed, 0, fork.worldSeed, 0, Globals.WORLD_SEED_LONGS);
|
|
+ fork.message[0] = this.message[0];
|
|
+ fork.message[1] = this.message[1];
|
|
+ fork.message[2] = this.message[2];
|
|
+ fork.message[3] = this.message[3];
|
|
+ fork.randomBitIndex = this.randomBitIndex;
|
|
+ fork.counter = this.counter;
|
|
+ fork.nextLong();
|
|
+
|
|
+ return fork;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public int next(int bits) {
|
|
+ return (int) getBits(bits);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void consumeCount(int count) {
|
|
+ randomBitIndex += count;
|
|
+ if (randomBitIndex >= MAX_RANDOM_BIT_INDEX * 2) {
|
|
+ randomBitIndex -= MAX_RANDOM_BIT_INDEX;
|
|
+ counter += randomBitIndex >>> LOG2_MAX_RANDOM_BIT_INDEX;
|
|
+ randomBitIndex &= MAX_RANDOM_BIT_INDEX - 1;
|
|
+ randomBitIndex += MAX_RANDOM_BIT_INDEX;
|
|
+ }
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public int nextInt(int bound) {
|
|
+ int bits = Mth.ceillog2(bound);
|
|
+ int result;
|
|
+ do {
|
|
+ result = (int) getBits(bits);
|
|
+ } while (result >= bound);
|
|
+
|
|
+ return result;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public long nextLong() {
|
|
+ return getBits(64);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public double nextDouble() {
|
|
+ return getBits(53) * 0x1.0p-53;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public long setDecorationSeed(long worldSeed, int blockX, int blockZ) {
|
|
+ setSecureSeed(blockX, blockZ, Globals.Salt.POPULATION, 0);
|
|
+ return ((long) blockX << 32) | ((long) blockZ & 0xffffffffL);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void setFeatureSeed(long populationSeed, int index, int step) {
|
|
+ setSecureSeed((int) (populationSeed >> 32), (int) populationSeed, Globals.Salt.DECORATION, index + 10000L * step);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void setLargeFeatureSeed(long worldSeed, int chunkX, int chunkZ) {
|
|
+ super.setLargeFeatureSeed(worldSeed, chunkX, chunkZ);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void setLargeFeatureWithSalt(long worldSeed, int regionX, int regionZ, int salt) {
|
|
+ super.setLargeFeatureWithSalt(worldSeed, regionX, regionZ, salt);
|
|
+ }
|
|
+
|
|
+ public static RandomSource seedSlimeChunk(int chunkX, int chunkZ) {
|
|
+ return new WorldgenCryptoRandom(chunkX, chunkZ, Globals.Salt.SLIME_CHUNK, 0);
|
|
+ }
|
|
+}
|