Hi, I am new here. I downloaded the mdk and tried basic things as log something when an event is triggered or a sound played.
I spent my afternoon and evening trying to find a way to make my player do something (walking, use its item, ...) but I did not found how to do it.
I know it was possible in 1.14.4, because I used the autoFish mod, I used as example.
But I did not found the way to access the PlayerController.
I found that I need to import it:
import net.minecraft.client.Minecraft;
In this class I found:
public static Minecraft getInstance() {
return instance;
}
And I expected to use this instance to get the PlayerController
So in the mdk I tried this:
@Mod("examplemod")
public class ExampleMod
{
private Minecraft minecraftClient;
public ExampleMod() {
this.minecraftClient = Minecraft.getInstance();
}
}
I am able to generate the .jar but when I launch Minecraft I get:
java.lang.NoSuchMethodError: net.minecraft.client.Minecraft.getInstance()Lnet/minecraft/client/Minecraft;
Does someone know how to do?
Thank you ?