Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
33 Zeilen
2.3 KiB
Diff
33 Zeilen
2.3 KiB
Diff
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
|
|
index 8b2206c5c56341ecd96837bdb3e0c6ab7c874af5..897c815fb448d1e9ca75b7f8b93b4021dccf7596 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
|
@@ -338,7 +338,7 @@ public class Slime extends Mob implements Enemy {
|
|
}
|
|
|
|
ChunkPos chunkcoordintpair = new ChunkPos(pos);
|
|
- 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) {
|
|
return checkMobSpawnRules(type, world, spawnReason, pos, random);
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
|
index b1aeb021e53a233bfb0439d38f1a889ed6fc301d..491416754e1c5e8c2b345b57f45289906c7932ba 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
|
@@ -215,7 +215,7 @@ 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 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
|