diff --git a/api/src/main/java/com/viaversion/viaversion/api/ViaAPI.java b/api/src/main/java/com/viaversion/viaversion/api/ViaAPI.java index f5984ce31..39fdea8a3 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/ViaAPI.java +++ b/api/src/main/java/com/viaversion/viaversion/api/ViaAPI.java @@ -45,6 +45,16 @@ import java.util.UUID; */ public interface ViaAPI { + /** + * Returns the API version incremented with meaningful API changes. + * This includes breaking changes to existing API and larger additions. + * + * @return API version incremented with meaningful API changes + */ + default int apiVersion() { + return 1; + } + /** * Returns the server's protocol version info. * diff --git a/api/src/main/java/com/viaversion/viaversion/api/minecraft/chunks/ChunkSection.java b/api/src/main/java/com/viaversion/viaversion/api/minecraft/chunks/ChunkSection.java index 92d2517eb..619783775 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/minecraft/chunks/ChunkSection.java +++ b/api/src/main/java/com/viaversion/viaversion/api/minecraft/chunks/ChunkSection.java @@ -181,7 +181,7 @@ public interface ChunkSection { /** * Returns whether this section holds light data. - * Only true for < 1.14 clients. + * Only true for < 1.14 chunks. * * @return whether this section holds light data */ @@ -189,6 +189,12 @@ public interface ChunkSection { return getLight() != null; } + /** + * Returns the light of the chunk section. + * Only present for < 1.14 chunks, otherwise sent separately. + * + * @return chunk section light if present + */ @Nullable ChunkSectionLight getLight(); void setLight(@Nullable ChunkSectionLight light); diff --git a/api/src/main/java/com/viaversion/viaversion/api/protocol/AbstractProtocol.java b/api/src/main/java/com/viaversion/viaversion/api/protocol/AbstractProtocol.java index a35971323..1dc29cb40 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/protocol/AbstractProtocol.java +++ b/api/src/main/java/com/viaversion/viaversion/api/protocol/AbstractProtocol.java @@ -336,7 +336,7 @@ public abstract class AbstractProtocol