From 929de370455d37134bfff6c60f422f960b66b4ba Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Thu, 16 Dec 2021 09:40:39 +0100 Subject: [PATCH] Configurable max block light for monster spawning --- .../minecraft/world/entity/monster/Monster.java.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/Monster.java.patch diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Monster.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Monster.java.patch new file mode 100644 index 0000000000..bae67fa57b --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Monster.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/Monster.java ++++ b/net/minecraft/world/entity/monster/Monster.java +@@ -92,7 +92,7 @@ + return false; + } else { + DimensionType dimensionType = world.dimensionType(); +- int i = dimensionType.monsterSpawnBlockLightLimit(); ++ int i = world.getLevel().paperConfig().entities.spawning.monsterSpawnMaxLightLevel.or(dimensionType.monsterSpawnBlockLightLimit()); // Paper - Configurable max block light for monster spawning + if (i < 15 && world.getBrightness(LightLayer.BLOCK, pos) > i) { + return false; + } else {