Jump to content

MetalHurlant

Members
  • Posts

    3
  • Joined

  • Last visited

MetalHurlant's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Ok thanks. I am now able to do something ? I juste needed to use .\gradlew build and not graddle jar to generate my .jar (in Powershell) Have a good day all
  2. @unassigned Thanks, it helped me understand that there is a difference between physical and logical server/client. But I can not figure how this should work. I tried: ExampleMod.java @Mod("examplemod") public class ExampleMod { public ExampleMod() { DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> ExampleModClient.register()); } } ExampleModeClient.java public class ExampleModClient { private static final Logger LOGGER = LogManager.getLogger(); public static void register() { LOGGER.info("ExampleMod: register"); Minecraft minecraftClient = Minecraft.getInstance(); } } But I get the same thing that before. I think that the thing I need is the minimal code to get the minecraft client object. Thanks you
  3. 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 ?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.