Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Custom Ore
The update for 1.13 is being worked on - please be patient. (Updated 02/19/19)
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 0
bhavikchugani

Custom Ore

Started by bhavikchugani, May 23, 2017

12 posts in this topic

bhavikchugani    0

bhavikchugani

bhavikchugani    0

  • Tree Puncher
  • bhavikchugani
  • Members
  • 0
  • 14 posts
  • 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

Ugdhar

Ugdhar    72

  • Dragon Slayer
  • Ugdhar
  • Members
  • 72
  • 618 posts
  • 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.

 

  • Like 2

Share this post


Link to post
Share on other sites

V0idWa1k3r    308

V0idWa1k3r

V0idWa1k3r    308

  • World Shaper
  • V0idWa1k3r
  • Members
  • 308
  • 1443 posts
  • 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

bhavikchugani

bhavikchugani    0

  • Tree Puncher
  • bhavikchugani
  • Members
  • 0
  • 14 posts
  • 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

V0idWa1k3r

V0idWa1k3r    308

  • World Shaper
  • V0idWa1k3r
  • Members
  • 308
  • 1443 posts
  • 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:

  1. Please, never use ItemModelMesher. It leads to numerous bugs and issues. There is a ModelLoader class for registering your models.
  2. You should move everything rendering registry related into your client proxy.
  3. Models for blocks/items must be registered during pre-init, not init.
  4. 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();


     

  5. I believe that your blockstates file is not correct. I have provided a link to a tutorial on how to make those.

  6. Your model JSON file is invalid. It is missing an opening bracket

Edited May 23, 2017 by V0idWa1k3r
Clarified N6
  • Like 1

Share this post


Link to post
Share on other sites

bhavikchugani    0

bhavikchugani

bhavikchugani    0

  • Tree Puncher
  • bhavikchugani
  • Members
  • 0
  • 14 posts
  • 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:

  1. Please, never use ItemModelMesher. It leads to numerous bugs and issues. There is a ModelLoader class for registering your models.
  2. You should move everything rendering registry related into your client proxy.
  3. Models for blocks/items must be registered during pre-init, not init.
  4. Your blocks/items should be statically initialized. There is no need to call the init method. Simply write 
    
    public static Block rubyblock = new BlockRuby();


     

  5. I believe that your blockstates variant is not correct. I have provided a link to a tutorial on how to make those.

  6. 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

bhavikchugani

bhavikchugani    0

  • Tree Puncher
  • bhavikchugani
  • Members
  • 0
  • 14 posts
  • 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:

  1. Please, never use ItemModelMesher. It leads to numerous bugs and issues. There is a ModelLoader class for registering your models.
  2. You should move everything rendering registry related into your client proxy.
  3. Models for blocks/items must be registered during pre-init, not init.
  4. Your blocks/items should be statically initialized. There is no need to call the init method. Simply write 
    
    public static Block rubyblock = new BlockRuby();


     

  5. I believe that your blockstates variant is not correct. I have provided a link to a tutorial on how to make those.

  6. 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

Ugdhar

Ugdhar    72

  • Dragon Slayer
  • Ugdhar
  • Members
  • 72
  • 618 posts
  • 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

V0idWa1k3r

V0idWa1k3r    308

  • World Shaper
  • V0idWa1k3r
  • Members
  • 308
  • 1443 posts
  • 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

bhavikchugani

bhavikchugani    0

  • Tree Puncher
  • bhavikchugani
  • Members
  • 0
  • 14 posts
  • 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

bhavikchugani

bhavikchugani    0

  • Tree Puncher
  • bhavikchugani
  • Members
  • 0
  • 14 posts
  • 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

V0idWa1k3r

V0idWa1k3r    308

  • World Shaper
  • V0idWa1k3r
  • Members
  • 308
  • 1443 posts
  • 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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0
Go To Topic Listing Modder Support

  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • CJWilk
      1.13.2-25.0.45 fails to install

      By CJWilk · Posted 18 minutes ago

      While installing the new 1.13.2 installer crashes in the 'building processors' phase. I have tried re-downloading as well as restarting my computer. I have also gone to the file path defined on the error and seen if I could manually edit the file, but it does not exist.
    • diesieben07
      [1.13.2] Example mod fails to launch

      By diesieben07 · Posted 19 minutes ago

      ... and? gradlew idea has never been necessary. Even before 1.13.2.
    • DoctorLOGiQ
      [1.13.2] Example mod fails to launch

      By DoctorLOGiQ · Posted 20 minutes ago

      Because there is no 'gradlew idea' command in 1.13.2 as far as I can see, certainly not when using the tasks command to list available tasks, as per the prompt.   As for my way of doing things, it's how I've always done it, and works just fine in most cases. Either way, it is now somewhat working, and that's good enough for me.
    • Drachenbauer
      [1.13.2] How do i setup a block propertys constructor in a blockbase?

      By Drachenbauer · Posted 27 minutes ago

      1. i downloaded the MDK of Forge - MC 1.13.2 and copyed it´s contents into a new folder in my modding-space (next to the folder with my 1.12.2 mod, that each mod-version has it´s very own folder) 2. i opened the command-window (that black dos-like thingy) and used "gradlew eclipse" on that prepared folder. 3. i copyed the src-folder of my old mod into the new folder, replacing the src-folder there. 4. i opened eclipse with the folder, wich holds my mod-folders as the new workspace
    • CJWilk
      Cant instal Latest Ver 1.13.2-25.0.4

      By CJWilk · Posted 33 minutes ago

      Same issue.  
  • Topics

    • CJWilk
      0
      1.13.2-25.0.45 fails to install

      By CJWilk
      Started 18 minutes ago

    • DoctorLOGiQ
      8
      [1.13.2] Example mod fails to launch

      By DoctorLOGiQ
      Started Monday at 01:23 PM

    • Drachenbauer
      9
      [1.13.2] How do i setup a block propertys constructor in a blockbase?

      By Drachenbauer
      Started Tuesday at 05:16 PM

    • playerk125
      1
      Cant instal Latest Ver 1.13.2-25.0.4

      By playerk125
      Started 1 hour ago

    • BeardlessBrady
      8
      [1.12] Making a TESR less laggy

      By BeardlessBrady
      Started Yesterday at 03:36 PM

  • Who's Online (See full list)

    • Kemanorel
    • DaemonUmbra
    • Toma™
    • Mango106
    • diesieben07
    • heyitsmenobodyy
    • MrMarnic
    • amelisse
    • Benjitkt57
    • CJWilk
    • Drachenbauer
    • DoctorLOGiQ
    • playerk125
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Custom Ore
  • Theme
  • Contact Us

Copyright © 2017 ForgeDevelopment LLC Powered by Invision Community