diff --git a/src/main/java/com/gregtechceu/gtceu/GTCEu.java b/src/main/java/com/gregtechceu/gtceu/GTCEu.java index b834dccf3b0..bc2b67da67e 100644 --- a/src/main/java/com/gregtechceu/gtceu/GTCEu.java +++ b/src/main/java/com/gregtechceu/gtceu/GTCEu.java @@ -193,10 +193,6 @@ public static boolean isModernFixLoaded() { return isModLoaded(GTValues.MODID_MODERNFIX); } - public static boolean isJAVDLoaded() { - return isModLoaded(GTValues.MODID_JAVD); - } - public static boolean isFTBTeamsLoaded() { return isModLoaded(GTValues.MODID_FTB_TEAMS); } diff --git a/src/main/java/com/gregtechceu/gtceu/api/GTValues.java b/src/main/java/com/gregtechceu/gtceu/api/GTValues.java index 9307c1f4d1e..0fd0123f1f1 100644 --- a/src/main/java/com/gregtechceu/gtceu/api/GTValues.java +++ b/src/main/java/com/gregtechceu/gtceu/api/GTValues.java @@ -125,7 +125,6 @@ public static int[] tiersBetween(int minInclusive, int maxInclusive) { MODID_XAEROS_MINIMAP = "xaerominimap", MODID_XAEROS_WORLDMAP = "xaeroworldmap", MODID_FTB_CHUNKS = "ftbchunks", - MODID_JAVD = "javd", MODID_FTB_TEAMS = "ftbteams", MODID_ARGONAUTS = "argonauts", MODID_HERACLES = "heracles", diff --git a/src/main/java/com/gregtechceu/gtceu/utils/GTUtil.java b/src/main/java/com/gregtechceu/gtceu/utils/GTUtil.java index 72fe4b221e5..665cb880b70 100644 --- a/src/main/java/com/gregtechceu/gtceu/utils/GTUtil.java +++ b/src/main/java/com/gregtechceu/gtceu/utils/GTUtil.java @@ -21,7 +21,6 @@ import net.minecraft.core.Direction; import net.minecraft.core.Holder; import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.core.registries.Registries; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; @@ -510,22 +509,23 @@ public static boolean canSeeSunClearly(Level world, BlockPos blockPos) { return false; } - Biome biome = world.getBiome(blockPos.above()).value(); + Holder biome = world.getBiome(blockPos.above()); if (world.isRaining()) { - if (biome.warmEnoughToRain(blockPos.above()) || biome.coldEnoughToSnow(blockPos.above())) { + if (biome.value().warmEnoughToRain(blockPos.above()) || biome.value().coldEnoughToSnow(blockPos.above())) { return false; } } - if (world.getBiome(blockPos.above()).is(BiomeTags.IS_END)) { + if (biome.is(BiomeTags.IS_END)) { return false; } - ResourceLocation javdVoidBiome = new ResourceLocation("javd", "void"); - if (GTCEu.Mods.isJAVDLoaded() && - world.registryAccess().registryOrThrow(Registries.BIOME).getKey(biome).equals(javdVoidBiome)) { - return !world.isDay(); - } else return world.isDay(); + // skip the fixed time check Level.isDay() does + + // skyDarken is the amount of light subtracted from the stored skylight value in + // `Level.getMaxLocalRawBrightness(pos)` depending on the time of day. + // this here is the same code Level.isDay() uses to determine whether it's day or not. + return world.getSkyDarken() < 4; } /**