Forge ID Map questions

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Xavion

New Member
Jul 29, 2019
1,025
-3
0
So I've been poking around in an attempt to change the mods I'm playing with and I encountered the issue that it seems Forge reserves ids that were taken by mods even after they're removed in case you put them back in. As far as I can tell the id map is stored in the level.dat and I've got some scripts to the point where they can open and manipulate that file, the issue is I have no idea what to modify.

So more specifically as a question where do I go to figure out how Forge reserves ids so they won't be used by added mods and any idea how I'd modify it to to stop them being reserved? I'm just having trouble finding info on how it's structured and what would be required, like I've got no idea how why items are always prepended by either a byte of 1 or 2 and I feel that's probably important.
 

FyberOptic

New Member
Jul 29, 2019
524
0
0
A prefix byte of 1 means it's an block, a 2 means it's an item.

If you want to explore the code and attempt to make sense of it, check net.minecraftforge.fml.common.FMLContainer's readData method. I guess that would be cpw.mods.fml.common.FMLContainer on pre-1.8.