3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 16:12:42 +01:00
Dieser Commit ist enthalten in:
Nassim Jahnke 2024-04-15 17:01:37 +02:00
Ursprung 2be190d152
Commit 31ccd2ab9b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F
5 geänderte Dateien mit 10 neuen und 20 gelöschten Zeilen

Datei anzeigen

@ -83,7 +83,7 @@ public class ProtocolVersion implements Comparable<ProtocolVersion> {
public static final ProtocolVersion v1_20 = register(763, "1.20/1.20.1", new SubVersionRange("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, "1.20.3/1.20.4", new SubVersionRange("1.20", 3, 4));
public static final ProtocolVersion v1_20_5 = register(766, 185, "1.20.5");
public static final ProtocolVersion v1_20_5 = register(766, 186, "1.20.5");
public static final ProtocolVersion unknown = new ProtocolVersion(VersionType.SPECIAL, -1, -1, "UNKNOWN", null);
public static ProtocolVersion register(int version, String name) {

Datei anzeigen

@ -153,14 +153,14 @@ public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter<Clientboun
registerSetSlot1_17_1(ClientboundPackets1_20_3.SET_SLOT);
registerEntityEquipmentArray(ClientboundPackets1_20_3.ENTITY_EQUIPMENT);
registerClickWindow1_17_1(ServerboundPackets1_20_5.CLICK_WINDOW);
protocol.registerServerbound(ServerboundPackets1_20_5.CREATIVE_INVENTORY_ACTION, wrapper -> {
final int slot = wrapper.read(Type.UNSIGNED_SHORT);
wrapper.write(Type.SHORT, (short) Math.min(slot, Short.MAX_VALUE));
final Item item = handleItemToServer(wrapper.read(Types1_20_5.ITEM));
wrapper.write(Type.ITEM1_20_2, item);
});
registerWindowPropertyEnchantmentHandler(ClientboundPackets1_20_3.WINDOW_PROPERTY);
registerCreativeInvAction(ServerboundPackets1_20_5.CREATIVE_INVENTORY_ACTION);
protocol.registerServerbound(ServerboundPackets1_20_5.CLICK_WINDOW_BUTTON, wrapper -> {
final byte containerId = wrapper.read(Type.BYTE);
final byte buttonId = wrapper.read(Type.BYTE);
wrapper.write(Type.VAR_INT, (int) containerId);
wrapper.write(Type.VAR_INT, (int) buttonId);
});
protocol.registerClientbound(ClientboundPackets1_20_3.ADVANCEMENTS, wrapper -> {
wrapper.passthrough(Type.BOOLEAN); // Reset/clear

Datei anzeigen

@ -186,16 +186,6 @@ public class ItemRewriter<C extends ClientboundPacketType, S extends Serverbound
});
}
public void registerCreativeInvAction1_20_5(S packetType) {
protocol.registerServerbound(packetType, new PacketHandlers() {
@Override
public void register() {
map(Type.UNSIGNED_SHORT); // Slot
handler(wrapper -> handleServerboundItem(wrapper));
}
});
}
public void registerClickWindow(S packetType) {
protocol.registerServerbound(packetType, new PacketHandlers() {
@Override

Datei anzeigen

@ -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.10.0-1.20.5-pre1-SNAPSHOT
projectVersion=4.10.0-1.20.5-pre2-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, 1.9.4, 1.9.3, 1.9.2, 1.9.1, 1.9, 1.8.9

Datei anzeigen

@ -60,7 +60,7 @@ public final class BlockItemPacketRewriter1_99 extends StructuredItemRewriter<Cl
registerEntityEquipmentArray(ClientboundPackets1_20_5.ENTITY_EQUIPMENT);
registerClickWindow1_17_1(ServerboundPackets1_20_5.CLICK_WINDOW);
registerTradeList1_20_5(ClientboundPackets1_20_5.TRADE_LIST, Types1_20_5.ITEM_COST, Types1_20_5.ITEM_COST, Types1_20_5.OPTIONAL_ITEM_COST, Types1_20_5.OPTIONAL_ITEM_COST);
registerCreativeInvAction1_20_5(ServerboundPackets1_20_5.CREATIVE_INVENTORY_ACTION);
registerCreativeInvAction(ServerboundPackets1_20_5.CREATIVE_INVENTORY_ACTION);
registerWindowPropertyEnchantmentHandler(ClientboundPackets1_20_5.WINDOW_PROPERTY);
registerSpawnParticle1_20_5(ClientboundPackets1_20_5.SPAWN_PARTICLE, Types1_20_5.PARTICLE, Types1_20_5.PARTICLE);
registerExplosion(ClientboundPackets1_20_5.EXPLOSION, Types1_20_5.PARTICLE, Types1_20_5.PARTICLE); // Rewrites the included sound and particles