Skip to content

Commit 9bc0cab

Browse files
authored
Correct BlockUtils#isValidMobSpawn (#4367)
1 parent 9980e92 commit 9bc0cab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/meteordevelopment/meteorclient/utils/world/BlockUtils.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@ public static MobSpawn isValidMobSpawn(BlockPos blockPos, BlockState blockState,
260260
if (downState.isTransparent(mc.world, down)) return MobSpawn.Never;
261261
}
262262

263-
if (mc.world.getLightLevel(blockPos, 0) <= spawnLightLimit) return MobSpawn.Potential;
264-
else if (mc.world.getLightLevel(LightType.BLOCK, blockPos) <= spawnLightLimit) return MobSpawn.Always;
263+
if (mc.world.getLightLevel(LightType.BLOCK, blockPos) > spawnLightLimit) return MobSpawn.Never;
264+
else if (mc.world.getLightLevel(LightType.SKY, blockPos) > spawnLightLimit) return MobSpawn.Potential;
265265

266-
return MobSpawn.Never;
266+
return MobSpawn.Always;
267267
}
268268

269269
public static boolean topSurface(BlockState blockState) {

0 commit comments

Comments
 (0)