Browse Source

Straight up remove the check for biomes spawn probability.

Signed-off-by: shedaniel <daniel@shedaniel.me>
shedaniel 5 years ago
parent
commit
c0fa90ec71

+ 6 - 13
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.BlockView;
 import net.minecraft.world.LightType;
 import net.minecraft.world.LightType;
 import net.minecraft.world.World;
 import net.minecraft.world.World;
-import net.minecraft.world.biome.SpawnSettings;
 import net.minecraft.world.chunk.ChunkStatus;
 import net.minecraft.world.chunk.ChunkStatus;
 import net.minecraft.world.chunk.WorldChunk;
 import net.minecraft.world.chunk.WorldChunk;
 import net.minecraft.world.chunk.light.ChunkLightingView;
 import net.minecraft.world.chunk.light.ChunkLightingView;
@@ -117,12 +116,9 @@ public class LightOverlay implements ClientModInitializer {
                                     map.put(blockPos.asLong(), Integer.valueOf(level));
                                     map.put(blockPos.asLong(), Integer.valueOf(level));
                                 }
                                 }
                             } else {
                             } 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));
                         map.put(pos.asLong(), Integer.valueOf(level));
                     }
                     }
                 } else {
                 } 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);
                     }
                     }
                 }
                 }
             }
             }

+ 6 - 13
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.IBlockReader;
 import net.minecraft.world.LightType;
 import net.minecraft.world.LightType;
 import net.minecraft.world.World;
 import net.minecraft.world.World;
-import net.minecraft.world.biome.MobSpawnInfo;
 import net.minecraft.world.chunk.Chunk;
 import net.minecraft.world.chunk.Chunk;
 import net.minecraft.world.chunk.ChunkStatus;
 import net.minecraft.world.chunk.ChunkStatus;
 import net.minecraft.world.lighting.IWorldLightListener;
 import net.minecraft.world.lighting.IWorldLightListener;
@@ -261,12 +260,9 @@ public class LightOverlayClient {
                                     map.put(blockPos.toLong(), Integer.valueOf(level));
                                     map.put(blockPos.toLong(), Integer.valueOf(level));
                                 }
                                 }
                             } else {
                             } 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));
                         map.put(pos.toLong(), Integer.valueOf(level));
                     }
                     }
                 } else {
                 } 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);
                     }
                     }
                 }
                 }
             }
             }

+ 1 - 1
gradle.properties

@@ -1,7 +1,7 @@
 org.gradle.jvmargs=-Xmx3G
 org.gradle.jvmargs=-Xmx3G
 org.gradle.daemon=false
 org.gradle.daemon=false
 
 
-mod_version=5.5.1
+mod_version=5.5.2
 
 
 # fabric
 # fabric
 fabric_minecraft_version=1.16.2
 fabric_minecraft_version=1.16.2