mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-29 05:26:23 +01:00
Add apiVersion to ViaAPI, some jd
This commit is contained in:
parent
9484526d39
commit
8bcd8fd995
@ -45,6 +45,16 @@ import java.util.UUID;
|
|||||||
*/
|
*/
|
||||||
public interface ViaAPI<T> {
|
public interface ViaAPI<T> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
* Returns the server's protocol version info.
|
||||||
*
|
*
|
||||||
|
@ -181,7 +181,7 @@ public interface ChunkSection {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether this section holds light data.
|
* 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
|
* @return whether this section holds light data
|
||||||
*/
|
*/
|
||||||
@ -189,6 +189,12 @@ public interface ChunkSection {
|
|||||||
return getLight() != null;
|
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();
|
@Nullable ChunkSectionLight getLight();
|
||||||
|
|
||||||
void setLight(@Nullable ChunkSectionLight light);
|
void setLight(@Nullable ChunkSectionLight light);
|
||||||
|
@ -336,7 +336,7 @@ public abstract class AbstractProtocol<C1 extends ClientboundPacketType, C2 exte
|
|||||||
return "Protocol:" + getClass().getSimpleName();
|
return "Protocol:" + getClass().getSimpleName();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Packet {
|
public static final class Packet {
|
||||||
private final State state;
|
private final State state;
|
||||||
private final int packetId;
|
private final int packetId;
|
||||||
|
|
||||||
@ -374,7 +374,7 @@ public abstract class AbstractProtocol<C1 extends ClientboundPacketType, C2 exte
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ProtocolPacket {
|
public static final class ProtocolPacket {
|
||||||
private final State state;
|
private final State state;
|
||||||
private final int oldID;
|
private final int oldID;
|
||||||
private final int newID;
|
private final int newID;
|
||||||
|
Loading…
Reference in New Issue
Block a user