Jump to content

Koas

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Koas

  1. Oh, a multidimensional array, of course! How didn't I thought in that! I did tried to return an array with these two values, but not this way, and I got errors, and even tried using a map, but no success. I followed the way you suggested, and there's a type mismatch in icons = new IIcon[num_sub_blocks]; line. Adding a second [num_sub_blocks] fixed that. Now I tested it, and it finally worked! \o/ That was just what I needed! Many thanks! =D
  2. Ok, here's the textures part: SUBNAMES is a String[] with the sub-blocks' names. That's the same code of a single-texture metablock, and the result is all sub-blocks working with no problem but with only one texture on all faces.
  3. 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;
  4. Well, I already fixed it, and it's generating normally now, as can be seen here. But thanks anyway. =)
  5. Hi, I'm having some problems with the ore generation: the block isn't generated. I did everything I know needed for it to work, but it isn't generated at all, even if I fly far away, or teleport, or set high numbers, like vein size and chance to spawn, none of my blocks are generated. I don't know what I missed or did wrong. There are no errors. I compared my code with the ones people with working ore generation posted, but it's basically exactly the same, and still no ore generation, either in Eclipse or if I compile it and run it from mods folder in normal Minecraft. I also putted printlns all over the code to check if it's being run, but yes, it is, but no blocks are generated, even if I change to vanilla blocks. Does the block have to be of a specific type to be generated? Or something needs to be added in the block class, or something? Here's the the main class: http://pastebin.com/eKAdzfja and the world generation class: http://pastebin.com/TkRMMe5f
×
×
  • Create New...

Important Information

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