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