upgrade: first join

(cherry picked from commit ed06d71ac8)
This commit is contained in:
mworzala 2023-12-19 00:18:13 +02:00 committed by Matt Worzala
parent 772b484864
commit 6416e8e441
4 changed files with 13 additions and 6 deletions

View File

@ -4,6 +4,7 @@ metadata.format.version = "1.1"
# Important dependencies
data = "1.20.2-rv1"
#data = "1.20.4-rv1"
adventure = "4.15.0"
kotlin = "1.7.22"
dependencyGetter = "v1.0.1"

View File

@ -104,6 +104,7 @@ public sealed class ClientPacketsHandler permits ClientPacketsHandler.Status, Cl
register(nextId(), ClientClickWindowButtonPacket::new);
register(nextId(), ClientClickWindowPacket::new);
register(nextId(), ClientCloseWindowPacket::new);
nextId(); // window slot state
register(nextId(), ClientPluginMessagePacket::new);
register(nextId(), ClientEditBookPacket::new);
register(nextId(), ClientQueryEntityNbtPacket::new);

View File

@ -20,9 +20,10 @@ public final class ServerPacketIdentifier {
public static final int CONFIGURATION_KEEP_ALIVE = 0x03;
public static final int CONFIGURATION_PING = 0x04;
public static final int CONFIGURATION_REGISTRY_DATA = 0x05;
public static final int CONFIGURATION_RESOURCE_PACK_SEND = 0x06;
public static final int CONFIGURATION_UPDATE_ENABLED_FEATURES = 0x07;
public static final int CONFIGURATION_TAGS = 0x08;
public static final int CONFIGURATION_RESOURCE_PACK_POP_PACKET = 0x06;
public static final int CONFIGURATION_RESOURCE_PACK_PUSH_PACKET = 0x07;
public static final int CONFIGURATION_UPDATE_ENABLED_FEATURES = 0x08;
public static final int CONFIGURATION_TAGS = 0x09;
public static final int BUNDLE = nextPlayId();
public static final int SPAWN_ENTITY = nextPlayId();
@ -90,7 +91,9 @@ public final class ServerPacketIdentifier {
public static final int UNLOCK_RECIPES = nextPlayId();
public static final int DESTROY_ENTITIES = nextPlayId();
public static final int REMOVE_ENTITY_EFFECT = nextPlayId();
public static final int RESOURCE_PACK_SEND = nextPlayId();
public static final int RESET_SCORE = nextPlayId();
public static final int RESOURCE_PACK_POP = nextPlayId();
public static final int RESOURCE_PACK_PUSH = nextPlayId();
public static final int RESPAWN = nextPlayId();
public static final int ENTITY_HEAD_LOOK = nextPlayId();
public static final int MULTI_BLOCK_CHANGE = nextPlayId();
@ -132,6 +135,8 @@ public final class ServerPacketIdentifier {
public static final int NBT_QUERY_RESPONSE = nextPlayId();
public static final int COLLECT_ITEM = nextPlayId();
public static final int ENTITY_TELEPORT = nextPlayId();
public static final int TICK_STATE = nextPlayId();
public static final int TICK_STEP = nextPlayId();
public static final int ADVANCEMENTS = nextPlayId();
public static final int ENTITY_PROPERTIES = nextPlayId();
public static final int ENTITY_EFFECT = nextPlayId();

View File

@ -49,8 +49,8 @@ public record ResourcePackSendPacket(
@Override
public int getId(@NotNull ConnectionState state) {
return switch (state) {
case CONFIGURATION -> ServerPacketIdentifier.CONFIGURATION_RESOURCE_PACK_SEND;
case PLAY -> ServerPacketIdentifier.RESOURCE_PACK_SEND;
// case CONFIGURATION -> ServerPacketIdentifier.CONFIGURATION_RESOURCE_PACK_SEND;
// case PLAY -> ServerPacketIdentifier.RESOURCE_PACK_SEND;
default -> PacketUtils.invalidPacketState(getClass(), state, ConnectionState.CONFIGURATION, ConnectionState.PLAY);
};
}