2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: vemacs <d@nkmem.es>
|
|
|
|
Date: Thu, 3 Mar 2016 01:19:22 -0600
|
|
|
|
Subject: [PATCH] All chunks are slime spawn chunks toggle
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
2024-06-13 19:12:48 +02:00
|
|
|
index b7e6f6e195d8b947c06e2bf58f4c644bda8eba99..b1f7ea02e533660322675e1bddb070f0a41084f2 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
2024-06-13 19:12:48 +02:00
|
|
|
@@ -350,7 +350,7 @@ public class Slime extends Mob implements Enemy {
|
2023-12-05 20:54:55 +01:00
|
|
|
}
|
2021-06-11 14:02:28 +02:00
|
|
|
|
2023-12-05 20:54:55 +01:00
|
|
|
ChunkPos chunkcoordintpair = new ChunkPos(pos);
|
|
|
|
- boolean flag = WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), world.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot
|
2024-01-23 14:34:17 +01:00
|
|
|
+ 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
|
2021-06-11 14:02:28 +02:00
|
|
|
|
2023-12-05 20:54:55 +01:00
|
|
|
if (random.nextInt(10) == 0 && flag && pos.getY() < 40) {
|
|
|
|
return checkMobSpawnRules(type, world, spawnReason, pos, random);
|
2021-12-28 20:15:04 +01:00
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
2024-06-13 19:12:48 +02:00
|
|
|
index 5db1be69f0c4ef6976789587866c7a9bb6d19b0d..e37dae711e7059834612ead5f4fcea9f28ad436f 100644
|
2021-12-28 20:15:04 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
2024-06-13 16:45:27 +02:00
|
|
|
@@ -218,7 +218,7 @@ public class CraftChunk implements Chunk {
|
2021-12-28 20:15:04 +01:00
|
|
|
@Override
|
|
|
|
public boolean isSlimeChunk() {
|
|
|
|
// 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk
|
2023-10-27 01:34:58 +02:00
|
|
|
- return WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), this.worldServer.spigotConfig.slimeSeed).nextInt(10) == 0;
|
2022-06-09 10:51:45 +02:00
|
|
|
+ return this.worldServer.paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), worldServer.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
2021-12-28 20:15:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|