Alanor Miga Posted January 11, 2022 Share Posted January 11, 2022 (edited) 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 January 11, 2022 by Alanor Miga Quote Link to comment Share on other sites More sharing options...
Alanor Miga Posted January 11, 2022 Author Share Posted January 11, 2022 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")) ); } } Quote Link to comment Share on other sites More sharing options...
Alanor Miga Posted January 11, 2022 Author Share Posted January 11, 2022 Just now, diesieben07 said: Yes, but you used the wrong event bus. Tried with Bus.Mod and didnt work either Quote Link to comment Share on other sites More sharing options...
Alanor Miga Posted January 11, 2022 Author Share Posted January 11, 2022 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")) ); } } Quote Link to comment Share on other sites More sharing options...
Alanor Miga Posted January 11, 2022 Author Share Posted January 11, 2022 26 minutes ago, diesieben07 said: Still using the Forge event bus. And you have not answered my question. Event handler is not called Quote Link to comment Share on other sites More sharing options...
Alanor Miga Posted January 11, 2022 Author Share Posted January 11, 2022 6 minutes ago, diesieben07 said: Have you fixed the event bus? @Mod.EventBusSubscriber(modid = MoGuns.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) yep Quote Link to comment Share on other sites More sharing options...
Alanor Miga Posted January 11, 2022 Author Share Posted January 11, 2022 18 minutes ago, diesieben07 said: Post a Git repo of your mod. There it is! https://github.com/AlanorMiga/Mo-Guns-1.16.5 Quote Link to comment Share on other sites More sharing options...
Alanor Miga Posted January 11, 2022 Author Share Posted January 11, 2022 5 minutes ago, diesieben07 said: 404 - the repo is probably set to private. Sorry! Fixed Quote Link to comment Share on other sites More sharing options...
Alanor Miga Posted January 11, 2022 Author Share Posted January 11, 2022 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 Quote Link to comment Share on other sites More sharing options...
Alanor Miga Posted January 11, 2022 Author Share Posted January 11, 2022 AYYYYYYYYYE IT WORKS, IT WAS THE WRONG BUS ALL ALONG! THANK YOU SO MUCH!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.