Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MetalHurlant

Members
  • Joined

  • Last visited

  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 ?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.