From: shedaniel Date: Thu, 3 Sep 2020 17:03:52 +0000 (+0800) Subject: Straight up remove the check for biomes spawn probability. X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=c0fa90ec71265913795bb612c8cadd0d12b45dda;p=LightOverlay.git Straight up remove the check for biomes spawn probability. Signed-off-by: shedaniel --- diff --git a/fabric/src/main/java/me/shedaniel/lightoverlay/fabric/LightOverlay.java b/fabric/src/main/java/me/shedaniel/lightoverlay/fabric/LightOverlay.java index e6cae4a..23303ba 100644 --- a/fabric/src/main/java/me/shedaniel/lightoverlay/fabric/LightOverlay.java +++ b/fabric/src/main/java/me/shedaniel/lightoverlay/fabric/LightOverlay.java @@ -36,7 +36,6 @@ import net.minecraft.util.shape.VoxelShape; import net.minecraft.world.BlockView; import net.minecraft.world.LightType; import net.minecraft.world.World; -import net.minecraft.world.biome.SpawnSettings; import net.minecraft.world.chunk.ChunkStatus; import net.minecraft.world.chunk.WorldChunk; import net.minecraft.world.chunk.light.ChunkLightingView; @@ -117,12 +116,9 @@ public class LightOverlay implements ClientModInitializer { map.put(blockPos.asLong(), Integer.valueOf(level)); } } else { - SpawnSettings spawnSettings = world.getBiomeAccess().getBiome(blockPos).getSpawnSettings(); - if (spawnSettings.getCreatureSpawnProbability() > 0 && !spawnSettings.getSpawnEntry(EntityCategory.MONSTER).isEmpty()) { - CrossType type = getCrossType(blockPos, downPos, world, block, sky, entityContext); - if (type != CrossType.NONE) { - map.put(blockPos.asLong(), type); - } + CrossType type = getCrossType(blockPos, downPos, world, block, sky, entityContext); + if (type != CrossType.NONE) { + map.put(blockPos.asLong(), type); } } } @@ -205,12 +201,9 @@ public class LightOverlay implements ClientModInitializer { map.put(pos.asLong(), Integer.valueOf(level)); } } else { - SpawnSettings spawnSettings = world.getBiomeAccess().getBiome(pos).getSpawnSettings(); - if (spawnSettings.getCreatureSpawnProbability() > 0 && !spawnSettings.getSpawnEntry(EntityCategory.MONSTER).isEmpty()) { - CrossType type = LightOverlay.getCrossType(pos, down, chunk, block, sky, entityContext); - if (type != CrossType.NONE) { - map.put(pos.asLong(), type); - } + CrossType type = LightOverlay.getCrossType(pos, down, chunk, block, sky, entityContext); + if (type != CrossType.NONE) { + map.put(pos.asLong(), type); } } } diff --git a/forge/src/main/java/me/shedaniel/lightoverlay/forge/LightOverlayClient.java b/forge/src/main/java/me/shedaniel/lightoverlay/forge/LightOverlayClient.java index 87fa875..b9f3740 100644 --- a/forge/src/main/java/me/shedaniel/lightoverlay/forge/LightOverlayClient.java +++ b/forge/src/main/java/me/shedaniel/lightoverlay/forge/LightOverlayClient.java @@ -39,7 +39,6 @@ import net.minecraft.util.math.vector.Vector3d; import net.minecraft.world.IBlockReader; import net.minecraft.world.LightType; import net.minecraft.world.World; -import net.minecraft.world.biome.MobSpawnInfo; import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.ChunkStatus; import net.minecraft.world.lighting.IWorldLightListener; @@ -261,12 +260,9 @@ public class LightOverlayClient { map.put(blockPos.toLong(), Integer.valueOf(level)); } } else { - MobSpawnInfo spawnInfo = world.getBiomeManager().getBiome(blockPos).func_242433_b(); - if (spawnInfo.func_242557_a() > 0 && !spawnInfo.func_242559_a(EntityClassification.MONSTER).isEmpty()) { - CrossType type = getCrossType(blockPos, downPos, world, block, sky, entityContext); - if (type != CrossType.NONE) { - map.put(blockPos.toLong(), type); - } + CrossType type = getCrossType(blockPos, downPos, world, block, sky, entityContext); + if (type != CrossType.NONE) { + map.put(blockPos.toLong(), type); } } } @@ -335,12 +331,9 @@ public class LightOverlayClient { map.put(pos.toLong(), Integer.valueOf(level)); } } else { - MobSpawnInfo spawnInfo = world.getBiomeManager().getBiome(pos).func_242433_b(); - if (spawnInfo.func_242557_a() > 0 && !spawnInfo.func_242559_a(EntityClassification.MONSTER).isEmpty()) { - CrossType type = LightOverlayClient.getCrossType(pos, down, chunk, block, sky, selectionContext); - if (type != CrossType.NONE) { - map.put(pos.toLong(), type); - } + CrossType type = LightOverlayClient.getCrossType(pos, down, chunk, block, sky, selectionContext); + if (type != CrossType.NONE) { + map.put(pos.toLong(), type); } } } diff --git a/gradle.properties b/gradle.properties index 13ecece..2710efd 100755 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false -mod_version=5.5.1 +mod_version=5.5.2 # fabric fabric_minecraft_version=1.16.2