mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-18 16:17:45 +01:00
Include new bedrock-at-0 config option in world height warning (#815)
This commit is contained in:
parent
e56920c7b1
commit
d7e7992ca4
@ -35,7 +35,7 @@ import com.viaversion.viaversion.util.TagUtil;
|
|||||||
|
|
||||||
public final class EntityPacketRewriter1_17 extends EntityRewriter<ClientboundPackets1_17, Protocol1_17To1_16_4> {
|
public final class EntityPacketRewriter1_17 extends EntityRewriter<ClientboundPackets1_17, Protocol1_17To1_16_4> {
|
||||||
|
|
||||||
private boolean warned;
|
private boolean warned = ViaBackwards.getConfig().bedrockAtY0() || ViaBackwards.getConfig().suppressEmulationWarnings();
|
||||||
|
|
||||||
public EntityPacketRewriter1_17(Protocol1_17To1_16_4 protocol) {
|
public EntityPacketRewriter1_17(Protocol1_17To1_16_4 protocol) {
|
||||||
super(protocol);
|
super(protocol);
|
||||||
@ -210,8 +210,8 @@ public final class EntityPacketRewriter1_17 extends EntityRewriter<ClientboundPa
|
|||||||
NumberTag height = tag.getNumberTag("height");
|
NumberTag height = tag.getNumberTag("height");
|
||||||
NumberTag logicalHeight = tag.getNumberTag("logical_height");
|
NumberTag logicalHeight = tag.getNumberTag("logical_height");
|
||||||
if (minY.asInt() != 0 || height.asInt() > 256 || logicalHeight.asInt() > 256) {
|
if (minY.asInt() != 0 || height.asInt() > 256 || logicalHeight.asInt() > 256) {
|
||||||
if (warn && !warned && !ViaBackwards.getConfig().suppressEmulationWarnings()) {
|
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");
|
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;
|
warned = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user