amadornes / MCMultiPart

A universal multipart API for Modern Minecraft
Other
67 stars 23 forks source link

Forge complaining about "Dangerous alternative prefix" for every registered material #88

Closed bdew closed 6 years ago

bdew commented 7 years ago

Since MicroMaterialBlock registers with the modid that owns the block, which isn't the mod that does the registration, forge emits hundreds of those warnings....

[14:30:44] [main/WARN] [FML]: ****************************************
[14:30:44] [main/WARN] [FML]: * Dangerous alternative prefix `minecraft` for name `stained_glass.9`, expected `covers` invalid registry invocation/invalid name?
[14:30:44] [main/WARN] [FML]: *  at net.minecraftforge.registries.IForgeRegistryEntry$Impl.setRegistryName(IForgeRegistryEntry.java:85)
[14:30:44] [main/WARN] [FML]: *  at net.minecraftforge.registries.IForgeRegistryEntry$Impl.setRegistryName(IForgeRegistryEntry.java:94)
[14:30:44] [main/WARN] [FML]: *  at mcmultipart.api.microblock.MicroMaterialBlock.<init>(MicroMaterialBlock.java:49)
[14:30:44] [main/WARN] [FML]: *  at mcmultipart.api.microblock.MicroMaterialBlock.<init>(MicroMaterialBlock.java:36)
[14:30:44] [main/WARN] [FML]: *  at mcmultipart.api.microblock.MicroMaterialBlock.<init>(MicroMaterialBlock.java:31)
[14:30:44] [main/WARN] [FML]: *  at net.bdew.covers.microblock.InternalRegistry$.registerMaterial(InternalRegistry.scala:44)...
[14:30:44] [main/WARN] [FML]: ****************************************

I wonder if lex would be willing to add an option to silence the warning for non-vanilla registries...

amadornes commented 7 years ago

The easiest option (and it really shouldn't be a problem) would be to switch over to the Minecraft mod container when registering those, then switch back to yours. I've had to do it in the past. Also, I guess I should consider managing the registry in MCMP itself, so you can add microblocks via a config file. That way there are no overlaps if multiple mods try to register the same blocks, and those that want to register their own stuff via registry events, still can. That's not a huge priority right now, though.

2xsaiko commented 6 years ago

Closing since amadornes has given a solution to the problem and this has been inactive for a while.