Skip to content

Commit f6def0c

Browse files
committed
24w05a (mostly)
1 parent b3b4d0f commit f6def0c

File tree

6 files changed

+22
-5
lines changed

6 files changed

+22
-5
lines changed

common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/Protocol1_20_3To1_20_5.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ protected void registerPackets() {
104104
translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.DISGUISED_CHAT);
105105
translatableRewriter.registerPing();
106106

107-
108107
registerClientbound(State.LOGIN, ClientboundLoginPackets.HELLO, wrapper -> {
109108
wrapper.passthrough(Type.STRING); // Server ID
110109
wrapper.passthrough(Type.BYTE_ARRAY_PRIMITIVE); // Public key
@@ -125,6 +124,8 @@ protected void registerPackets() {
125124
registerClientbound(ClientboundPackets1_20_5.COOKIE_REQUEST, null, wrapper -> handleCookieRequest(wrapper, ServerboundPackets1_20_5.COOKIE_RESPONSE));
126125
registerClientbound(ClientboundPackets1_20_5.STORE_COOKIE, null, this::handleStoreCookie);
127126
registerClientbound(ClientboundPackets1_20_5.TRANSFER, null, this::handleTransfer);
127+
128+
cancelClientbound(ClientboundPackets1_20_5.DEBUG_SAMPLE);
128129
}
129130

130131
private void handleStoreCookie(final PacketWrapper wrapper) throws Exception {

common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public void registerPackets() {
5151
registerWindowItems1_17_1(ClientboundPackets1_20_5.WINDOW_ITEMS);
5252
registerSetSlot1_17_1(ClientboundPackets1_20_5.SET_SLOT);
5353
registerAdvancements1_20_3(ClientboundPackets1_20_5.ADVANCEMENTS);
54-
registerEntityEquipmentArray(ClientboundPackets1_20_5.ENTITY_EQUIPMENT);
5554
registerClickWindow1_17_1(ServerboundPackets1_20_3.CLICK_WINDOW);
5655
registerCreativeInvAction(ServerboundPackets1_20_3.CREATIVE_INVENTORY_ACTION);
5756
registerWindowPropertyEnchantmentHandler(ClientboundPackets1_20_5.WINDOW_PROPERTY);

common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,23 @@ public void registerPackets() {
5252
registerMetadataRewriter(ClientboundPackets1_20_5.ENTITY_METADATA, Types1_20_5.METADATA_LIST, Types1_20_3.METADATA_LIST);
5353
registerRemoveEntities(ClientboundPackets1_20_5.REMOVE_ENTITIES);
5454

55+
protocol.registerClientbound(ClientboundPackets1_20_5.ENTITY_EQUIPMENT, wrapper -> {
56+
wrapper.passthrough(Type.VAR_INT); // Entity id
57+
byte slot;
58+
do {
59+
slot = wrapper.read(Type.BYTE);
60+
if (slot == 6) {
61+
//TODO
62+
// Body to... something else? the actual inventory slot is still broken for llamas
63+
// Incoming click also needs to be fixed
64+
slot = 2;
65+
}
66+
67+
wrapper.write(Type.BYTE, slot);
68+
protocol.getItemRewriter().handleItemToClient(wrapper.passthrough(Type.ITEM1_20_2));
69+
} while ((slot & -128) != 0);
70+
});
71+
5572
protocol.registerClientbound(ClientboundConfigurationPackets1_20_5.REGISTRY_DATA, new PacketHandlers() {
5673
@Override
5774
protected void register() {
@@ -215,7 +232,7 @@ protected void registerRewrites() {
215232
meta.setValue(protocol.getMappingData().getNewBlockStateId(blockState));
216233
});
217234

218-
filter().type(EntityTypes1_20_5.WOLF).removeIndex(21); // Has armor
235+
filter().type(EntityTypes1_20_5.LLAMA).addIndex(20); // Carpet color
219236
filter().type(EntityTypes1_20_5.ARMADILLO).removeIndex(17); // State
220237
}
221238

Binary file not shown.

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
projectVersion=4.10.0-24w04a-SNAPSHOT
1+
projectVersion=4.10.0-24w05a-SNAPSHOT
22

33
# Smile emoji
44
mcVersions=1.20.4, 1.20.3, 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

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ metadata.format.version = "1.1"
33
[versions]
44

55
# ViaVersion
6-
viaver = "4.10.0-24w04a-SNAPSHOT"
6+
viaver = "4.10.0-24w05a-SNAPSHOT"
77

88
# Common provided
99
netty = "4.0.20.Final"

0 commit comments

Comments
 (0)