bhavikchugani 0 Report post Posted May 23, 2017 (edited) I have created an ore block which i want to make it spawn randomly below a certain level in the ground. Can someone help me solve this. Using 1.11.2 Forge.. One More issue. I am having trouble with the ore material as it aint working. I have zipped the files and attached below can someone check to see what the error is I tried for an hour to find it main.zip Edited May 23, 2017 by bhavikchugani Addon file plus Share this post Link to post Share on other sites
Ugdhar 72 Report post Posted May 23, 2017 Best thing to do is upload your code to a github repository, it's much easier for people to see when you do so. It's free, and quite helpful. http://www.github.com For ore generation, I just went to google and typed in "minecraft forge 1.11.2 ore generation". You basically need to implement an IWorldGenerator. http://www.minecraftforge.net/forum/topic/53563-111-world-generation/ looks like it has some info you could use. 2 Share this post Link to post Share on other sites
V0idWa1k3r 308 Report post Posted May 23, 2017 Define 'material not working'. Is the mining tool incorrect? The map color? Piston movement? There are a few things that materials control. In addition to @Ugdhar's answer - do not forget to register your IWorldGenerator implementation with GameRegistry::registerWorldGenerator Share this post Link to post Share on other sites
bhavikchugani 0 Report post Posted May 23, 2017 17 minutes ago, V0idWa1k3r said: Define 'material not working'. Is the mining tool incorrect? The map color? Piston movement? There are a few things that materials control. In addition to @Ugdhar's answer - do not forget to register your IWorldGenerator implementation with GameRegistry::registerWorldGenerator What is happening is that the material is not loading when i place it and it is just the default purple-black checkered texture. i copied the same code as another block i created and just changed the names. the material only shows up on the toolbar and not when i place And @Ugdhar how exactly should i post it the main folder or just its contents?? Share this post Link to post Share on other sites
V0idWa1k3r 308 Report post Posted May 23, 2017 (edited) That is not a material but a model issue. Make sure that your model is correct - you can follow this guide Okay, looking at your sourcecode: Please, never use ItemModelMesher. It leads to numerous bugs and issues. There is a ModelLoader class for registering your models. You should move everything rendering registry related into your client proxy. Models for blocks/items must be registered during pre-init, not init. Your blocks/items should be statically initialized. There is no need to call the init method. Simply write public static final Block rubyblock = new BlockRuby(); I believe that your blockstates file is not correct. I have provided a link to a tutorial on how to make those. Your model JSON file is invalid. It is missing an opening bracket Edited May 23, 2017 by V0idWa1k3r Clarified N6 1 Share this post Link to post Share on other sites
bhavikchugani 0 Report post Posted May 23, 2017 8 minutes ago, V0idWa1k3r said: That is not a material but a model issue. Make sure that your model is correct - you can follow this guide Okay, looking at your sourcecode: Please, never use ItemModelMesher. It leads to numerous bugs and issues. There is a ModelLoader class for registering your models. You should move everything rendering registry related into your client proxy. Models for blocks/items must be registered during pre-init, not init. Your blocks/items should be statically initialized. There is no need to call the init method. Simply write public static Block rubyblock = new BlockRuby(); I believe that your blockstates variant is not correct. I have provided a link to a tutorial on how to make those. Your model JSON file is invalid. It is missing an opening bracket I used the same json for my 1st block and it worked and do i move the whole code public static void registerRenders(){ registerRender(rubyblock); registerRender(rubyore); } to client Proxy??? Share this post Link to post Share on other sites
bhavikchugani 0 Report post Posted May 23, 2017 10 minutes ago, V0idWa1k3r said: That is not a material but a model issue. Make sure that your model is correct - you can follow this guide Okay, looking at your sourcecode: Please, never use ItemModelMesher. It leads to numerous bugs and issues. There is a ModelLoader class for registering your models. You should move everything rendering registry related into your client proxy. Models for blocks/items must be registered during pre-init, not init. Your blocks/items should be statically initialized. There is no need to call the init method. Simply write public static Block rubyblock = new BlockRuby(); I believe that your blockstates variant is not correct. I have provided a link to a tutorial on how to make those. Your model JSON file is invalid. It is missing an opening bracket And also what is the replacement code for ItemMesher? Share this post Link to post Share on other sites
Ugdhar 72 Report post Posted May 23, 2017 http://www.minecraftforge.net/forum/topic/49497-1112-is-using-registryevent-this-way-ok/#comment-249433 Don't directly copy and paste this code, obviously, but it shows how to register your stuff in, as far as I can tell, the correct way. Share this post Link to post Share on other sites
V0idWa1k3r 308 Report post Posted May 23, 2017 Just move model registering to a client proxy. A replacement for ItemModelMesher is ModelLoader. The model file for the ruby block is indeed correct. It is not correct for the ore block. Share this post Link to post Share on other sites
bhavikchugani 0 Report post Posted May 23, 2017 Just now, V0idWa1k3r said: Just move model registering to a client proxy. A replacement for ItemModelMesher is ModelLoader. The model file for the ruby block is indeed correct. It is not correct for the ore block. just changed it running it right now! Worked! Its so irritating that how one letter or symbol makes a huge impact thnx @V0idWa1k3r Share this post Link to post Share on other sites
bhavikchugani 0 Report post Posted May 23, 2017 (edited) @Ugdhar i dont understand the worldGen thing. Can u help? Edited May 23, 2017 by bhavikchugani Mistake Share this post Link to post Share on other sites
V0idWa1k3r 308 Report post Posted May 23, 2017 (edited) Create a class that implemets IWorldGenerator. the generate method is the one that will get called each time a new chunk is generated. The parameter names in that method have pretty self-explanatory names so you should understand what each of them means. When you are done wrighting generation code in the generate method register an instance of the class you've just made with GameRegistry::registerWorldGenerator(yourGeneratorClassInstance, weight) where weight determines the order your generator is executed relative to other mods generators. The bigger the number the later your generation will be executed. This is an example I found in ~5 minutes. Edited May 23, 2017 by V0idWa1k3r Share this post Link to post Share on other sites