Jump to content

Question - Item mapping for mods


Recommended Posts

How exactly does it work? For instance i have a mod i use on my server and i have a set of golden armor, there was also an item called "speedy nail gun", i changed the name of the "speedy nail gun" to "golden nail gun", next thing i know a player who was wearing "golden boots" now has "golden nail gun" on his feet.

 

Has anyone else have this happen and if so how should i handle item edits to avoid this issue in the future?

Link to comment
Share on other sites

I would guess that the item ID's are assigned by number when the game loads up, I'm not sure how it or in what order it does this. The ID is saved in an Array for containers, inv, ect. If the ID is changed because of a change in the order it gives the ID's out, the array will then be off and you'll get what ever item is attached to the old ID. I may be wrong on this, but I'm sure I'm fairly close.

Link to comment
Share on other sites

It does appear to assign the ID's on server startup

 

 

2019-01-13T12:34:06 8.963 INF StartAsServer

2019-01-13T12:34:17 20.119 INF Block IDs with mapping

2019-01-13T12:34:17 20.119 INF BlockIDs from Mapping

2019-01-13T12:34:18 21.182 INF Item IDs with mapping

2019-01-13T12:34:18 21.182 INF ItemIDs from Mapping

 

I will do some more testing and try and figure out the order, if it is alphabetical, or if it loads vanilla items then mods or just bunches them all together.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...