1.20.2-pre2

This commit is contained in:
Nassim Jahnke 2023-09-08 08:56:26 +10:00
parent 06b4678b2d
commit cc7c571a3c
5 changed files with 134 additions and 113 deletions

View File

@ -87,6 +87,7 @@ public class ProtocolVersion {
public static final ProtocolVersion v1_19_3 = register(761, "1.19.3"); public static final ProtocolVersion v1_19_3 = register(761, "1.19.3");
public static final ProtocolVersion v1_19_4 = register(762, "1.19.4"); 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 = 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 unknown = register(-1, "UNKNOWN"); public static final ProtocolVersion unknown = register(-1, "UNKNOWN");
public static ProtocolVersion register(int version, String name) { public static ProtocolVersion register(int version, String name) {

View File

@ -84,7 +84,7 @@ public class ProtocolVersion {
public static final ProtocolVersion v1_19_3 = register(761, "1.19.3"); public static final ProtocolVersion v1_19_3 = register(761, "1.19.3");
public static final ProtocolVersion v1_19_4 = register(762, "1.19.4"); 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 = register(763, "1.20/1.20.1", new VersionRange("1.20", 0, 1));
public static final ProtocolVersion v1_20_2 = register(764, 148, "1.20.2"); public static final ProtocolVersion v1_20_2 = register(764, 149, "1.20.2");
public static final ProtocolVersion unknown = register(-1, "UNKNOWN"); public static final ProtocolVersion unknown = register(-1, "UNKNOWN");
public static ProtocolVersion register(int version, String name) { public static ProtocolVersion register(int version, String name) {

View File

@ -24,117 +24,116 @@ public enum ClientboundPackets1_20_2 implements ClientboundPacketType {
BUNDLE, // 0x00 BUNDLE, // 0x00
SPAWN_ENTITY, // 0x01 SPAWN_ENTITY, // 0x01
SPAWN_EXPERIENCE_ORB, // 0x02 SPAWN_EXPERIENCE_ORB, // 0x02
SPAWN_PLAYER, // 0x03 ENTITY_ANIMATION, // 0x03
ENTITY_ANIMATION, // 0x04 STATISTICS, // 0x04
STATISTICS, // 0x05 BLOCK_CHANGED_ACK, // 0x05
BLOCK_CHANGED_ACK, // 0x06 BLOCK_BREAK_ANIMATION, // 0x06
BLOCK_BREAK_ANIMATION, // 0x07 BLOCK_ENTITY_DATA, // 0x07
BLOCK_ENTITY_DATA, // 0x08 BLOCK_ACTION, // 0x08
BLOCK_ACTION, // 0x09 BLOCK_CHANGE, // 0x09
BLOCK_CHANGE, // 0x0A BOSSBAR, // 0x0A
BOSSBAR, // 0x0B SERVER_DIFFICULTY, // 0x0B
SERVER_DIFFICULTY, // 0x0C CHUNK_BATCH_FINISHED, // 0x0C
CHUNK_BATCH_FINISHED, // 0x0D CHUNK_BATCH_START, // 0x0D
CHUNK_BATCH_START, // 0x0E CHUNK_BIOMES, // 0x0E
CHUNK_BIOMES, // 0x0F CLEAR_TITLES, // 0x0F
CLEAR_TITLES, // 0x10 TAB_COMPLETE, // 0x10
TAB_COMPLETE, // 0x11 DECLARE_COMMANDS, // 0x11
DECLARE_COMMANDS, // 0x12 CLOSE_WINDOW, // 0x12
CLOSE_WINDOW, // 0x13 WINDOW_ITEMS, // 0x13
WINDOW_ITEMS, // 0x14 WINDOW_PROPERTY, // 0x14
WINDOW_PROPERTY, // 0x15 SET_SLOT, // 0x15
SET_SLOT, // 0x16 COOLDOWN, // 0x16
COOLDOWN, // 0x17 CUSTOM_CHAT_COMPLETIONS, // 0x17
CUSTOM_CHAT_COMPLETIONS, // 0x18 PLUGIN_MESSAGE, // 0x18
PLUGIN_MESSAGE, // 0x19 DAMAGE_EVENT, // 0x19
DAMAGE_EVENT, // 0x1A DELETE_CHAT_MESSAGE, // 0x1A
DELETE_CHAT_MESSAGE, // 0x1B DISCONNECT, // 0x1B
DISCONNECT, // 0x1C DISGUISED_CHAT, // 0x1C
DISGUISED_CHAT, // 0x1D ENTITY_STATUS, // 0x1D
ENTITY_STATUS, // 0x1E EXPLOSION, // 0x1E
EXPLOSION, // 0x1F UNLOAD_CHUNK, // 0x1F
UNLOAD_CHUNK, // 0x20 GAME_EVENT, // 0x20
GAME_EVENT, // 0x21 OPEN_HORSE_WINDOW, // 0x21
OPEN_HORSE_WINDOW, // 0x22 HIT_ANIMATION, // 0x22
HIT_ANIMATION, // 0x23 WORLD_BORDER_INIT, // 0x23
WORLD_BORDER_INIT, // 0x24 KEEP_ALIVE, // 0x24
KEEP_ALIVE, // 0x25 CHUNK_DATA, // 0x25
CHUNK_DATA, // 0x26 EFFECT, // 0x26
EFFECT, // 0x27 SPAWN_PARTICLE, // 0x27
SPAWN_PARTICLE, // 0x28 UPDATE_LIGHT, // 0x28
UPDATE_LIGHT, // 0x29 JOIN_GAME, // 0x29
JOIN_GAME, // 0x2A MAP_DATA, // 0x2A
MAP_DATA, // 0x2B TRADE_LIST, // 0x2B
TRADE_LIST, // 0x2C ENTITY_POSITION, // 0x2C
ENTITY_POSITION, // 0x2D ENTITY_POSITION_AND_ROTATION, // 0x2D
ENTITY_POSITION_AND_ROTATION, // 0x2E ENTITY_ROTATION, // 0x2E
ENTITY_ROTATION, // 0x2F VEHICLE_MOVE, // 0x2F
VEHICLE_MOVE, // 0x30 OPEN_BOOK, // 0x30
OPEN_BOOK, // 0x31 OPEN_WINDOW, // 0x31
OPEN_WINDOW, // 0x32 OPEN_SIGN_EDITOR, // 0x32
OPEN_SIGN_EDITOR, // 0x33 PING, // 0x33
PING, // 0x34 PONG_RESPONSE, // 0x34
PONG_RESPONSE, // 0x35 CRAFT_RECIPE_RESPONSE, // 0x35
CRAFT_RECIPE_RESPONSE, // 0x36 PLAYER_ABILITIES, // 0x36
PLAYER_ABILITIES, // 0x37 PLAYER_CHAT, // 0x37
PLAYER_CHAT, // 0x38 COMBAT_END, // 0x38
COMBAT_END, // 0x39 COMBAT_ENTER, // 0x39
COMBAT_ENTER, // 0x3A COMBAT_KILL, // 0x3A
COMBAT_KILL, // 0x3B PLAYER_INFO_REMOVE, // 0x3B
PLAYER_INFO_REMOVE, // 0x3C PLAYER_INFO_UPDATE, // 0x3C
PLAYER_INFO_UPDATE, // 0x3D FACE_PLAYER, // 0x3D
FACE_PLAYER, // 0x3E PLAYER_POSITION, // 0x3E
PLAYER_POSITION, // 0x3F UNLOCK_RECIPES, // 0x3F
UNLOCK_RECIPES, // 0x40 REMOVE_ENTITIES, // 0x40
REMOVE_ENTITIES, // 0x41 REMOVE_ENTITY_EFFECT, // 0x41
REMOVE_ENTITY_EFFECT, // 0x42 RESOURCE_PACK, // 0x42
RESOURCE_PACK, // 0x43 RESPAWN, // 0x43
RESPAWN, // 0x44 ENTITY_HEAD_LOOK, // 0x44
ENTITY_HEAD_LOOK, // 0x45 MULTI_BLOCK_CHANGE, // 0x45
MULTI_BLOCK_CHANGE, // 0x46 SELECT_ADVANCEMENTS_TAB, // 0x46
SELECT_ADVANCEMENTS_TAB, // 0x47 SERVER_DATA, // 0x47
SERVER_DATA, // 0x48 ACTIONBAR, // 0x48
ACTIONBAR, // 0x49 WORLD_BORDER_CENTER, // 0x49
WORLD_BORDER_CENTER, // 0x4A WORLD_BORDER_LERP_SIZE, // 0x4A
WORLD_BORDER_LERP_SIZE, // 0x4B WORLD_BORDER_SIZE, // 0x4B
WORLD_BORDER_SIZE, // 0x4C WORLD_BORDER_WARNING_DELAY, // 0x4C
WORLD_BORDER_WARNING_DELAY, // 0x4D WORLD_BORDER_WARNING_DISTANCE, // 0x4D
WORLD_BORDER_WARNING_DISTANCE, // 0x4E CAMERA, // 0x4E
CAMERA, // 0x4F HELD_ITEM_CHANGE, // 0x4F
HELD_ITEM_CHANGE, // 0x50 UPDATE_VIEW_POSITION, // 0x50
UPDATE_VIEW_POSITION, // 0x51 UPDATE_VIEW_DISTANCE, // 0x51
UPDATE_VIEW_DISTANCE, // 0x52 SPAWN_POSITION, // 0x52
SPAWN_POSITION, // 0x53 DISPLAY_SCOREBOARD, // 0x53
DISPLAY_SCOREBOARD, // 0x54 ENTITY_METADATA, // 0x54
ENTITY_METADATA, // 0x55 ATTACH_ENTITY, // 0x55
ATTACH_ENTITY, // 0x56 ENTITY_VELOCITY, // 0x56
ENTITY_VELOCITY, // 0x57 ENTITY_EQUIPMENT, // 0x57
ENTITY_EQUIPMENT, // 0x58 SET_EXPERIENCE, // 0x58
SET_EXPERIENCE, // 0x59 UPDATE_HEALTH, // 0x59
UPDATE_HEALTH, // 0x5A SCOREBOARD_OBJECTIVE, // 0x5A
SCOREBOARD_OBJECTIVE, // 0x5B SET_PASSENGERS, // 0x5B
SET_PASSENGERS, // 0x5C TEAMS, // 0x5C
TEAMS, // 0x5D UPDATE_SCORE, // 0x5D
UPDATE_SCORE, // 0x5E SET_SIMULATION_DISTANCE, // 0x5E
SET_SIMULATION_DISTANCE, // 0x5F TITLE_SUBTITLE, // 0x5F
TITLE_SUBTITLE, // 0x60 TIME_UPDATE, // 0x60
TIME_UPDATE, // 0x61 TITLE_TEXT, // 0x61
TITLE_TEXT, // 0x62 TITLE_TIMES, // 0x62
TITLE_TIMES, // 0x63 ENTITY_SOUND, // 0x63
ENTITY_SOUND, // 0x64 SOUND, // 0x64
SOUND, // 0x65 START_CONFIGURATION, // 0x65
START_CONFIGURATION, // 0x66 STOP_SOUND, // 0x66
STOP_SOUND, // 0x67 SYSTEM_CHAT, // 0x67
SYSTEM_CHAT, // 0x68 TAB_LIST, // 0x68
TAB_LIST, // 0x69 NBT_QUERY, // 0x69
NBT_QUERY, // 0x6A COLLECT_ITEM, // 0x6A
COLLECT_ITEM, // 0x6B ENTITY_TELEPORT, // 0x6B
ENTITY_TELEPORT, // 0x6C ADVANCEMENTS, // 0x6C
ADVANCEMENTS, // 0x6D ENTITY_PROPERTIES, // 0x6D
ENTITY_PROPERTIES, // 0x6E ENTITY_EFFECT, // 0x6E
ENTITY_EFFECT, // 0x6F DECLARE_RECIPES, // 0x6F
DECLARE_RECIPES, // 0x70 TAGS; // 0x70
TAGS; // 0x71
@Override @Override
public int getId() { public int getId() {

View File

@ -28,6 +28,7 @@ import com.viaversion.viaversion.api.type.types.version.Types1_20_2;
import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.ClientboundPackets1_19_4; import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.ClientboundPackets1_19_4;
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.Protocol1_20_2To1_20; import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.Protocol1_20_2To1_20;
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.ClientboundConfigurationPackets1_20_2; import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.ClientboundConfigurationPackets1_20_2;
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.ClientboundPackets1_20_2;
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.storage.ConfigurationState; import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.storage.ConfigurationState;
import com.viaversion.viaversion.rewriter.EntityRewriter; import com.viaversion.viaversion.rewriter.EntityRewriter;
@ -43,6 +44,26 @@ public final class EntityPacketRewriter1_20_2 extends EntityRewriter<Clientbound
registerMetadataRewriter(ClientboundPackets1_19_4.ENTITY_METADATA, Types1_20.METADATA_LIST, Types1_20_2.METADATA_LIST); registerMetadataRewriter(ClientboundPackets1_19_4.ENTITY_METADATA, Types1_20.METADATA_LIST, Types1_20_2.METADATA_LIST);
registerRemoveEntities(ClientboundPackets1_19_4.REMOVE_ENTITIES); registerRemoveEntities(ClientboundPackets1_19_4.REMOVE_ENTITIES);
protocol.registerClientbound(ClientboundPackets1_19_4.SPAWN_PLAYER, ClientboundPackets1_20_2.SPAWN_ENTITY, wrapper -> {
wrapper.passthrough(Type.VAR_INT); // Entity id
wrapper.passthrough(Type.UUID); // UUID
wrapper.write(Type.VAR_INT, Entity1_19_4Types.PLAYER.getId()); // Entity type id
wrapper.passthrough(Type.DOUBLE); // X
wrapper.passthrough(Type.DOUBLE); // Y
wrapper.passthrough(Type.DOUBLE); // Z
final byte yaw = wrapper.read(Type.BYTE); // Yaw
wrapper.passthrough(Type.BYTE); // Pitch
wrapper.write(Type.BYTE, yaw);
wrapper.write(Type.BYTE, yaw); // Head yaw
wrapper.write(Type.VAR_INT, 0); // Data
wrapper.write(Type.SHORT, (short) 0); // Velocity X
wrapper.write(Type.SHORT, (short) 0); // Velocity Y
wrapper.write(Type.SHORT, (short) 0); // Velocity Z
});
protocol.registerClientbound(ClientboundPackets1_19_4.JOIN_GAME, new PacketHandlers() { protocol.registerClientbound(ClientboundPackets1_19_4.JOIN_GAME, new PacketHandlers() {
@Override @Override
public void register() { public void register() {

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 # Project properties - we put these here so they can be modified without causing a recompile of the build scripts
projectVersion=4.8.0-1.20.2-pre1-SNAPSHOT projectVersion=4.8.0-1.20.2-pre2-SNAPSHOT
# Smile emoji # Smile emoji
mcVersions=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 mcVersions=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