-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix glow squid spawn rules using constant sea level
This now gets the sea level from the noise settings which can be customized
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
patches/server/0015-Fix-glow-squid-spawn-rules-using-constant-sea-level.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: booky10 <[email protected]> | ||
Date: Fri, 19 Jul 2024 05:47:47 +0200 | ||
Subject: [PATCH] Fix glow squid spawn rules using constant sea level | ||
|
||
This now gets the sea level from the noise settings which can be customized | ||
|
||
diff --git a/src/main/java/net/minecraft/world/entity/GlowSquid.java b/src/main/java/net/minecraft/world/entity/GlowSquid.java | ||
index 09fdea983772612ef3fff6b2da3cf469a34e4ec0..18b1cb5c547fd37288bfb5cf52ab0eef3737bd35 100644 | ||
--- a/src/main/java/net/minecraft/world/entity/GlowSquid.java | ||
+++ b/src/main/java/net/minecraft/world/entity/GlowSquid.java | ||
@@ -98,6 +98,6 @@ public class GlowSquid extends Squid { | ||
public static boolean checkGlowSquidSpawnRules( | ||
EntityType<? extends LivingEntity> type, ServerLevelAccessor world, MobSpawnType reason, BlockPos pos, RandomSource random | ||
) { | ||
- return pos.getY() <= world.getSeaLevel() - 33 && world.getRawBrightness(pos, 0) == 0 && world.getBlockState(pos).is(Blocks.WATER); | ||
+ return pos.getY() <= world.getLevel().chunkSource.getGenerator().getSeaLevel() - 33 && world.getRawBrightness(pos, 0) == 0 && world.getBlockState(pos).is(Blocks.WATER); // CloudPlane - fix sea level usage | ||
} | ||
} |