mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-21 16:47:57 +01:00
23w18a, maybe
This commit is contained in:
parent
483920b729
commit
e74b5d661d
@ -5,7 +5,7 @@ plugins {
|
||||
|
||||
allprojects {
|
||||
group = "com.viaversion"
|
||||
version = "4.7.0-23w17a-SNAPSHOT"
|
||||
version = "4.7.0-23w18a-SNAPSHOT"
|
||||
description = "Allow older clients to join newer server versions."
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,6 @@ public final class BlockItemPackets1_20 extends ItemRewriter<ClientboundPackets1
|
||||
registerSetCooldown(ClientboundPackets1_19_4.COOLDOWN);
|
||||
registerWindowItems1_17_1(ClientboundPackets1_19_4.WINDOW_ITEMS);
|
||||
registerSetSlot1_17_1(ClientboundPackets1_19_4.SET_SLOT);
|
||||
registerAdvancements(ClientboundPackets1_19_4.ADVANCEMENTS, Type.FLAT_VAR_INT_ITEM);
|
||||
registerEntityEquipmentArray(ClientboundPackets1_19_4.ENTITY_EQUIPMENT);
|
||||
registerClickWindow1_17_1(ServerboundPackets1_19_4.CLICK_WINDOW);
|
||||
registerTradeList1_19(ClientboundPackets1_19_4.TRADE_LIST);
|
||||
@ -87,6 +86,41 @@ public final class BlockItemPackets1_20 extends ItemRewriter<ClientboundPackets1
|
||||
registerWindowPropertyEnchantmentHandler(ClientboundPackets1_19_4.WINDOW_PROPERTY);
|
||||
registerSpawnParticle1_19(ClientboundPackets1_19_4.SPAWN_PARTICLE);
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_19_4.ADVANCEMENTS, wrapper -> {
|
||||
wrapper.passthrough(Type.BOOLEAN); // Reset/clear
|
||||
int size = wrapper.passthrough(Type.VAR_INT); // Mapping size
|
||||
for (int i = 0; i < size; i++) {
|
||||
wrapper.passthrough(Type.STRING); // Identifier
|
||||
|
||||
// Parent
|
||||
if (wrapper.passthrough(Type.BOOLEAN))
|
||||
wrapper.passthrough(Type.STRING);
|
||||
|
||||
// Display data
|
||||
if (wrapper.passthrough(Type.BOOLEAN)) {
|
||||
wrapper.passthrough(Type.COMPONENT); // Title
|
||||
wrapper.passthrough(Type.COMPONENT); // Description
|
||||
handleItemToClient(wrapper.passthrough(Type.FLAT_VAR_INT_ITEM)); // Icon
|
||||
wrapper.passthrough(Type.VAR_INT); // Frame type
|
||||
int flags = wrapper.passthrough(Type.INT); // Flags
|
||||
if ((flags & 1) != 0) {
|
||||
wrapper.passthrough(Type.STRING); // Background texture
|
||||
}
|
||||
wrapper.passthrough(Type.FLOAT); // X
|
||||
wrapper.passthrough(Type.FLOAT); // Y
|
||||
}
|
||||
|
||||
wrapper.passthrough(Type.STRING_ARRAY); // Criteria
|
||||
|
||||
int arrayLength = wrapper.passthrough(Type.VAR_INT);
|
||||
for (int array = 0; array < arrayLength; array++) {
|
||||
wrapper.passthrough(Type.STRING_ARRAY); // String array
|
||||
}
|
||||
|
||||
wrapper.read(Type.BOOLEAN); // Sends telemetry
|
||||
}
|
||||
});
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_19_4.OPEN_SIGN_EDITOR, wrapper -> {
|
||||
final Position position = wrapper.passthrough(Type.POSITION1_14);
|
||||
final boolean frontSide = wrapper.read(Type.BOOLEAN);
|
||||
|
Loading…
Reference in New Issue
Block a user