refactory
This commit is contained in:
@@ -11,13 +11,13 @@ import mc.core.network.SCPacket;
|
||||
import mc.core.network.proto_125.packets.*;
|
||||
|
||||
public class PacketManager {
|
||||
private static final BiMap<Integer, Class<?>> packetMap = ImmutableBiMap.of(
|
||||
0x01, LoginPacket.class,
|
||||
0x02, HandshakePacket.class,
|
||||
0x0D, PositionAndLookPacket.class,
|
||||
0xFE, PingPacket.class,
|
||||
0xFF, KickPacket.class
|
||||
);
|
||||
private static final BiMap<Integer, Class<?>> packetMap = ImmutableBiMap.<Integer, Class<?>>builder()
|
||||
.put(0x01, LoginPacket.class)
|
||||
.put(0x02, HandshakePacket.class)
|
||||
.put(0x0D, PositionAndLookPacket.class)
|
||||
.put(0xFE, PingPacket.class)
|
||||
.put(0xFF, KickPacket.class)
|
||||
.build();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Class<? extends CSPacket> getClientSidePacket(int id) {
|
||||
|
||||
Reference in New Issue
Block a user