From d7e7992ca4089e113373b61ee992adc86968d688 Mon Sep 17 00:00:00 2001 From: EnZaXD Date: Tue, 9 Jul 2024 18:26:49 +0200 Subject: [PATCH] Include new bedrock-at-0 config option in world height warning (#815) --- .../v1_17to1_16_4/rewriter/EntityPacketRewriter1_17.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_17to1_16_4/rewriter/EntityPacketRewriter1_17.java b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_17to1_16_4/rewriter/EntityPacketRewriter1_17.java index b0fe1a63..a3c6a665 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_17to1_16_4/rewriter/EntityPacketRewriter1_17.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_17to1_16_4/rewriter/EntityPacketRewriter1_17.java @@ -35,7 +35,7 @@ import com.viaversion.viaversion.util.TagUtil; public final class EntityPacketRewriter1_17 extends EntityRewriter { - private boolean warned; + private boolean warned = ViaBackwards.getConfig().bedrockAtY0() || ViaBackwards.getConfig().suppressEmulationWarnings(); public EntityPacketRewriter1_17(Protocol1_17To1_16_4 protocol) { super(protocol); @@ -210,8 +210,8 @@ public final class EntityPacketRewriter1_17 extends EntityRewriter 256 || logicalHeight.asInt() > 256) { - if (warn && !warned && !ViaBackwards.getConfig().suppressEmulationWarnings()) { - protocol.getLogger().warning("Increased world height is NOT SUPPORTED for 1.16 players and below. They will see a void below y 0 and above 256"); + if (warn && !warned) { + protocol.getLogger().warning("Increased world height is NOT SUPPORTED for 1.16 players and below. They will see a void below y 0 and above 256. You can enable the `bedrock-at-y-0` config option to replace the air with a bedrock layer."); warned = true; }