@Override
    public void a(PacketDataSerializer packetDataSerializer) throws IOException {
        action = Action.values()[packetDataSerializer.a()];
        if(action.ordinal() == Action.SET_SIZE.ordinal())
        {
            newRadius = packetDataSerializer.readDouble();
        }
        if(action.ordinal() == Action.LERP_SIZE.ordinal())
        {
            oldRadius = packetDataSerializer.readDouble();
            newRadius = packetDataSerializer.readDouble();
            speed = Var.readVarLong(packetDataSerializer);
        }
        if(action.ordinal() == Action.SET_CENTER.ordinal()) {
            x = packetDataSerializer.readDouble();
            z = packetDataSerializer.readDouble();
        }
        if(action.ordinal() == Action.INITIALIZE.ordinal())
        {
            x = packetDataSerializer.readDouble();
            z = packetDataSerializer.readDouble();
            oldRadius = packetDataSerializer.readDouble();
            newRadius = packetDataSerializer.readDouble();
            speed = Var.readVarLong(packetDataSerializer);
            portalTeleportBoundary = packetDataSerializer.a();
            warningTime = packetDataSerializer.a();
            warningBlocks = packetDataSerializer.a();
        }

        if(action.ordinal() == Action.SET_WARNING_TIME.ordinal())
        {
            warningTime = packetDataSerializer.a();
        }
        if(action.ordinal() == Action.SET_WARNING_BLOCKS.ordinal())
        {
            warningBlocks = packetDataSerializer.a();
        }

    }