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
  On 2/28/2016 at 9:47 PM, blahblahbal said:

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
  On 2/28/2016 at 10:48 PM, blahblahbal said:

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello all. I'm currently grappling with the updateShape method in a custom class extending Block.  My code currently looks like this: The conditionals in CheckState are there to switch blockstate properties, which is working fine, as it functions correctly every time in getStateForPlacement.  The problem I'm running into is that when I update a state, the blocks seem to call CheckState with the position of the block which was changed updated last.  If I build a wall I can see the same change propagate across. My question thus is this: is updateShape sending its return to the neighbouring block?  Is each block not independently executing the updateShape method, thus inserting its own current position?  The first statement appears to be true, and the second false (each block is not independently executing the method). I have tried to fix this by saving the block's own position to a variable myPos at inception, and then feeding this in as CheckState(myPos) but this causes a worse outcome, where all blocks take the update of the first modified block, rather than just their neighbour.  This raises more questions than it answers, obviously: how is a different instance's variable propagating here?  I also tried changing it so that CheckState did not take a BlockPos, but had myPos built into the body - same problem. I have previously looked at neighbourUpdate and onNeighbourUpdate, but could not find a way to get this to work at all.  One post on here about updatePostPlacement and other methods has proven itself long superceded.  All other sources on the net seem to be out of date. Many thanks in advance for any help you might offer me, it's been several days now of trying to get this work and several weeks of generally trying to get round this roadblock.  - Sandermall
    • sorry, I might be stupid, but how do I open it? because the only options I have are too X out, copy it, which doesn't work and send crash report, which doesn't show it to me, also, sorry for taking so long.
    • Can you reproduce this with version 55.0.21? A whole lot of plant placement issues were just fixed in this PR.
    • Necro'ing that thread to ask if you found a solution ? I'm encountering the same crash on loading the world. I created the world in Creative to test my MP, went into survival to test combat, died, crashed on respawn and since then crash on loading the world. Deactivating Oculus isn't fixing it either, and I don't have Optifine (Twilight forest is incompatible)
  • Topics

×
×
  • Create New...

Important Information

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