mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-03 13:42:25 -07:00
All chunks are slime spawn chunks toggle
This commit is contained in:
@@ -90,7 +90,7 @@
|
|||||||
|
|
||||||
ChunkPos chunkcoordintpair = new ChunkPos(pos);
|
ChunkPos chunkcoordintpair = new ChunkPos(pos);
|
||||||
- boolean flag = WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), 987234911L).nextInt(10) == 0;
|
- boolean flag = WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), 987234911L).nextInt(10) == 0;
|
||||||
+ boolean flag = WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), world.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot
|
+ boolean flag = world.getMinecraftWorld().paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), world.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper
|
||||||
|
|
||||||
if (random.nextInt(10) == 0 && flag && pos.getY() < 40) {
|
if (random.nextInt(10) == 0 && flag && pos.getY() < 40) {
|
||||||
return checkMobSpawnRules(type, world, spawnReason, pos, random);
|
return checkMobSpawnRules(type, world, spawnReason, pos, random);
|
||||||
|
@@ -218,7 +218,7 @@ public class CraftChunk implements Chunk {
|
|||||||
@Override
|
@Override
|
||||||
public boolean isSlimeChunk() {
|
public boolean isSlimeChunk() {
|
||||||
// 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk
|
// 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk
|
||||||
return WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), this.worldServer.spigotConfig.slimeSeed).nextInt(10) == 0;
|
return this.worldServer.paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), worldServer.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user