//  [java]
    public void translate(GeyserSession session, InteractPacket packet) {
        Entity entity;
        if (packet.getRuntimeEntityId() == session.getPlayerEntity().getGeyserId()) {
            //Player is not in entity cache
            entity = session.getPlayerEntity();
        } else {
            entity = session.getEntityCache().getEntityByGeyserId(packet.getRuntimeEntityId());
        }
        if (entity == null)
            return;

        switch (packet.getAction()) {
            case INTERACT:
                if (session.getPlayerInventory().getItemInHand().getJavaId() == session.getItemMappings().getStoredItems().shield().getJavaId()) {
                    break;
                }
                ClientPlayerInteractEntityPacket interactPacket = new ClientPlayerInteractEntityPacket((int) entity.getEntityId(),
                        InteractAction.INTERACT, Hand.MAIN_HAND, session.isSneaking());
                session.sendDownstreamPacket(interactPacket);
                break;
            case DAMAGE:
                ClientPlayerInteractEntityPacket attackPacket = new ClientPlayerInteractEntityPacket((int) entity.getEntityId(),
                        InteractAction.ATTACK, Hand.MAIN_HAND, session.isSneaking());
                session.sendDownstreamPacket(attackPacket);
                break;
            case LEAVE_VEHICLE:
                ClientPlayerStatePacket sneakPacket = new ClientPlayerStatePacket((int) entity.getEntityId(), PlayerState.START_SNEAKING);
                session.sendDownstreamPacket(sneakPacket);
                session.setRidingVehicleEntity(null);
                break;
            case MOUSEOVER:
                // Handle the buttons for mobile - "Mount", etc; and the suggestions for console - "ZL: Mount", etc
                if (packet.getRuntimeEntityId() != 0) {
                    Entity interactEntity = session.getEntityCache().getEntityByGeyserId(packet.getRuntimeEntityId());
                    session.setMouseoverEntity(interactEntity);
                    if (interactEntity == null) {
                        return;
                    }

                    InteractiveTagManager.updateTag(session, interactEntity);
                } else {
                    if (session.getMouseoverEntity() != null) {
                        // No interactive tag should be sent
                        session.setMouseoverEntity(null);
                        session.getPlayerEntity().getMetadata().put(EntityData.INTERACTIVE_TAG, "");
                        session.getPlayerEntity().updateBedrockMetadata(session);
                    }
                }
                break;
            case OPEN_INVENTORY:
                if (session.getOpenInventory() == null) {
                    Entity ridingEntity = session.getRidingVehicleEntity();
                    if (ridingEntity instanceof AbstractHorseEntity) {
                        if (ridingEntity.getMetadata().getFlags().getFlag(EntityFlag.TAMED)) {
                            // We should request to open the horse inventory instead
                            ClientPlayerStatePacket openHorseWindowPacket = new ClientPlayerStatePacket((int) session.getPlayerEntity().getEntityId(), PlayerState.OPEN_HORSE_INVENTORY);
                            session.sendDownstreamPacket(openHorseWindowPacket);
                        }
                    } else {
                        session.setOpenInventory(session.getPlayerInventory());

                        ContainerOpenPacket containerOpenPacket = new ContainerOpenPacket();
                        containerOpenPacket.setId((byte) 0);
                        containerOpenPacket.setType(ContainerType.INVENTORY);
                        containerOpenPacket.setUniqueEntityId(-1);
                        containerOpenPacket.setBlockPosition(entity.getPosition().toInt());
                        session.sendUpstreamPacket(containerOpenPacket);
                    }
                }
                break;
        }
    }