-1

I am trying to mod Minecraft using Fabric, but when I use declare fly, it gives me an error.

Here is my code:

Main class

public void onInitialize() {
    BoatFly.tick(MinecraftClient.getInstance()); //Error line
}

and my Fly class

public void tick(MinecraftClient client) //Error line
{
    if(client.player!=null && client.player.hasVehicle())
    {
        LOGGER.info("Client has gotten into boat");
        Entity v = client.player.getVehicle();
        Vec3d vel = v.getVelocity();
        double my = client.options.jumpKey.isPressed() ? 0.5 : 0;
        v.setVelocity(new Vec3d(vel.x, my, vel.z));
    }
}

Note this isnt the full code, just the areas giving me errors

Vadim Kotov
  • 7,766
  • 8
  • 46
  • 61
Pogman69
  • 1
  • 1

0 Answers0