diff --git a/docs/PORTING.md b/docs/PORTING.md index ff273a1..99dc19b 100644 --- a/docs/PORTING.md +++ b/docs/PORTING.md @@ -162,6 +162,9 @@ while Linking Books continue to permit passable floorless destinations. Version 0.2.4 expands Descriptive Book arrival validation with an outward, terrain-aware search for an alternate grounded location near an unsafe target. +Version 0.2.5 uses dimension-appropriate preview skies for vanilla Nether and +End destinations instead of their inherited Overworld biome sky tint. + The preview code is separated behind a renderer interface and uses an isolated Ponder level populated from server-authoritative destination snapshots. diff --git a/gradle.properties b/gradle.properties index 7d9b0d6..1fa8031 100644 --- a/gradle.properties +++ b/gradle.properties @@ -33,7 +33,7 @@ mod_name=Rivencraft # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=LGPL-3.0-or-later # The mod version. See https://semver.org/ -mod_version=0.2.4 +mod_version=0.2.5 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/net/dnorberg/rivencraft/network/ModNetworking.java b/src/main/java/net/dnorberg/rivencraft/network/ModNetworking.java index 4cd1f32..176ac26 100644 --- a/src/main/java/net/dnorberg/rivencraft/network/ModNetworking.java +++ b/src/main/java/net/dnorberg/rivencraft/network/ModNetworking.java @@ -18,6 +18,7 @@ import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.world.InteractionHand; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; import net.neoforged.neoforge.network.event.RegisterPayloadHandlersEvent; import net.neoforged.neoforge.network.handling.IPayloadContext; @@ -160,10 +161,21 @@ public final class ModNetworking { pos.subtract(origin).offset(negativeRadius, negativeRadius, negativeRadius), state)); } } - int skyColor = level.getBiome(origin).value().getSkyColor(); + int skyColor = previewSkyColor(level, origin); PacketDistributor.sendToPlayer(player, new LinkPreviewPayload(skyColor, List.copyOf(blocks))); } + /** Vanilla Nether and End renderers do not use their biomes' blue Overworld sky tint. */ + private static int previewSkyColor(ServerLevel level, BlockPos origin) { + if (level.dimension().equals(Level.NETHER)) { + return 0xFF6B2725; + } + if (level.dimension().equals(Level.END)) { + return 0xFF211835; + } + return level.getBiome(origin).value().getSkyColor(); + } + private static InteractionHand hand(boolean offhand) { return offhand ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND; }