]> git.lizzy.rs Git - LightOverlay.git/commitdiff
Straight up remove the check for biomes spawn probability.
authorshedaniel <daniel@shedaniel.me>
Thu, 3 Sep 2020 17:03:52 +0000 (01:03 +0800)
committershedaniel <daniel@shedaniel.me>
Thu, 3 Sep 2020 17:03:52 +0000 (01:03 +0800)
Signed-off-by: shedaniel <daniel@shedaniel.me>
fabric/src/main/java/me/shedaniel/lightoverlay/fabric/LightOverlay.java
forge/src/main/java/me/shedaniel/lightoverlay/forge/LightOverlayClient.java
gradle.properties

index e6cae4a74b35dabad4ecb1a3883a6efa592db1dc..23303baae4cb44c12a9fa4b593192c994dbb8c1e 100644 (file)
@@ -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);
                     }
                 }
             }
index 87fa87572fcaef4d7c0d3ea6d60e1741f1f9f548..b9f374092d1685181b4d3e993907444d2deb8812 100644 (file)
@@ -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);
                     }
                 }
             }
index 13ececeeefab2549b569ce44c48cdbe9c2a9aa2e..2710efde880727d821194959568088a0f9d13101 100755 (executable)
@@ -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