BuildCraft|Core

BuildCraft|Core

7M Downloads

ItemFacade.getStack relies on the block ID

Cisien opened this issue ยท 6 comments

commented

IDs are bad now. this method (and i'm sure many other facade methods) need to be switched to using the block name. ...just as soon as I figure out how.

commented

Instead of the name use the block and the blockmetadata. The block does not only represent a ID.
And names are not working because they can change.

commented

by block name, i mean the value returned by Block.blockRegistry.getNameForObject(block). This is the identifier of the block set by the mod author, it saves us from relying on ids (though, they should also never change after world init, however, that bit still seems to be changing in FML)

commented

Cool. So, both registry name, and id in the registry are safe to use?

commented

No? The registry name is fixed and cannot change, EVER.

commented

Don't store the ID. The name is stable. The ID changes whenever there is a world change..

commented