Love it when Via breaks the API silently

This commit is contained in:
RaphiMC 2023-02-12 21:05:15 +01:00
parent 2a802e8665
commit 7ecbad93d6
15 changed files with 21 additions and 21 deletions

View File

@ -6,4 +6,4 @@ org.gradle.configureondemand=true
# Project properties
maven_name=ViaLegacy
maven_group=net.raphimc
maven_version=2.2.5
maven_version=2.2.6

View File

@ -35,7 +35,7 @@ public class Protocola1_0_16_2toa1_0_15 extends AbstractProtocol<ClientboundPack
@Override
protected void registerPackets() {
this.registerServerbound(State.LOGIN, -1, ServerboundPacketsa1_0_17.HANDSHAKE.getId(), new PacketHandlers() {
this.registerServerbound(State.LOGIN, ServerboundPacketsa1_0_17.HANDSHAKE.getId(), -1, new PacketHandlers() {
@Override
public void register() {
handler(wrapper -> {

View File

@ -46,7 +46,7 @@ public class Protocola1_2_0_1_2_1_1toa1_1_0_1_1_2_1 extends AbstractProtocol<Cli
}
});
this.registerServerbound(State.LOGIN, ServerboundPacketsa1_1_0.LOGIN.getId(), ServerboundPacketsa1_2_0.LOGIN.getId(), new PacketHandlers() {
this.registerServerbound(State.LOGIN, ServerboundPacketsa1_2_0.LOGIN.getId(), ServerboundPacketsa1_1_0.LOGIN.getId(), new PacketHandlers() {
@Override
public void register() {
map(Type.INT); // protocol id

View File

@ -138,13 +138,13 @@ public class Protocolb1_5_0_2tob1_4_0_1 extends AbstractProtocol<ClientboundPack
}
});
this.registerServerbound(State.LOGIN, ServerboundPacketsb1_5.HANDSHAKE.getId(), ServerboundPacketsb1_4.HANDSHAKE.getId(), new PacketHandlers() {
this.registerServerbound(State.LOGIN, ServerboundPacketsb1_4.HANDSHAKE.getId(), ServerboundPacketsb1_5.HANDSHAKE.getId(), new PacketHandlers() {
@Override
public void register() {
map(Types1_6_4.STRING, Typesb1_7_0_3.STRING); // username
}
});
this.registerServerbound(State.LOGIN, ServerboundPacketsb1_4.LOGIN.getId(), ServerboundPacketsb1_5.LOGIN.getId(), new PacketHandlers() {
this.registerServerbound(State.LOGIN, ServerboundPacketsb1_5.LOGIN.getId(), ServerboundPacketsb1_4.LOGIN.getId(), new PacketHandlers() {
@Override
public void register() {
map(Type.INT); // protocol id

View File

@ -224,7 +224,7 @@ public class Protocolb1_8_0_1tob1_7_0_3 extends AbstractProtocol<ClientboundPack
}
});
this.registerServerbound(State.STATUS, -1, ServerboundPacketsb1_8.SERVER_PING.getId(), new PacketHandlers() {
this.registerServerbound(State.STATUS, ServerboundPacketsb1_8.SERVER_PING.getId(), -1, new PacketHandlers() {
@Override
public void register() {
handler(wrapper -> {
@ -236,7 +236,7 @@ public class Protocolb1_8_0_1tob1_7_0_3 extends AbstractProtocol<ClientboundPack
}
});
this.cancelServerbound(ServerboundPacketsb1_8.SERVER_PING);
this.registerServerbound(State.LOGIN, ServerboundPacketsb1_7.LOGIN.getId(), ServerboundPacketsb1_8.LOGIN.getId(), new PacketHandlers() {
this.registerServerbound(State.LOGIN, ServerboundPacketsb1_8.LOGIN.getId(), ServerboundPacketsb1_7.LOGIN.getId(), new PacketHandlers() {
@Override
public void register() {
map(Type.INT); // protocol id

View File

@ -361,7 +361,7 @@ public class Protocola1_0_15toc0_30 extends AbstractProtocol<ClientboundPacketsc
}
});
this.registerServerbound(State.LOGIN, ServerboundPacketsc0_28.LOGIN.getId(), ServerboundPacketsa1_0_15.LOGIN.getId(), new PacketHandlers() {
this.registerServerbound(State.LOGIN, ServerboundPacketsa1_0_15.LOGIN.getId(), ServerboundPacketsc0_28.LOGIN.getId(), new PacketHandlers() {
@Override
public void register() {
map(Type.INT, Type.BYTE); // protocol id

View File

@ -74,7 +74,7 @@ public class Protocolc0_0_16a_02to0_0_15a_1 extends AbstractProtocol<Clientbound
}
});
this.registerServerbound(State.LOGIN, ServerboundPacketsc0_15a.LOGIN.getId(), ServerboundPacketsc0_19a.LOGIN.getId(), new PacketHandlers() {
this.registerServerbound(State.LOGIN, ServerboundPacketsc0_19a.LOGIN.getId(), ServerboundPacketsc0_15a.LOGIN.getId(), new PacketHandlers() {
@Override
public void register() {
handler(wrapper -> {

View File

@ -48,7 +48,7 @@ public class Protocolc0_27toc0_0_19a_06 extends AbstractProtocol<ClientboundPack
}
});
this.registerServerbound(State.LOGIN, ServerboundPacketsc0_19a.LOGIN.getId(), ServerboundPacketsc0_28.LOGIN.getId(), new PacketHandlers() {
this.registerServerbound(State.LOGIN, ServerboundPacketsc0_28.LOGIN.getId(), ServerboundPacketsc0_19a.LOGIN.getId(), new PacketHandlers() {
@Override
public void register() {
map(Type.BYTE); // protocol id

View File

@ -284,7 +284,7 @@ public class Protocolc0_30toc0_30cpe extends AbstractProtocol<ClientboundPackets
}
});
this.registerServerbound(State.LOGIN, ServerboundPacketsc0_30cpe.LOGIN.getId(), ServerboundPacketsc0_28.LOGIN.getId(), new PacketHandlers() {
this.registerServerbound(State.LOGIN, ServerboundPacketsc0_28.LOGIN.getId(), ServerboundPacketsc0_30cpe.LOGIN.getId(), new PacketHandlers() {
@Override
public void register() {
map(Type.BYTE); // protocol id

View File

@ -43,7 +43,7 @@ public class Protocol1_1to1_0_0_1 extends AbstractProtocol<ClientboundPackets1_0
protected void registerPackets() {
this.itemRewriter.register();
this.registerServerbound(State.LOGIN, ServerboundPackets1_0.LOGIN.getId(), ServerboundPackets1_1.LOGIN.getId(), new PacketHandlers() {
this.registerServerbound(State.LOGIN, ServerboundPackets1_1.LOGIN.getId(), ServerboundPackets1_0.LOGIN.getId(), new PacketHandlers() {
@Override
public void register() {
map(Type.INT); // protocol id

View File

@ -294,13 +294,13 @@ public class Protocol1_2_1_3to1_1 extends AbstractProtocol<ClientboundPackets1_1
}
});
this.registerServerbound(State.LOGIN, ServerboundPackets1_1.HANDSHAKE.getId(), ServerboundPackets1_2_1.HANDSHAKE.getId(), new PacketHandlers() {
this.registerServerbound(State.LOGIN, ServerboundPackets1_2_1.HANDSHAKE.getId(), ServerboundPackets1_1.HANDSHAKE.getId(), new PacketHandlers() {
@Override
public void register() {
map(Types1_6_4.STRING, Types1_6_4.STRING, s -> s.split(";")[0]); // info
}
});
this.registerServerbound(State.LOGIN, ServerboundPackets1_1.LOGIN.getId(), ServerboundPackets1_2_1.LOGIN.getId(), new PacketHandlers() {
this.registerServerbound(State.LOGIN, ServerboundPackets1_2_1.LOGIN.getId(), ServerboundPackets1_1.LOGIN.getId(), new PacketHandlers() {
@Override
public void register() {
map(Type.INT); // protocol id

View File

@ -636,7 +636,7 @@ public class Protocol1_3_1_2to1_2_4_5 extends AbstractProtocol<ClientboundPacket
}
});
this.registerServerbound(State.LOGIN, ServerboundPackets1_2_4.HANDSHAKE.getId(), ServerboundPackets1_3_1.CLIENT_PROTOCOL.getId(), new PacketHandlers() {
this.registerServerbound(State.LOGIN, ServerboundPackets1_3_1.CLIENT_PROTOCOL.getId(), ServerboundPackets1_2_4.HANDSHAKE.getId(), new PacketHandlers() {
@Override
public void register() {
handler(wrapper -> {

View File

@ -267,7 +267,7 @@ public class Protocol1_4_2to1_3_1_2 extends AbstractProtocol<ClientboundPackets1
}
});
this.registerServerbound(State.STATUS, ServerboundPackets1_3_1.SERVER_PING.getId(), ServerboundPackets1_5_2.SERVER_PING.getId(), new PacketHandlers() {
this.registerServerbound(State.STATUS, ServerboundPackets1_5_2.SERVER_PING.getId(), ServerboundPackets1_3_1.SERVER_PING.getId(), new PacketHandlers() {
@Override
public void register() {
handler(PacketWrapper::clearPacket);

View File

@ -275,7 +275,7 @@ public class Protocol1_6_1to1_5_2 extends AbstractProtocol<ClientboundPackets1_5
}
});
this.registerServerbound(State.STATUS, ServerboundPackets1_5_2.SERVER_PING.getId(), ServerboundPackets1_6_4.SERVER_PING.getId(), new PacketHandlers() {
this.registerServerbound(State.STATUS, ServerboundPackets1_6_4.SERVER_PING.getId(), ServerboundPackets1_5_2.SERVER_PING.getId(), new PacketHandlers() {
@Override
public void register() {
handler(wrapper -> {

View File

@ -889,7 +889,7 @@ public class Protocol1_7_2_5to1_6_4 extends AbstractProtocol<ClientboundPackets1
});
this.cancelClientbound(ClientboundPackets1_6_4.CREATIVE_INVENTORY_ACTION);
this.registerServerbound(State.STATUS, ServerboundPackets1_6_4.SERVER_PING.getId(), ServerboundStatusPackets.STATUS_REQUEST.getId(), new PacketHandlers() {
this.registerServerbound(State.STATUS, ServerboundStatusPackets.STATUS_REQUEST.getId(), ServerboundPackets1_6_4.SERVER_PING.getId(), new PacketHandlers() {
@Override
public void register() {
handler(wrapper -> {
@ -906,7 +906,7 @@ public class Protocol1_7_2_5to1_6_4 extends AbstractProtocol<ClientboundPackets1
});
}
});
this.registerServerbound(State.STATUS, -1, ServerboundStatusPackets.PING_REQUEST.getId(), new PacketHandlers() {
this.registerServerbound(State.STATUS, ServerboundStatusPackets.PING_REQUEST.getId(), -1, new PacketHandlers() {
@Override
public void register() {
handler(wrapper -> {
@ -917,7 +917,7 @@ public class Protocol1_7_2_5to1_6_4 extends AbstractProtocol<ClientboundPackets1
});
}
});
this.registerServerbound(State.LOGIN, ServerboundPackets1_6_4.CLIENT_PROTOCOL.getId(), ServerboundLoginPackets.HELLO.getId(), new PacketHandlers() {
this.registerServerbound(State.LOGIN, ServerboundLoginPackets.HELLO.getId(), ServerboundPackets1_6_4.CLIENT_PROTOCOL.getId(), new PacketHandlers() {
@Override
public void register() {
handler(wrapper -> {
@ -935,7 +935,7 @@ public class Protocol1_7_2_5to1_6_4 extends AbstractProtocol<ClientboundPackets1
});
}
});
this.registerServerbound(State.LOGIN, ServerboundPackets1_6_4.SHARED_KEY.getId(), ServerboundLoginPackets.ENCRYPTION_KEY.getId());
this.registerServerbound(State.LOGIN, ServerboundLoginPackets.ENCRYPTION_KEY.getId(), ServerboundPackets1_6_4.SHARED_KEY.getId());
this.registerServerbound(ServerboundPackets1_7_2.CHAT_MESSAGE, new PacketHandlers() {
@Override
public void register() {