mirror of
https://github.com/Nan1t/NanoLimbo.git
synced 2025-07-09 19:40:14 +02:00
Revert "Revert "Added display of brand name under f3""
This reverts commit 974e243402e0838db98716c7efba9da85b07bcf9.
This commit is contained in:
parent
d2c2987111
commit
f23ee893fa
@ -40,6 +40,7 @@ public class ClientConnection extends ChannelInboundHandlerAdapter {
|
|||||||
|
|
||||||
private static PreEncodedPacket PACKET_LOGIN_SUCCESS;
|
private static PreEncodedPacket PACKET_LOGIN_SUCCESS;
|
||||||
private static PreEncodedPacket PACKET_JOIN_GAME;
|
private static PreEncodedPacket PACKET_JOIN_GAME;
|
||||||
|
private static PreEncodedPacket PACKET_PLUGIN_MESSAGE;
|
||||||
private static PreEncodedPacket PACKET_PLAYER_ABILITIES;
|
private static PreEncodedPacket PACKET_PLAYER_ABILITIES;
|
||||||
private static PreEncodedPacket PACKET_PLAYER_INFO;
|
private static PreEncodedPacket PACKET_PLAYER_INFO;
|
||||||
private static PreEncodedPacket PACKET_PLAYER_POS;
|
private static PreEncodedPacket PACKET_PLAYER_POS;
|
||||||
@ -211,6 +212,7 @@ public class ClientConnection extends ChannelInboundHandlerAdapter {
|
|||||||
server.getConnections().addConnection(this);
|
server.getConnections().addConnection(this);
|
||||||
|
|
||||||
writePacket(PACKET_JOIN_GAME);
|
writePacket(PACKET_JOIN_GAME);
|
||||||
|
writePacket(PACKET_PLUGIN_MESSAGE);
|
||||||
writePacket(PACKET_PLAYER_ABILITIES);
|
writePacket(PACKET_PLAYER_ABILITIES);
|
||||||
writePacket(PACKET_PLAYER_POS);
|
writePacket(PACKET_PLAYER_POS);
|
||||||
writePacket(PACKET_PLAYER_INFO);
|
writePacket(PACKET_PLAYER_INFO);
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
package ru.nanit.limbo.protocol.packets.play;
|
||||||
|
|
||||||
|
import ru.nanit.limbo.protocol.ByteMessage;
|
||||||
|
import ru.nanit.limbo.protocol.PacketOut;
|
||||||
|
import ru.nanit.limbo.protocol.registry.Version;
|
||||||
|
|
||||||
|
public class PacketPluginMessage implements PacketOut {
|
||||||
|
private String channel;
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public void setChannel(String channel){
|
||||||
|
this.channel = channel;
|
||||||
|
}
|
||||||
|
public void setMessage(String message){
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void encode(ByteMessage msg, Version version) {
|
||||||
|
msg.writeString(channel);
|
||||||
|
msg.writeString(message);
|
||||||
|
}
|
||||||
|
}
|
@ -1,18 +1,18 @@
|
|||||||
package ru.nanit.limbo.protocol.registry;
|
package ru.nanit.limbo.protocol.registry;
|
||||||
|
|
||||||
import ru.nanit.limbo.protocol.Packet;
|
import ru.nanit.limbo.protocol.Packet;
|
||||||
import ru.nanit.limbo.protocol.packets.*;
|
import ru.nanit.limbo.protocol.packets.PacketHandshake;
|
||||||
import ru.nanit.limbo.protocol.packets.login.*;
|
import ru.nanit.limbo.protocol.packets.login.*;
|
||||||
import ru.nanit.limbo.protocol.packets.play.*;
|
import ru.nanit.limbo.protocol.packets.play.*;
|
||||||
import ru.nanit.limbo.protocol.packets.status.PacketStatusPing;
|
import ru.nanit.limbo.protocol.packets.status.PacketStatusPing;
|
||||||
import ru.nanit.limbo.protocol.packets.status.PacketStatusRequest;
|
import ru.nanit.limbo.protocol.packets.status.PacketStatusRequest;
|
||||||
import ru.nanit.limbo.protocol.packets.status.PacketStatusResponse;
|
import ru.nanit.limbo.protocol.packets.status.PacketStatusResponse;
|
||||||
|
|
||||||
import static ru.nanit.limbo.protocol.registry.Version.*;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import static ru.nanit.limbo.protocol.registry.Version.*;
|
||||||
|
|
||||||
public enum State {
|
public enum State {
|
||||||
|
|
||||||
HANDSHAKING(0) {
|
HANDSHAKING(0) {
|
||||||
@ -70,13 +70,6 @@ public enum State {
|
|||||||
map(0x0F, V1_17, V1_18)
|
map(0x0F, V1_17, V1_18)
|
||||||
);
|
);
|
||||||
|
|
||||||
clientBound.register(PacketDeclareCommands::new,
|
|
||||||
map(0x11, V1_13, V1_14_4),
|
|
||||||
map(0x12, V1_15, V1_15_2),
|
|
||||||
map(0x11, V1_16, V1_16_1),
|
|
||||||
map(0x10, V1_16_2, V1_16_4),
|
|
||||||
map(0x12, V1_17, V1_18)
|
|
||||||
);
|
|
||||||
clientBound.register(PacketJoinGame::new,
|
clientBound.register(PacketJoinGame::new,
|
||||||
map(0x01, V1_8, V1_8),
|
map(0x01, V1_8, V1_8),
|
||||||
map(0x23, V1_9, V1_12_2),
|
map(0x23, V1_9, V1_12_2),
|
||||||
@ -89,7 +82,9 @@ public enum State {
|
|||||||
);
|
);
|
||||||
// to do
|
// to do
|
||||||
clientBound.register(PacketPluginMessage::new,
|
clientBound.register(PacketPluginMessage::new,
|
||||||
map(0x18, V1_18, V1_18)
|
map(0x19, V1_13, V1_13_2),
|
||||||
|
map(0x18, V1_14, V1_14_4),
|
||||||
|
map(0x19, V1_15, V1_18)
|
||||||
);
|
);
|
||||||
clientBound.register(PacketPlayerAbilities::new,
|
clientBound.register(PacketPlayerAbilities::new,
|
||||||
map(0x39, V1_8, V1_8),
|
map(0x39, V1_8, V1_8),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user