I'm working with metadata and I'm trying to find where I would go to raise the max metadata from 16. I've tried changing multiple files without success. Currently, I'm working with the NibbleArray file. I'm thinking it has to do with the extended block storage bit...
Would someone be able to guide me to a guide on this? I've searched google and this forum and I was unable to find anything relating to this subject.
I don't think this is possible, I had the same issue (150 blocks under 1 id to just find out they don't load after 16 because I thought max was 254, derp moment for me). I believe 16 is the max unless there is a special way to load it. I ended up dividing the blocks up by 16 metas per 1 id.
Rollback Post to RevisionRollBack
V---------------------------------Right Here-------------------------------- Hit that up arrow if I helped you or if you just like me
This has been discussed many times, and after some thorough checking if what I have read is true, this is possible using a tile entity. Please do not ask me how as I barely understood half of what I had read. However in theory this is very possible....
This is a very special topic, almost worth writing an article about. Raising the overall metadata of blocks would be a pretty grand task. The metadata is limited in the first place to save some file size, and should be used for nothing other than metadata, obviously. If you wanted to increase the maximum metadata, you would need to alter quite a lot of world loading and saving code, as well as some other logic involved in fetching and setting metadata. My recommendation: Don't.
If you wish to have more than 15 different meta states for a single block, there are other alternatives. You can multiply the amount of meta states by the amount of identical blocks, just with different block IDs. There are still cases where this would be messay not be preferable, actually inefficient. Sometimes you need an actual structure to it. This is where tile entities come in. Chests use tile entities to store items. Tile entities are also saved with the world, but they are treated differently from blocks. Blocks are placed in a huge array, but tile entities are indexed in a completely different way, in a list, instead of being indexed with their positions. This makes fetching the tile entity beloging to a certain block a bit harder. I believe minecraft uses integer hashmaps for this, so it's still efficient. However, it's still not as efficient as other solutions.
Therefore, you should consider how widely used this block will be. If it's a block that will appear very often, it will be inefficient to use a tile entity solution. For example, for my gas mod, I landed on using metadata, even though it could behave so much better with additional data. I chose to use metadata because this block appears often too often to have its own tile entity.
If you want to use tile entities, there's already plenty of tutorials and vanilla code that will lead you on the right path.