Search in sources :

Example 11 with PacketTranslator

use of com.github.dirtpowered.dirtmv.data.translator.PacketTranslator in project DirtMultiversion by DirtPowered.

the class ProtocolRelease5To4 method registerTranslators.

@Override
public void registerTranslators() {
    // status ping
    addTranslator(0x00, ProtocolState.STATUS, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            String json = data.read(Type.V1_7_STRING, 0);
            ServerPing serverPing = DirtMultiVersion.GSON.fromJson(json, ServerPing.class);
            ServerPing.Version versionObj = new ServerPing.Version();
            versionObj.setName("1.7.10");
            versionObj.setProtocol(5);
            serverPing.setVersion(versionObj);
            List<ServerPing.Player> samplePlayers = serverPing.getPlayers().getSample();
            if (samplePlayers != null) {
                for (ServerPing.Player player : samplePlayers) {
                    player.setId(dashedFromTrimmedUUID(player.getId()));
                }
            }
            return PacketUtil.createPacket(0x00, new TypeHolder[] { set(Type.V1_7_STRING, serverPing.toString()) });
        }
    });
    // login success
    addTranslator(0x02, ProtocolState.LOGIN, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            String trimmedUUID = data.read(Type.V1_7_STRING, 0);
            return PacketUtil.createPacket(0x02, new TypeHolder[] { set(Type.V1_7_STRING, dashedFromTrimmedUUID(trimmedUUID)), data.read(1) });
        }
    });
    // spawn player
    addTranslator(0x0C, ProtocolState.PLAY, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            String trimmedUUID = data.read(Type.V1_7_STRING, 1);
            return PacketUtil.createPacket(0x0C, new TypeHolder[] { data.read(0), set(Type.V1_7_STRING, dashedFromTrimmedUUID(trimmedUUID)), data.read(2), set(Type.VAR_INT, 0), data.read(3), data.read(4), data.read(5), data.read(6), data.read(7), data.read(8), data.read(9) });
        }
    });
}
Also used : TypeHolder(com.github.dirtpowered.dirtmv.data.protocol.TypeHolder) ServerSession(com.github.dirtpowered.dirtmv.network.server.ServerSession) PacketTranslator(com.github.dirtpowered.dirtmv.data.translator.PacketTranslator) DirtMultiVersion(com.github.dirtpowered.dirtmv.DirtMultiVersion) MinecraftVersion(com.github.dirtpowered.dirtmv.data.MinecraftVersion) List(java.util.List) PacketData(com.github.dirtpowered.dirtmv.data.protocol.PacketData) ServerPing(com.github.dirtpowered.dirtmv.network.versions.Release4To78.ping.ServerPing)

Example 12 with PacketTranslator

use of com.github.dirtpowered.dirtmv.data.translator.PacketTranslator in project DirtMultiversion by DirtPowered.

the class ProtocolRelease73To61 method registerTranslators.

@Override
public void registerTranslators() {
    // login
    addTranslator(0x01, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            int entityId = data.read(Type.INT, 0);
            session.getUserData().setEntityId(entityId);
            EntityTracker tracker = new EntityTracker();
            tracker.addEntity(entityId, EntityType.HUMAN);
            session.getUserData().getProtocolStorage().set(EntityTracker.class, tracker);
            // send entity attributes (fixes fast movement)
            session.sendPacket(data, PacketDirection.TO_CLIENT, getFrom());
            session.sendPacket(getDefaultAttributes(entityId), PacketDirection.TO_CLIENT, getFrom());
            return cancel();
        }
    });
    // respawn
    addTranslator(0x09, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            int entityId = session.getUserData().getEntityId();
            session.sendPacket(data, PacketDirection.TO_CLIENT, getFrom());
            session.sendPacket(getDefaultAttributes(entityId), PacketDirection.TO_CLIENT, getFrom());
            return cancel();
        }
    });
    // handshake
    addTranslator(0x02, PacketDirection.TO_SERVER, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            return PacketUtil.createPacket(0x02, new TypeHolder[] { set(Type.BYTE, (byte) 61), data.read(1), data.read(2), data.read(3) });
        }
    });
    // kick disconnect
    addTranslator(0xFF, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            if (session.getUserData().getPreNettyProtocolState() != PreNettyProtocolState.STATUS)
                return data;
            String reason = data.read(Type.STRING, 0);
            ServerMotd pingMessage = ServerMotd.deserialize(reason);
            pingMessage.setVersionName("1.6.1");
            pingMessage.setProtocol(session.getUserData().getClientVersion().getRegistryId());
            return PacketUtil.createPacket(0xFF, new TypeHolder[] { set(Type.STRING, ServerMotd.serialize(pingMessage)) });
        }
    });
    // chat
    addTranslator(0x03, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            String message = data.read(Type.STRING, 0);
            return PacketUtil.createPacket(0x03, new TypeHolder[] { set(Type.STRING, ChatUtils.legacyToJsonString(message)) });
        }
    });
    // update health
    addTranslator(0x08, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            return PacketUtil.createPacket(0x08, new TypeHolder[] { set(Type.FLOAT, data.read(Type.SHORT, 0).floatValue()), data.read(1), data.read(2) });
        }
    });
    // mob spawn
    addTranslator(0x18, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            EntityType entityType = EntityType.fromEntityTypeId(data.read(Type.BYTE, 1));
            int entityId = data.read(Type.INT, 0);
            EntityTracker tracker = session.getUserData().getProtocolStorage().get(EntityTracker.class);
            tracker.addEntity(entityId, entityType);
            WatchableObject[] oldMeta = data.read(Type.V1_4R_METADATA, 11);
            WatchableObject[] newMeta = metadataTransformer.transformMetadata(entityType, oldMeta);
            return PacketUtil.createPacket(0x18, new TypeHolder[] { data.read(0), data.read(1), data.read(2), data.read(3), data.read(4), data.read(5), data.read(6), data.read(7), data.read(8), data.read(9), data.read(10), set(Type.V1_4R_METADATA, newMeta) });
        }
    });
    // entity destroy
    addTranslator(0x1D, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            int[] entities = data.read(Type.BYTE_INT_ARRAY, 0);
            EntityTracker tracker = session.getUserData().getProtocolStorage().get(EntityTracker.class);
            for (int entityId : entities) {
                tracker.removeEntity(entityId);
            }
            return data;
        }
    });
    // entity metadata
    addTranslator(0x28, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            int entityId = data.read(Type.INT, 0);
            EntityTracker tracker = session.getUserData().getProtocolStorage().get(EntityTracker.class);
            EntityType entityType = tracker.getEntityById(entityId);
            if (entityType == null) {
                Logger.warn("[{}] skipping translating metadata for {}. Entity is not tracked", session.getLogTag(), entityId);
                return cancel();
            }
            WatchableObject[] oldMeta = data.read(Type.V1_4R_METADATA, 1);
            WatchableObject[] newMeta = metadataTransformer.transformMetadata(entityType, oldMeta);
            return PacketUtil.createPacket(0x28, new TypeHolder[] { data.read(0), set(Type.V1_4R_METADATA, newMeta) });
        }
    });
    // name entity spawn
    addTranslator(0x14, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            int entityId = data.read(Type.INT, 0);
            EntityTracker tracker = session.getUserData().getProtocolStorage().get(EntityTracker.class);
            tracker.addEntity(entityId, EntityType.HUMAN);
            WatchableObject[] oldMeta = data.read(Type.V1_4R_METADATA, 8);
            WatchableObject[] newMeta = metadataTransformer.transformMetadata(EntityType.HUMAN, oldMeta);
            return PacketUtil.createPacket(0x14, new TypeHolder[] { data.read(0), data.read(1), data.read(2), data.read(3), data.read(4), data.read(5), data.read(6), data.read(7), set(Type.V1_4R_METADATA, newMeta) });
        }
    });
    // vehicle spawn
    addTranslator(0x17, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            int entityId = data.read(Type.INT, 0);
            byte vehicleEntity = data.read(Type.BYTE, 1);
            EntityTracker tracker = session.getUserData().getProtocolStorage().get(EntityTracker.class);
            switch(vehicleEntity) {
                case 0x02:
                    /* item */
                    tracker.addEntity(entityId, EntityType.ITEM);
                    break;
                case 0x46:
                    /* sand, gravel */
                    tracker.addEntity(entityId, EntityType.FALLING_OBJECT);
                    break;
            }
            return data;
        }
    });
    // statistics
    addTranslator(0xC8, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            return PacketUtil.createPacket(0xC8, new TypeHolder[] { data.read(0), set(Type.INT, data.read(Type.BYTE, 1).intValue()) });
        }
    });
    // level sound
    addTranslator(0x3E, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            String soundName = data.read(Type.STRING, 0);
            String newSoundName = soundRemapper.getNewSoundName(soundName);
            if (newSoundName.isEmpty())
                return cancel();
            return PacketUtil.createPacket(0x3E, new TypeHolder[] { set(Type.STRING, newSoundName), data.read(1), data.read(2), data.read(3), data.read(4), data.read(5) });
        }
    });
    // player abilities
    addTranslator(0xCA, PacketDirection.TO_SERVER, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            return PacketUtil.createPacket(0xCA, new TypeHolder[] { data.read(0), set(Type.BYTE, (byte) (data.read(Type.FLOAT, 1) * 255F)), set(Type.BYTE, (byte) (data.read(Type.FLOAT, 2) * 255F)) });
        }
    });
    // player abilities
    addTranslator(0xCA, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            return PacketUtil.createPacket(0xCA, new TypeHolder[] { data.read(0), set(Type.FLOAT, (data.read(Type.BYTE, 1) / 255F)), set(Type.FLOAT, (data.read(Type.BYTE, 2) / 255F)) });
        }
    });
    // entity action
    addTranslator(0x13, PacketDirection.TO_SERVER, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            // client -> server
            return PacketUtil.createPacket(0x13, new TypeHolder[] { data.read(0), data.read(1) });
        }
    });
    // entity attach
    addTranslator(0x27, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            VehicleTracker vehicleTracker = session.getUserData().getProtocolStorage().get(VehicleTracker.class);
            int vehicleId = data.read(Type.INT, 1);
            if (vehicleId != -1) {
                vehicleTracker.setVehicleId(vehicleId);
            }
            return PacketUtil.createPacket(0x27, new TypeHolder[] { data.read(0), data.read(1), // leash
            set(Type.BOOLEAN, false) });
        }
    });
    // creative item get
    addTranslator(0x6B, ProtocolState.PLAY, PacketDirection.TO_SERVER, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            ItemStack item = data.read(Type.V1_3R_ITEM, 1);
            if (item != null && !creativeTab.exists(item.getItemId())) {
                // replace all unknown items to stone
                item.setItemId(1);
                item.setData(0);
            }
            return PacketUtil.createPacket(0x6B, new TypeHolder[] { data.read(0), set(Type.V1_3R_ITEM, item) });
        }
    });
    // steer vehicle
    addTranslator(0x1B, PacketDirection.TO_SERVER, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            VehicleTracker vehicleTracker = session.getUserData().getProtocolStorage().get(VehicleTracker.class);
            boolean dismount = data.read(Type.BOOLEAN, 3);
            if (dismount && vehicleTracker.getVehicleId() != -999) {
                int cachedId = vehicleTracker.getVehicleId();
                vehicleTracker.setVehicleId(-999);
                return PacketUtil.createPacket(0x07, new TypeHolder[] { set(Type.INT, session.getUserData().getEntityId()), set(Type.INT, cachedId), set(Type.BYTE, (byte) 0) });
            }
            // packet doesn't exist in 1.5
            return cancel();
        }
    });
}
Also used : TypeHolder(com.github.dirtpowered.dirtmv.data.protocol.TypeHolder) EntityType(com.github.dirtpowered.dirtmv.data.entity.EntityType) ServerSession(com.github.dirtpowered.dirtmv.network.server.ServerSession) PacketTranslator(com.github.dirtpowered.dirtmv.data.translator.PacketTranslator) EntityTracker(com.github.dirtpowered.dirtmv.network.versions.Release73To61.entity.EntityTracker) ServerMotd(com.github.dirtpowered.dirtmv.network.versions.Release73To61.ping.ServerMotd) ItemStack(com.github.dirtpowered.dirtmv.data.protocol.objects.ItemStack) VehicleTracker(com.github.dirtpowered.dirtmv.network.versions.Release73To61.entity.VehicleTracker) PacketData(com.github.dirtpowered.dirtmv.data.protocol.PacketData)

Example 13 with PacketTranslator

use of com.github.dirtpowered.dirtmv.data.translator.PacketTranslator in project DirtMultiversion by DirtPowered.

the class ProtocolRelease74To73 method registerTranslators.

@Override
public void registerTranslators() {
    // handshake
    addTranslator(0x02, PacketDirection.TO_SERVER, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            return PacketUtil.createPacket(0x02, new TypeHolder[] { set(Type.BYTE, (byte) 73), data.read(1), data.read(2), data.read(3) });
        }
    });
    // entity attributes/properties
    addTranslator(0x2C, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            V1_6_1EntityAttributes attrObj = data.read(Type.V1_6_1_ENTITY_ATTRIBUTES, 1);
            List<EntityAttribute> entityAttributes = new ArrayList<>();
            for (Map.Entry<String, Double> entry : attrObj.getAttributes().entrySet()) {
                entityAttributes.add(new EntityAttribute(entry.getKey(), entry.getValue()));
            }
            V1_6_2EntityAttributes attrObjModern = new V1_6_2EntityAttributes(entityAttributes);
            return PacketUtil.createPacket(0x2C, new TypeHolder[] { data.read(0), set(Type.V1_6_2_ENTITY_ATTRIBUTES, attrObjModern) });
        }
    });
    // kick disconnect
    addTranslator(0xFF, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            if (session.getUserData().getPreNettyProtocolState() != PreNettyProtocolState.STATUS)
                return data;
            String reason = data.read(Type.STRING, 0);
            ServerMotd pingMessage = ServerMotd.deserialize(reason);
            pingMessage.setVersionName("1.6.2");
            pingMessage.setProtocol(session.getUserData().getClientVersion().getRegistryId());
            return PacketUtil.createPacket(0xFF, new TypeHolder[] { set(Type.STRING, ServerMotd.serialize(pingMessage)) });
        }
    });
    // creative item get
    addTranslator(0x6B, ProtocolState.PLAY, PacketDirection.TO_SERVER, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            ItemStack item = data.read(Type.V1_3R_ITEM, 1);
            boolean notNull = item != null;
            if (notNull && !creativeTab.exists(item.getItemId())) {
                // replace all unknown items to stone
                item.setItemId(1);
                item.setData(0);
            }
            return PacketUtil.createPacket(0x6B, new TypeHolder[] { data.read(0), set(Type.V1_3R_ITEM, item) });
        }
    });
    // block place
    addTranslator(0x0F, PacketDirection.TO_SERVER, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            int x = data.read(Type.INT, 0);
            int y = data.read(Type.UNSIGNED_BYTE, 1);
            int z = data.read(Type.INT, 2);
            ItemStack item = data.read(Type.V1_3R_ITEM, 4);
            if (item == null)
                return data;
            int itemId = item.getItemId();
            int face = data.read(Type.BYTE, 3);
            if (face == 1) {
                ++y;
            } else if (face == 2) {
                --z;
            } else if (face == 3) {
                ++z;
            } else if (face == 4) {
                --x;
            } else if (face == 5) {
                ++x;
            }
            if (itemId == 323 && data.read(Type.SHORT, 5) > 0) {
                PacketData signEditor = PacketUtil.createPacket(0x85, new TypeHolder[] { // ignored
                set(Type.BYTE, (byte) 0), // x
                set(Type.INT, x), // y
                set(Type.INT, y), // z
                set(Type.INT, z) });
                session.sendPacket(signEditor, PacketDirection.TO_CLIENT, getFrom());
            }
            return data;
        }
    });
}
Also used : ServerSession(com.github.dirtpowered.dirtmv.network.server.ServerSession) EntityAttribute(com.github.dirtpowered.dirtmv.data.protocol.objects.EntityAttribute) PacketTranslator(com.github.dirtpowered.dirtmv.data.translator.PacketTranslator) ServerMotd(com.github.dirtpowered.dirtmv.network.versions.Release73To61.ping.ServerMotd) TypeHolder(com.github.dirtpowered.dirtmv.data.protocol.TypeHolder) V1_6_2EntityAttributes(com.github.dirtpowered.dirtmv.data.protocol.objects.V1_6_2EntityAttributes) ArrayList(java.util.ArrayList) List(java.util.List) V1_6_1EntityAttributes(com.github.dirtpowered.dirtmv.data.protocol.objects.V1_6_1EntityAttributes) ItemStack(com.github.dirtpowered.dirtmv.data.protocol.objects.ItemStack) PacketData(com.github.dirtpowered.dirtmv.data.protocol.PacketData)

Example 14 with PacketTranslator

use of com.github.dirtpowered.dirtmv.data.translator.PacketTranslator in project DirtMultiversion by DirtPowered.

the class ProtocolPassthroughEncrypted method registerTranslators.

@Override
public void registerTranslators() {
    // server auth data
    addTranslator(0xFD, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @SneakyThrows
        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            PacketData encryptRequest = EncryptionUtils.createEncryptionRequest(session);
            SecretKey secretKey = EncryptionUtils.getSecretKey();
            session.getUserData().setSecretKey(secretKey);
            byte[] publicKeyBytes = (byte[]) data.read(1).getObject();
            X509EncodedKeySpec spec = new X509EncodedKeySpec(publicKeyBytes);
            PublicKey publicKey;
            try {
                KeyFactory keyFactory;
                keyFactory = KeyFactory.getInstance("RSA");
                publicKey = keyFactory.generatePublic(spec);
                // fake proxy client response
                byte[] token = (byte[]) data.read(2).getObject();
                byte[] sharedKey = EncryptionUtils.getSharedKey(secretKey, publicKey);
                byte[] encryptedData = EncryptionUtils.encrypt(publicKey, token);
                PacketData response = PacketUtil.createPacket(0xFC, new TypeHolder[] { set(Type.SHORT_BYTE_ARRAY, sharedKey), set(Type.SHORT_BYTE_ARRAY, encryptedData) });
                session.sendPacket(response, PacketDirection.TO_SERVER, getFrom());
            } catch (NoSuchAlgorithmException | InvalidKeySpecException e) {
                e.printStackTrace();
            }
            return encryptRequest;
        }
    });
    // client shared key
    addTranslator(0xFC, PacketDirection.TO_SERVER, new PacketTranslator() {

        @SneakyThrows
        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            SecretKey shared = EncryptionUtils.getSecret(data, session.getUserData().getProxyRequest());
            // server -> client
            EncryptionUtils.sendEmptyEncryptionResponse(session, getFrom());
            // enable encryption
            EncryptionUtils.setEncryption(session.getChannel(), shared);
            // cancel packet
            return cancel();
        }
    });
    // client shared key
    addTranslator(0xFC, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            // enable client connection encryption
            EncryptionUtils.setEncryption(session.getClientSession().getChannel(), session.getUserData().getSecretKey());
            // cancel packet
            return cancel();
        }
    });
}
Also used : TypeHolder(com.github.dirtpowered.dirtmv.data.protocol.TypeHolder) ServerSession(com.github.dirtpowered.dirtmv.network.server.ServerSession) SecretKey(javax.crypto.SecretKey) PacketTranslator(com.github.dirtpowered.dirtmv.data.translator.PacketTranslator) PublicKey(java.security.PublicKey) SneakyThrows(lombok.SneakyThrows) X509EncodedKeySpec(java.security.spec.X509EncodedKeySpec) KeyFactory(java.security.KeyFactory) PacketData(com.github.dirtpowered.dirtmv.data.protocol.PacketData)

Example 15 with PacketTranslator

use of com.github.dirtpowered.dirtmv.data.translator.PacketTranslator in project DirtMultiversion by DirtPowered.

the class ProtocolStateHandler method registerTranslators.

@Override
public void registerTranslators() {
    addTranslator(0x00, ProtocolState.HANDSHAKE, PacketDirection.TO_SERVER, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            UserData userData = session.getUserData();
            userData.setAddress(data.read(Type.V1_7_STRING, 1));
            userData.setPort(data.read(Type.UNSIGNED_SHORT, 2));
            userData.setProtocolState(ProtocolState.fromId(data.read(Type.VAR_INT, 3)));
            return PacketUtil.createPacket(0x00, new TypeHolder[] { // protocol version
            set(Type.VAR_INT, getTo().getProtocolNettyId()), data.read(1), data.read(2), data.read(3) });
        }
    });
    addTranslator(0x02, ProtocolState.LOGIN, PacketDirection.TO_CLIENT, new PacketTranslator() {

        @Override
        public PacketData translate(ServerSession session, PacketData data) {
            session.getUserData().setProtocolState(ProtocolState.PLAY);
            return data;
        }
    });
}
Also used : TypeHolder(com.github.dirtpowered.dirtmv.data.protocol.TypeHolder) ServerSession(com.github.dirtpowered.dirtmv.network.server.ServerSession) PacketTranslator(com.github.dirtpowered.dirtmv.data.translator.PacketTranslator) UserData(com.github.dirtpowered.dirtmv.data.user.UserData) PacketData(com.github.dirtpowered.dirtmv.data.protocol.PacketData)

Aggregations

PacketData (com.github.dirtpowered.dirtmv.data.protocol.PacketData)26 PacketTranslator (com.github.dirtpowered.dirtmv.data.translator.PacketTranslator)26 ServerSession (com.github.dirtpowered.dirtmv.network.server.ServerSession)25 TypeHolder (com.github.dirtpowered.dirtmv.data.protocol.TypeHolder)23 ItemStack (com.github.dirtpowered.dirtmv.data.protocol.objects.ItemStack)14 ProtocolStorage (com.github.dirtpowered.dirtmv.data.user.ProtocolStorage)8 List (java.util.List)8 MinecraftVersion (com.github.dirtpowered.dirtmv.data.MinecraftVersion)5 Motion (com.github.dirtpowered.dirtmv.data.protocol.objects.Motion)5 IOException (java.io.IOException)5 SneakyThrows (lombok.SneakyThrows)5 EntityType (com.github.dirtpowered.dirtmv.data.entity.EntityType)4 V1_2MultiBlockArray (com.github.dirtpowered.dirtmv.data.protocol.objects.V1_2MultiBlockArray)4 WatchableObject (com.github.dirtpowered.dirtmv.data.protocol.objects.WatchableObject)4 BlockStorage (com.github.dirtpowered.dirtmv.network.versions.Beta17To14.storage.BlockStorage)4 ArrayList (java.util.ArrayList)4 DirtMultiVersion (com.github.dirtpowered.dirtmv.DirtMultiVersion)3 BlockLocation (com.github.dirtpowered.dirtmv.data.protocol.objects.BlockLocation)3 Location (com.github.dirtpowered.dirtmv.data.protocol.objects.Location)3 V1_2Chunk (com.github.dirtpowered.dirtmv.data.protocol.objects.V1_2Chunk)3