Jump to content

Getting technical with IDs


Recommended Posts

Hi folks,


I've been browsing around the forums for a couple of days now trying to get a sense of the problems that the forge team faces when trying to resolve the 600lb gorilla that is id conflicts.  I've also spent quite a lot of time fiddling around with the minecraft source code to resolve some of the more annoying problems that I have when playing around with mods, and I think I'm at a point where I might be able to contribute something useful to the forge project.


So, it is my understanding that the following problems have made id conflicts inevitable up to this point:

1. Many modders simply won't use the GameRegistry to get item ids from forge rather than just defining them themselves.

2. Mods based on ModLoader require the modder to define and use ids anyway

3. Dropping support for mods that don't use the GameRegistry is not an option, as you (perfectly reasonably) don't want to turn people off from using forge


I also have read a number of posts that indicate item ids will not be required at some point in forge's future.  Is this because:

1. You have figured out a way to avoid the problems 1-3 mentioned above?

2. Minecraft's codebase for 1.7.2 has changed so that it makes more extensive use of names and maps between names and ids internally at a level much closer to the chunk representation than before?

3. Something else


If the answer is 1, then you have probably already solved the problem I have tried to solve.  If the answer is 2 then do you have a plan to still provide "pseudo ids" so that mods using forge don't have to be completely rewritten?


I ask because I think I have a solution to the id conflict issue that would still allow modders who insist on using ids directly to do so whilst not having a problem with id conflicts, but there is no point in taking it beyond the conceptual stage unless there is some use for it.




Link to comment
Share on other sites

Ok, that's all rather handy, but it still leaves some interesting questions open:


1. Do you have any plans to provide some back-compatibility for mods that haven't yet been updated to 1.7?  I don't know if you have figures on the number of forge-using mods out there that use ids rather than going through the GameRegistry.  If there are a large number of id-based mods (and there do seem to be!),  then the ids that they declare locally and that are traditional vanilla ids could be used as "pseudo ids" that map to the block names internally, provided the right adapters between the minecraft/forge block/item management API and the legacy API that deals directly with ids.  It would get mods up and running sooner but would be additional work and wouldn't encourage people to update their mods so swiftly, as a downside.


2. Given exclusive use of block/items names rather than ids, does vanilla 1.7 / forge for 1.7 provide a solution to block ids shifting between saves/loads of chunks in the scenario that a user adds/updates/removes mods between sessions of play?  I still envisage that mod load order, changes to mods and so forth could result in ids being changed, leaving to the age-old problem of broken worlds.  Are you aware of whether this might still be an issue?  I have a design for a solution to this problem.


Cheers again,




Link to comment
Share on other sites

1) Then it's up to the modder to ensure he does the changes before and while updating to 1.7. We don't believe in handholding modders and users here at Forge.


2) It's your responsibility to know that your world will break if you choose to remove a mod.

Read the EAQ before posting! OR ELSE!


This isn't building better software, its trying to grab a place in the commit list of a highly visible github project.




Don't PM me, I don't check this account unless I have to.

Link to comment
Share on other sites

Thanks for the response!


This isn't a "please will you implement the following" post, just to be clear.  If it were, I would have posted it in suggestions.  I'm trying to get a sense of what you guys have in the pipeline for forge in the light of the 1.7 changes, so that I can know if there is any mileage in my implementing either mechanism, or whether it is a non-starter/ unnecessary.


I do think that it would be very much in Forge's favor if it allows a whole bunch of mods to continue working.  We know that a lot of mod code is very poor quality (hard-coded ids being a pretty common occurrence) and that many will just die rather than be converted across.  A solution that gets around that problem would buy a lot of brownie points with the modding community.  I can also see why you want to be rid of ids once and for all of course.


As to the removing a mod issue, it isn't so much about whether blocks from removed mods turn to sand, it is about whether a removed mod will result in other blocks having different ids from the ids they had before.  I'm proposing a solution that is robust to modified block ids.


I'm open to having a detailed discussion about either, and certainly open to doing the work to implement them.  I realize that, as it stands, I'm just another person talking about modding minecraft, but if someone from the team wants to have a further discussion about either idea, I'm happy to try and prove the ideas to you.


Link to comment
Share on other sites

Basically, 1.7 destroys everything. Especially when it comes to IDs. Not supporting the old method is not a choice made to hurt older mods. It's simply that Minecraft has changed, and people need to adapt.

But anyways, speculation is not really important until 1.7 is in production.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.