]> git.lizzy.rs Git - LightOverlay.git/commitdiff
1.1 Update
authorUnknown <shekwancheung0528@gmail.com>
Tue, 2 Jul 2019 06:28:19 +0000 (14:28 +0800)
committerUnknown <shekwancheung0528@gmail.com>
Tue, 2 Jul 2019 06:28:19 +0000 (14:28 +0800)
build.gradle
src/main/java/me/shedaniel/lightoverlay/LightOverlay.java

index aefac37d48bb8b2541368b82b70da75d40c4916b..49a31a2c9b8be720f56da0e0b09ab0e8b6888cfd 100644 (file)
@@ -11,7 +11,7 @@ buildscript {
 apply plugin: 'net.minecraftforge.gradle'
 apply plugin: 'eclipse'
 
-version = "1.0"
+version = "1.1"
 group = "me.shedaniel" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
 archivesBaseName = "LightOverlay"
 
index 051e8c85b4b657a95d40eb62cb3dd11ddb84a027..2ca951b0a151dba2e3b2af638120d881348106be 100644 (file)
@@ -21,6 +21,7 @@ import net.minecraft.util.math.shapes.VoxelShape;
 import net.minecraft.util.text.TranslationTextComponent;
 import net.minecraft.world.LightType;
 import net.minecraft.world.World;
+import net.minecraft.world.biome.Biome;
 import net.minecraftforge.api.distmarker.Dist;
 import net.minecraftforge.api.distmarker.OnlyIn;
 import net.minecraftforge.client.event.InputEvent;
@@ -118,7 +119,8 @@ public class LightOverlay {
             GlStateManager.disableBlend();
             BlockPos playerPos = new BlockPos(playerEntity.posX, playerEntity.posY, playerEntity.posZ);
             BlockPos.getAllInBox(playerPos.add(-reach, -reach, -reach), playerPos.add(reach, reach, reach)).forEach(pos -> {
-                if (world.getBiome(pos).getSpawningChance() > 0) {
+                Biome biome = world.getBiome(pos);
+                if (biome.getSpawningChance() > 0 && !biome.getSpawns(EntityClassification.MONSTER).isEmpty()) {
                     CrossType type = LightOverlay.getCrossType(pos, world, playerEntity);
                     if (type != CrossType.NONE) {
                         VoxelShape shape = world.getBlockState(pos).getCollisionShape(world, pos);