I have a single-texture metablock and a multi-texture simple block. How to create a multi-texture metablock?
Each sub-block from this metablock has its texture for the top and bottom faces and other for the sides. If these were just single-texture sub-blocks, I'd have no problem, as I already made some, but the problem is that these sub-blocks are multi texture.
A multi-texture block uses an array that stores each face texture, and getIcon returns the faces, while on the other hand a metablock uses an array storing the sub-blocks, and returns their [single] texture. The biggest problem is the last step, getIcon method, which returns the sub-block single texture OR the simple block faces textures. I tried to make so that both arrays are returned, but I don't have any clue of how to return these two values, considering that return can't return more than one value.
I searched for this but didn't found anything recent or comprehensible. I tried to do it by myself, but it can't be done with the conventional way (like with metablock and multi-texture block created separately), because the values in the array would overlap each other, or the array with the metablocks would have no relation with the one with the textures, etc.
I then looked in BlockLog class and found some different methods there, like getTopIcon and getSideIcon. I searched for these methods and found this thread. But when I added the getTopIcon and getSideIcon to my block class, I get an error saying that "The method getTopIcon(int) of type ExampleMultiTexMetaBlock must override or implement a supertype method". If I remove @Override, the error is gone, but it isn't called.
I searched for the getTopIcon and getSideIcon methods in Minecraft code and only BlockLog and BlockRotatedPillar use these methods. Should I extend one of them?
I tried everything I know I could, but the only results I get are:
1) NullPointerException;
2) Only one sub-block and with single texture;
3) All sub-blocks but with single texture;
4) Only one sub-block and with the textures of the others sub-blocks;