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.

Featured Replies

Posted

I'm currently modifying the Simple Dungeon loot table to allow an AKM Body from my mod to appear on the chests too, but I keep getting this error:

[main/ERROR] [net.minecraftforge.common.loot.LootModifierManager/]: Couldn't parse loot modifier moguns:akm_body_dungeon
java.lang.NullPointerException: null

These are my files (java and json)
https://paste.gg/p/anonymous/4a74e4fe437f48509fa8c5d2193301b4

And here my latest.log

https://paste.gg/p/anonymous/82401acb7fd045e781ea8538bae02323

 

Edited by Alanor Miga

  • Alanor Miga changed the title to Couldn't parse loot modifier (1.16.5)
  • Author
4 minutes ago, diesieben07 said:

You have not registered your loot modifier serializer.

Thanks for the quick reply!

Isnt this the registering process?
 

@Mod.EventBusSubscriber(modid = MoGuns.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE)
public class LootEventBusEvents {

    @SubscribeEvent
    public static void registerModifierSerializers(@Nonnull final RegistryEvent.Register<GlobalLootModifierSerializer<?>>
                                                           event) {
        event.getRegistry().registerAll(
                new AKMBodyStructureAdditionModifier.Serializer().setRegistryName
                        (new ResourceLocation(MoGuns.MOD_ID,"akm_body_dungeon"))
        );

    }
}

 

  • Author
17 minutes ago, diesieben07 said:

Show updated code. Is the event handler called?

I mean this is the whole event bus
 

package moguns.events;

import moguns.MoGuns;
import moguns.events.loot.AKMBodyStructureAdditionModifier;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.loot.GlobalLootModifierSerializer;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

import javax.annotation.Nonnull;

@Mod.EventBusSubscriber(modid = MoGuns.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE)
public class LootEventBusEvents {

    @SubscribeEvent
    public static void registerModifierSerializers(@Nonnull final RegistryEvent.Register<GlobalLootModifierSerializer<?>>
                                                           event) {
        event.getRegistry().registerAll(
                new AKMBodyStructureAdditionModifier.Serializer().setRegistryName
                        (new ResourceLocation(MoGuns.MOD_ID,"akm_body_dungeon"))
        );

    }
}

 

  • Author
26 minutes ago, diesieben07 said:

Still using the Forge event bus.

And you have not answered my question.

Event handler is not called

  • Author
6 minutes ago, diesieben07 said:

Have you fixed the event bus?

@Mod.EventBusSubscriber(modid = MoGuns.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)

yep :D

  • Author
13 minutes ago, diesieben07 said:

Cloned your repo, the game crashes with a Mixin error from CGM.

It straight up does not run in runClient, it has to be the normal launcher

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.