Posted May 23, 20178 yr 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, 20178 yr by bhavikchugani Addon file plus
May 23, 20178 yr 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.
May 23, 20178 yr 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
May 23, 20178 yr Author 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??
May 23, 20178 yr 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, 20178 yr by V0idWa1k3r Clarified N6
May 23, 20178 yr Author 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???
May 23, 20178 yr Author 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?
May 23, 20178 yr 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.
May 23, 20178 yr 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.
May 23, 20178 yr Author 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
May 23, 20178 yr Author @Ugdhar i dont understand the worldGen thing. Can u help? Edited May 23, 20178 yr by bhavikchugani Mistake
May 23, 20178 yr 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, 20178 yr by V0idWa1k3r
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.