1.20.3-pre1 (probably)

This commit is contained in:
Nassim Jahnke 2023-11-20 17:55:28 +01:00
parent 6fb27e5c17
commit 20f4907a23
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
6 changed files with 112 additions and 52 deletions

View File

@ -85,7 +85,7 @@ public class ProtocolVersion {
public static final ProtocolVersion v1_19_4 = register(762, "1.19.4");
public static final ProtocolVersion v1_20 = register(763, "1.20/1.20.1", new VersionRange("1.20", 0, 1));
public static final ProtocolVersion v1_20_2 = register(764, "1.20.2");
public static final ProtocolVersion v1_20_3 = register(765, 163, "1.20.3");
public static final ProtocolVersion v1_20_3 = register(765, 164, "1.20.3");
public static final ProtocolVersion unknown = register(-1, "UNKNOWN");
public static ProtocolVersion register(int version, String name) {

View File

@ -57,6 +57,7 @@ import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.Clientbou
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.ClientboundPackets1_20_2;
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.ServerboundConfigurationPackets1_20_2;
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.ServerboundPackets1_20_2;
import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ClientboundConfigurationPackets1_20_3;
import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ClientboundPackets1_20_3;
import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ServerboundPackets1_20_3;
import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.rewriter.BlockItemPacketRewriter1_20_3;
@ -254,7 +255,6 @@ public final class Protocol1_20_3To1_20_2 extends AbstractProtocol<ClientboundPa
});
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.DISCONNECT.getId(), ClientboundConfigurationPackets1_20_2.DISCONNECT.getId(), this::convertComponent);
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.RESOURCE_PACK.getId(), ClientboundConfigurationPackets1_20_2.RESOURCE_PACK.getId(), resourcePackHandler());
registerClientbound(ClientboundPackets1_20_2.DISCONNECT, this::convertComponent);
registerClientbound(ClientboundPackets1_20_2.RESOURCE_PACK, resourcePackHandler());
registerClientbound(ClientboundPackets1_20_2.SERVER_DATA, this::convertComponent);
@ -316,6 +316,15 @@ public final class Protocol1_20_3To1_20_2 extends AbstractProtocol<ClientboundPa
}
}
});
registerServerbound(State.CONFIGURATION, ServerboundConfigurationPackets1_20_2.RESOURCE_PACK, wrapper -> wrapper.read(Type.UUID));
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.RESOURCE_PACK.getId(), ClientboundConfigurationPackets1_20_3.RESOURCE_PACK_PUSH.getId(), wrapper -> {
wrapper.write(Type.UUID, UUID.randomUUID());
resourcePackHandler().handle(wrapper);
});
// TODO Auto map via packet types provider
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.UPDATE_ENABLED_FEATURES.getId(), ClientboundConfigurationPackets1_20_3.UPDATE_ENABLED_FEATURES.getId());
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.UPDATE_TAGS.getId(), ClientboundConfigurationPackets1_20_3.UPDATE_TAGS.getId());
}
private PacketHandler resourcePackHandler() {

View File

@ -0,0 +1,50 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2023 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet;
import com.viaversion.viaversion.api.protocol.packet.ClientboundPacketType;
import com.viaversion.viaversion.api.protocol.packet.State;
public enum ClientboundConfigurationPackets1_20_3 implements ClientboundPacketType {
CUSTOM_PAYLOAD, // 0x00
DISCONNECT, // 0x01
FINISH_CONFIGURATION, // 0x02
KEEP_ALIVE, // 0x03
PING, // 0x04
REGISTRY_DATA, // 0x05
RESOURCE_PACK_POP, // 0x06
RESOURCE_PACK_PUSH, // 0x07
UPDATE_ENABLED_FEATURES, // 0x08
UPDATE_TAGS; // 0x09
@Override
public int getId() {
return ordinal();
}
@Override
public String getName() {
return name();
}
@Override
public State state() {
return State.CONFIGURATION;
}
}

View File

@ -88,55 +88,56 @@ public enum ClientboundPackets1_20_3 implements ClientboundPacketType {
REMOVE_ENTITIES, // 0x40
REMOVE_ENTITY_EFFECT, // 0x41
RESET_SCORE, // 0x42
RESOURCE_PACK, // 0x43
RESPAWN, // 0x44
ENTITY_HEAD_LOOK, // 0x45
MULTI_BLOCK_CHANGE, // 0x46
SELECT_ADVANCEMENTS_TAB, // 0x47
SERVER_DATA, // 0x48
ACTIONBAR, // 0x49
WORLD_BORDER_CENTER, // 0x4A
WORLD_BORDER_LERP_SIZE, // 0x4B
WORLD_BORDER_SIZE, // 0x4C
WORLD_BORDER_WARNING_DELAY, // 0x4D
WORLD_BORDER_WARNING_DISTANCE, // 0x4E
CAMERA, // 0x4F
HELD_ITEM_CHANGE, // 0x50
UPDATE_VIEW_POSITION, // 0x51
UPDATE_VIEW_DISTANCE, // 0x52
SPAWN_POSITION, // 0x53
DISPLAY_SCOREBOARD, // 0x54
ENTITY_METADATA, // 0x55
ATTACH_ENTITY, // 0x56
ENTITY_VELOCITY, // 0x57
ENTITY_EQUIPMENT, // 0x58
SET_EXPERIENCE, // 0x59
UPDATE_HEALTH, // 0x5A
SCOREBOARD_OBJECTIVE, // 0x5B
SET_PASSENGERS, // 0x5C
TEAMS, // 0x5D
UPDATE_SCORE, // 0x5E
SET_SIMULATION_DISTANCE, // 0x5F
TITLE_SUBTITLE, // 0x60
TIME_UPDATE, // 0x61
TITLE_TEXT, // 0x62
TITLE_TIMES, // 0x63
ENTITY_SOUND, // 0x64
SOUND, // 0x65
START_CONFIGURATION, // 0x66
STOP_SOUND, // 0x67
SYSTEM_CHAT, // 0x68
TAB_LIST, // 0x69
NBT_QUERY, // 0x6A
COLLECT_ITEM, // 0x6B
ENTITY_TELEPORT, // 0x6C
TICKING_STATE, // 0x6D
TICKING_STEP, // 0x6E
ADVANCEMENTS, // 0x6F
ENTITY_PROPERTIES, // 0x70
ENTITY_EFFECT, // 0x71
DECLARE_RECIPES, // 0x72
TAGS; // 0x73
RESOURCE_PACK_POP, // 0x43
RESOURCE_PACK_PUSH, // 0x44
RESPAWN, // 0x45
ENTITY_HEAD_LOOK, // 0x46
MULTI_BLOCK_CHANGE, // 0x47
SELECT_ADVANCEMENTS_TAB, // 0x48
SERVER_DATA, // 0x49
ACTIONBAR, // 0x4A
WORLD_BORDER_CENTER, // 0x4B
WORLD_BORDER_LERP_SIZE, // 0x4C
WORLD_BORDER_SIZE, // 0x4D
WORLD_BORDER_WARNING_DELAY, // 0x4E
WORLD_BORDER_WARNING_DISTANCE, // 0x4F
CAMERA, // 0x50
HELD_ITEM_CHANGE, // 0x51
UPDATE_VIEW_POSITION, // 0x52
UPDATE_VIEW_DISTANCE, // 0x53
SPAWN_POSITION, // 0x54
DISPLAY_SCOREBOARD, // 0x55
ENTITY_METADATA, // 0x56
ATTACH_ENTITY, // 0x57
ENTITY_VELOCITY, // 0x58
ENTITY_EQUIPMENT, // 0x59
SET_EXPERIENCE, // 0x5A
UPDATE_HEALTH, // 0x5B
SCOREBOARD_OBJECTIVE, // 0x5C
SET_PASSENGERS, // 0x5D
TEAMS, // 0x5E
UPDATE_SCORE, // 0x5F
SET_SIMULATION_DISTANCE, // 0x60
TITLE_SUBTITLE, // 0x61
TIME_UPDATE, // 0x62
TITLE_TEXT, // 0x63
TITLE_TIMES, // 0x64
ENTITY_SOUND, // 0x65
SOUND, // 0x66
START_CONFIGURATION, // 0x67
STOP_SOUND, // 0x68
SYSTEM_CHAT, // 0x69
TAB_LIST, // 0x6A
NBT_QUERY, // 0x6B
COLLECT_ITEM, // 0x6C
ENTITY_TELEPORT, // 0x6D
TICKING_STATE, // 0x6E
TICKING_STEP, // 0x6F
ADVANCEMENTS, // 0x70
ENTITY_PROPERTIES, // 0x71
ENTITY_EFFECT, // 0x72
DECLARE_RECIPES, // 0x73
TAGS; // 0x74
@Override
public int getId() {

View File

@ -1,5 +1,5 @@
# Project properties - we put these here so they can be modified without causing a recompile of the build scripts
projectVersion=4.9.0-23w46a-SNAPSHOT
projectVersion=4.9.0-1.20.3-pre1-SNAPSHOT
# Smile emoji
mcVersions=1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13, 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11.1, 1.11, 1.10.2, 1.10.1, 1.10, 1.9.4, 1.9.3, 1.9.2, 1.9.1, 1.9, 1.8.9