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.

example mod crashes with Null Pointer when joining a world GradleStart.main(GradleStart.java:26) [start/:?] [1.16.5]

Featured Replies

Posted

No matter what version of forge I try, the example mod always crashes when I join the world.

1.16.5 log: https://pastebin.com/rVQGWGzf

Log 2 (diff version): https://pastebin.com/D7Lsg1Tp

 

I tired: cleaning gradle chache, deleting the contents of .gradle in users, using different mdk versions, using different java binaries

I would appreciate it if anyone could help me out here.

Edited by Dawjaw

  • Author
26 minutes ago, diesieben07 said:

That shows you connecting to Hypixel, hypixel sending a bunch of invalid scoreboard packets which cause errors and then the game shutting down.

Ok i wasnt sure if that was related since its the first time that i've seen happen.

I have a PlayerInteractEvent and a BreakEvent that for some reason only works on singleplayer worlds and not in multiplayer ones.

    @SubscribeEvent
    public void onPlayerEvent(PlayerInteractEvent event) {
        Minecraft mc =  Minecraft.getInstance();
        ITextComponent m = new TranslationTextComponent("test");
        mc.player.sendMessage(m, mc.player.getUUID());
    }

    @SubscribeEvent
    public void onBreakEvent(BlockEvent.BreakEvent event) {
        Minecraft mc =  Minecraft.getInstance();
        mc.player.sendMessage(new TranslationTextComponent(event.getState().toString()), mc.player.getUUID());
    }

(the Listener is also registered)

    public ExampleMod() {
        // Register the setup method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
        // Register the enqueueIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC);
        // Register the processIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC);
        // Register the doClientStuff method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);

        // Register ourselves for server and other game events we are interested in
        MinecraftForge.EVENT_BUS.register(this);
        MinecraftForge.EVENT_BUS.register(new BlockListener());
    }

I have no clue why that would not work, considering that there are a ton of mods for hypixel that do the same

Edited by Dawjaw

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.