Make slime spawn checks use tag again and rename config option (#7910)
This commit is contained in:
parent
6249dd5ecb
commit
181a8479b5
3 changed files with 13 additions and 12 deletions
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add configurable height for slime spawn
|
|||
|
||||
|
||||
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 15d5a8290be35c2caebf8e296300e8f32cb597c7..14c4de88aefe052b3379f13274bcab228f61332d 100644
|
||||
index 15d5a8290be35c2caebf8e296300e8f32cb597c7..fa79316adb11ab39cf921475e12a50058fd82a87 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
@@ -320,7 +320,11 @@ public class Slime extends Mob implements Enemy {
|
||||
|
@ -14,9 +14,9 @@ index 15d5a8290be35c2caebf8e296300e8f32cb597c7..14c4de88aefe052b3379f13274bcab22
|
|||
if (world.getDifficulty() != Difficulty.PEACEFUL) {
|
||||
- if (world.getBiome(pos).is(BiomeTags.ALLOWS_SURFACE_SLIME_SPAWNS) && pos.getY() > 50 && pos.getY() < 70 && random.nextFloat() < 0.5F && random.nextFloat() < world.getMoonBrightness() && world.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) {
|
||||
+ // Paper start - Replace rules for Height in Swamp Biome
|
||||
+ final double maxHeightSwamp = world.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.swampBiome.maximum;
|
||||
+ final double minHeightSwamp = world.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.swampBiome.minimum;
|
||||
+ if (world.getBiome(pos).is(net.minecraft.world.level.biome.Biomes.SWAMP) && pos.getY() > minHeightSwamp && pos.getY() < maxHeightSwamp && random.nextFloat() < 0.5F && random.nextFloat() < world.getMoonBrightness() && world.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) {
|
||||
+ final double maxHeightSwamp = world.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.surfaceBiome.maximum;
|
||||
+ final double minHeightSwamp = world.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.surfaceBiome.minimum;
|
||||
+ if (world.getBiome(pos).is(BiomeTags.ALLOWS_SURFACE_SLIME_SPAWNS) && pos.getY() > minHeightSwamp && pos.getY() < maxHeightSwamp && random.nextFloat() < 0.5F && random.nextFloat() < world.getMoonBrightness() && world.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) {
|
||||
+ // Paper end
|
||||
return checkMobSpawnRules(type, world, spawnReason, pos, random);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue