The code shown on the Wiki is correct; the (int) casts are (long) in the code but this doesn't make a difference; the code below is based on the source for 1.6.4, which also uses decimal numbers instead of hex but is otherwise the same and gives the same results as ChunkBase's slime chunk finder (see spoiler); as far as I can tell the algorithm has been the same for every version since slime chunks were added (ChunkBase doesn't list versions for this reaosn, only Java and Bedrock). If not, then it has to be a very recent change and the Wiki didn't document it (ChunkBase hasn't been updated since 1.12 but the creator says it is still the same):
private static boolean isSlimeChunk(long seed, int x, int z)
{
Random random = new Random(seed + (long)(x * x * 4987142) + (long)(x * 5947611) + (long)(z * z) * 4392871L + (long)(z * 389711) ^ 987234911L);
return random.nextInt(10) == 0;
}
This is the code I used to make the slime chunk map, calling the method I showed above (it is much easier to test it like this than to manually check each coordinate):
private static void mapSlimeChunks()
{
for (int z = -10; z < 10; ++z)
{
for (int x = -10; x < 10; ++x)
{
System.out.print(isSlimeChunk(12345L, x, z) ? "*" : " ");
}
System.out.println();
}
}
Also, if you are on a multiplayer server they may have changed the "magic" number, 987234911 (Spigot lets you change it, see near the bottom) to prevent people from using seed-cracking tools to find the seed, or even if the seed is known prevent tools like slime chunk and structure finders from working.
I want to write my own java method which gets the seed of a word + the coordinates and returns if the chunk of the given coordinates is a Slime Chunk.
I found this on the mcWiki website, I copy pasted it, and it doesn't seem to work.
nvm: im stupd
The code shown on the Wiki is correct; the (int) casts are (long) in the code but this doesn't make a difference; the code below is based on the source for 1.6.4, which also uses decimal numbers instead of hex but is otherwise the same and gives the same results as ChunkBase's slime chunk finder (see spoiler); as far as I can tell the algorithm has been the same for every version since slime chunks were added (ChunkBase doesn't list versions for this reaosn, only Java and Bedrock). If not, then it has to be a very recent change and the Wiki didn't document it (ChunkBase hasn't been updated since 1.12 but the creator says it is still the same):
This is the code I used to make the slime chunk map, calling the method I showed above (it is much easier to test it like this than to manually check each coordinate):
Also, if you are on a multiplayer server they may have changed the "magic" number, 987234911 (Spigot lets you change it, see near the bottom) to prevent people from using seed-cracking tools to find the seed, or even if the seed is known prevent tools like slime chunk and structure finders from working.
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?