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