Skip to content

Commit

Permalink
24w05a (mostly)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytv committed Jan 31, 2024
1 parent b3b4d0f commit f6def0c
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ protected void registerPackets() {
translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.DISGUISED_CHAT);
translatableRewriter.registerPing();


registerClientbound(State.LOGIN, ClientboundLoginPackets.HELLO, wrapper -> {
wrapper.passthrough(Type.STRING); // Server ID
wrapper.passthrough(Type.BYTE_ARRAY_PRIMITIVE); // Public key
Expand All @@ -125,6 +124,8 @@ protected void registerPackets() {
registerClientbound(ClientboundPackets1_20_5.COOKIE_REQUEST, null, wrapper -> handleCookieRequest(wrapper, ServerboundPackets1_20_5.COOKIE_RESPONSE));
registerClientbound(ClientboundPackets1_20_5.STORE_COOKIE, null, this::handleStoreCookie);
registerClientbound(ClientboundPackets1_20_5.TRANSFER, null, this::handleTransfer);

cancelClientbound(ClientboundPackets1_20_5.DEBUG_SAMPLE);
}

private void handleStoreCookie(final PacketWrapper wrapper) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public void registerPackets() {
registerWindowItems1_17_1(ClientboundPackets1_20_5.WINDOW_ITEMS);
registerSetSlot1_17_1(ClientboundPackets1_20_5.SET_SLOT);
registerAdvancements1_20_3(ClientboundPackets1_20_5.ADVANCEMENTS);
registerEntityEquipmentArray(ClientboundPackets1_20_5.ENTITY_EQUIPMENT);
registerClickWindow1_17_1(ServerboundPackets1_20_3.CLICK_WINDOW);
registerCreativeInvAction(ServerboundPackets1_20_3.CREATIVE_INVENTORY_ACTION);
registerWindowPropertyEnchantmentHandler(ClientboundPackets1_20_5.WINDOW_PROPERTY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ public void registerPackets() {
registerMetadataRewriter(ClientboundPackets1_20_5.ENTITY_METADATA, Types1_20_5.METADATA_LIST, Types1_20_3.METADATA_LIST);
registerRemoveEntities(ClientboundPackets1_20_5.REMOVE_ENTITIES);

protocol.registerClientbound(ClientboundPackets1_20_5.ENTITY_EQUIPMENT, wrapper -> {
wrapper.passthrough(Type.VAR_INT); // Entity id
byte slot;
do {
slot = wrapper.read(Type.BYTE);
if (slot == 6) {
//TODO
// Body to... something else? the actual inventory slot is still broken for llamas
// Incoming click also needs to be fixed
slot = 2;
}

wrapper.write(Type.BYTE, slot);
protocol.getItemRewriter().handleItemToClient(wrapper.passthrough(Type.ITEM1_20_2));
} while ((slot & -128) != 0);
});

protocol.registerClientbound(ClientboundConfigurationPackets1_20_5.REGISTRY_DATA, new PacketHandlers() {
@Override
protected void register() {
Expand Down Expand Up @@ -215,7 +232,7 @@ protected void registerRewrites() {
meta.setValue(protocol.getMappingData().getNewBlockStateId(blockState));
});

filter().type(EntityTypes1_20_5.WOLF).removeIndex(21); // Has armor
filter().type(EntityTypes1_20_5.LLAMA).addIndex(20); // Carpet color
filter().type(EntityTypes1_20_5.ARMADILLO).removeIndex(17); // State
}

Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
projectVersion=4.10.0-24w04a-SNAPSHOT
projectVersion=4.10.0-24w05a-SNAPSHOT

# Smile emoji
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
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ metadata.format.version = "1.1"
[versions]

# ViaVersion
viaver = "4.10.0-24w04a-SNAPSHOT"
viaver = "4.10.0-24w05a-SNAPSHOT"

# Common provided
netty = "4.0.20.Final"
Expand Down

0 comments on commit f6def0c

Please sign in to comment.