Jump to content

Blocks.sand = red sand & normal sand. (Problem with this.)


Kander16

Recommended Posts

Hi,

 

I have a new block that is generated into everywhere there is sand. So what I did is:

 

//world, rand, x, z, Minimal blocks to spawn, Maximal blocks to spawn, Chance to spawn, Minimal height to spawn, Maximal height to spawn, Block to spawn in[/Code]

 

[Code]generateOre(Chef.oreSeaSaltOre, world, rand, x, z, 4, 8, 80, 50, 100, Blocks.sand);[/Code]

 

But I actually want that this spawns into normal sand only, not into red sand.

What do I do?

 

Thanks for helping.

 

Creator of the Master Chef Mod and many more to come.

 

If I helped you, please click the 'thank you' button.

Link to comment
Share on other sites

Thanks.

 

It still does not work, I have looked how the ItemStack did this but that doesn't work actually.

I think I do not understand how I compare the metadata with my block, so it does not go looking for the Block ID of it.

Please, could you tell me what to do?

 

This is my "MyWorldGenMinable" java file.

 

http://pastebin.com/8KZN7ZpW

 

and This is my "OreGeneration" java file.

 

http://pastebin.com/2jvAYmrW

Creator of the Master Chef Mod and many more to come.

 

If I helped you, please click the 'thank you' button.

Link to comment
Share on other sites

I'll tell you what I told someone else.

 

Refactor all of those variable names so that they're readable.

 

if (d12 * d12 + d13 * d13 + d14 * d14 < 1.0D && p_76484_1_.getBlock(k2, l2, i3).isReplaceableOreGen(p_76484_1_, k2, l2, i3, blockB))

 

Is a mess, I can't read it, you can't read it, no one can read it and figure out what it's doing.

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.

Link to comment
Share on other sites

Ok, so could you tell me what to do?

How do I create a new custom WorldGenMinable that also compares the metadata?

 

The MyWorldGenMinable.java is just a Copy of the WorldGenMinable.class With a few pieces of code added.

 

Thanks.

Creator of the Master Chef Mod and many more to come.

 

If I helped you, please click the 'thank you' button.

Link to comment
Share on other sites

Seeing as I can't figure out what the class is doing right now, I can't help you.  Find/replace all the srg names with sane, human-readable ones, and I might help you.

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.

Link to comment
Share on other sites

Wait, I can't do this yet, so I've come with another Idea.

Does red sand only spawn in the mesa biome?

If so, then I maybe could add something that says: It spawns in all biomes except the mesa biome.

Then the problem is solved also.

 

Thanks.

Creator of the Master Chef Mod and many more to come.

 

If I helped you, please click the 'thank you' button.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

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