Jump to content

Recommended Posts

Posted

I've run into another problem, this time with my custom ore. It's not generating, but I don't get any errors in the log.

 

Here's the repo on GitHub:  https://github.com/blahblahbal/Blah-s-Minecraft-Mod

 

I've tried everything I can think of, but nothing works. Some things I tried made it worse.

 

Fortunately, I've fixed the first two problems I ran into (missing textures, no such field 'tadaniteOre').

Posted

0) use github

1) yoir json is malformed

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Well... the json is in the exact same format as the other jsons for my blocks. In fact, I copy-pasted the first one and edited it to match for Tadanite Ore. So why isn't it throwing an error on the other two? Hmm....

 

EDIT: What... I redid the copy-paste... now it's not giving me ANY errors in the log... :(

 

Also I should probably edit the first post to say I'm using Forge 1722 and MC 1.8.9.

Posted

Well... the json is in the exact same format as the other jsons for my blocks. In fact, I copy-pasted the first one and edited it to match for Tadanite Ore. So why isn't it throwing an error on the other two? Hmm....

 

EDIT: What... I redid the copy-paste... now it's not giving me ANY errors in the log... :(

 

Also I should probably edit the first post to say I'm using Forge 1722 and MC 1.8.9.

 

Hi blahblahbal,

 

Using sublimetext, it gives me this :

 

1456698524-error.png

 

I'm not sure it was encoded well, try to write it by yourself and make a test again !

Squirrel ! Squirrel ! Squirrel !

Posted

...still doesn't show the textures. I'm convinced it must be something in the code, not the jsons.

Don't forgive your jsons just because you fixed one error in one of them. There are others to create headaches as well. And then there are their file names and directory structure... The code is the tail wagging the dog (while the json paradigm is a dog with fleas).

 

However, it may be worth the trouble of checking code for exact spelling and capitalization. Remember to keep reading your log.

 

Sadly the json paradigm is both fragile and (to Eclipse) opaque. Tools like JSONlint can check json syntax, but I don't know anything outside the log errors that can tell you about json semantics.

 

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

That's not very specific... Which file? Again, the log now shows no errors whatsoever, yet the textures still show up missing.

 

(I think I know which file you mean, though, and yeah, I changed it. It actually was already the correct name (I think))

Posted

Woo, it shows the textures now. But... now there's another problem... My world generator errors on load, java.lang.NoSuchFieldError: tadaniteOre. Guess I should take this to another topic though. Unless, of course, it's better I just redo this topic.

Posted

Yeah, got that much =P. I think it might have something to do with how tadaniteOre is of type ModBlockOre, and that isn't BasicBlock. Hang on... is it possible to make ModBlockOre extend BasicBlock and still be inheriting everything Block has? If so, then there's the solution. Then again... hmm. I don't have the code in front of me at the moment; I'll experiment tomorrow.

Posted

Fixed the above, now I've got a custom ore gen problem :/. I'm (obviously) new to Minecraft modding, but I'd like to learn. Most of the tutorials (that I've found, that is) out there either don't cover ore gen or are outdated.

Posted

I've seen at least one other "Ore not Generating" thread in the last month. Use Google to find it and others. Make sure you've handled all of the issues in them, and then post more specifics here (what you've done, your generator code and registrations, steps through debugger, and what you see versus what you expect.

 

Ore generators can be tricky. I think the last guy was mis-handling his random number seed so he was starting every ore body with the same seed (and each successive ore body failed to replace the 1st one generated).

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

Yeah, I think I found that thread. Unfortunately it wasn't helpful because the person never posted their solution.

 

Anyway, I think what's happening is it's trying to replace stone, which doesn't work in the nether. I came to this conclusion because I added another ore; one that generates in the overworld, and it generates just fine.

 

Also (on a completely unrelated note) where would one find the default armor model json files?

Posted

Stick to one question per topic, don't replace the OP with a new question once you have the solution. This makes it harder for other people having the same problem to find the solution.

 

To generate ore in non-stone blocks, use the

WorldGenMinable(IBlockState, int, Predicate<IBlockState>)

constructor. The

Predicate

determines whether the ore can replace a given

IBlockState

. Use

BlockHelper.forBlock

to create a

Predicate

that matches any state of the specified

Block

.

 

The armour item models are in assets/minecraft/models/item with the other item models. Rendering armour on entity models is handled by

LayerArmorBase

and its subclasses, JSON models aren't used.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Yay, that worked. Thanks.

 

And I hadn't thought about the topic change thing... I'll remember that.

 

I guess I'm off to make a thread about armor model code. Man, the tutorials out the are really outdated/incomplete...

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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