Jump to content

Recommended Posts

Posted

I'm working on a mod where the worldgen adds a variety of cosmetic stones, but the way the textures are, they tend to clash with the textures for ores, so I've made ore subtypes to make it blend in better. I've managed to get it to replace the vanilla ores and IC2 ores to an extent in a class that extends IWorldGenerator, but I want to run blocks through the Ore Dictionary so common ores like copper don't need more than one entry since I understand that not everyone uses the same copper on different servers and would like to make it an easy way for new ores to be added without much trouble. I've tried running OreDictionary.getOreID(String) through World.getBlockId(x, y, z,) like this under the assumption that it fetches the IDs listed under the Ore Dictionary entry:

if(world.getBlockId(chunkX * 16 + blockX, blockY, chunkZ * 16 + blockZ) == OreDictionary.getOreID("oreCopper") 
&& world.getBlockId(chunkX * 16 + blockX, blockY, chunkZ * 16 + blockZ) != ModBlocks.SuboreCopper.blockID)
{
if(nextToBasalt(chunkX * 16 + blockX, blockY, chunkZ * 16 + blockZ)) //Checks for adjacent cosmetic stones.
{
world.setBlockAndMetadataWithNotify(chunkX * 16 + blockX, blockY, chunkZ * 16 + blockZ, ModBlocks.SuboreCopper.blockID, 0);
}
if(nextToMicrocline(chunkX * 16 + blockX, blockY, chunkZ * 16 + blockZ))
{
world.setBlockAndMetadataWithNotify(chunkX * 16 + blockX, blockY, chunkZ * 16 + blockZ, ModBlocks.SuboreCopper.blockID, 1);
}
//and so on...
}

but that doesn't seem to work. I'm guessing that an OreDict ID is a different thing than a blockID now, so do I have to call a List based on the OreDict string?

 

Edit: In retrospect, yeah, assuming the the OreDict ID was a blockID was stupid considering metadata.

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.