my main 2 problems are getting it so this item spawns (preferably rarer than diamonds):
package net.minecraft.src;
import java.util.Random;
public class BlockExample extends Block
{
public BlockExample(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random)
{
return 0;
}
}
i can't seem to find what piece of code makes it generate naturally.
and my other problem is making this block ID furnice-able, and to produce an item. i have followed the "big tutorial" but the furnice bit is out dated so i'm a little confused.
-Edit: oops, forgot the last one. How do i make a block drop the same block when mined by iron pick axe+?
thanks for the help.
World Generation:
To do world generation scripts for things such as ores or other things...
Goto ChunkProviderGenerate.java and look for this code:
for(int i4 = 0; i4 < 1; i4++)
{
int j7 = k + rand.nextInt(16);
int k10 = rand.nextInt(16);
int i15 = l + rand.nextInt(16);
(new WorldGenMinable(Block.oreDiamond.blockID, 7)).generate(worldObj, rand, j7, k10, i15);
}
This is the code for diamond ore generation...
Copy the code and paste right underneath the one you copied.
In the copied code just change the variables to unused ones like int i100 and int j100...etc...
then change the block to your ore block.
Explanation of variables:
for(int i4 = 0; i4 < 1; i4++)
the amount of veins per chunk(i think)
int k10 = rand.nextInt(16); this is the middle line of code for the variables...this is at what layer and below you want the ore at(I think).
(new WorldGenMinable(Block.oreDiamond.blockID, 7)).generate(worldObj, rand, j7, k10, i15); the amount of ore blocks per vein(i think).
this is what my final code looks like for emerald:
for(int i99 = 0; i99 < 1; i99++)
{
int j80 = k + rand.nextInt(16);
int k80 = rand.nextInt(12);
int i80 = l + rand.nextInt(16);
(new WorldGenMinable(Block.emeraldOre.blockID, 5)).generate(worldObj, rand, j80, k80, i80);
}
Copy and paste it directly below the one you just copied:
Then Remove block == Block.blockDiamond and change block == Block.oreDiamond to your ore
And finally change the number 2 to the pickaxe you want (2 is iron(aka it is already iron)) in the line of code:
return field_20927_a.func_21208_d() >= 2;
Find the rest of the tool numbers in EnumToolMaterial.java
private FurnaceRecipes()
{
field_21201_b = new HashMap();
func_21199_a(Block.oreIron.blockID, new ItemStack(Item.ingotIron));
func_21199_a(Block.oreGold.blockID, new ItemStack(Item.ingotGold));
func_21199_a(Block.oreDiamond.blockID, new ItemStack(Item.diamond));
func_21199_a(Block.sand.blockID, new ItemStack(Block.glass));
func_21199_a(Item.porkRaw.shiftedIndex, new ItemStack(Item.porkCooked));
func_21199_a(Item.fishRaw.shiftedIndex, new ItemStack(Item.fishCooked));
func_21199_a(Block.cobblestone.blockID, new ItemStack(Block.stone));
func_21199_a(Item.clay.shiftedIndex, new ItemStack(Item.brick));
func_21199_a(Block.cactus.blockID, new ItemStack(Item.field_21021_aU, 1, 2));
func_21199_a(Block.wood.blockID, new ItemStack(Item.coal, 1, 1));
}
and add yours to the bottom...(before the closing brace obviously)
Example:
func_21199_a(Block.blockExample.blockID, new ItemStack(Item.diamond));
...
About your code...:
...
Since it's an Ore make it extend BlockOre instead of Block...
Then by default it will drop the ore block...ore you can change it in BlockOre.java
If that doesn't work...do it like this in Block.java:
Add this where it belongs...
public static final Block blockExample;
and...
blockExample = (new BlockOre(99, 55)).setHardness(3F).setResistance(5F).setStepSound(soundStoneFootstep).func_20012_a("blockExample");
The 99 in bold is the id number (make it unique) the underlined 55 is the place of the texture on the terrain.png...
and the last part that is underlined is the reference name to put in en_US.lang
which is found somewhere in the jar file i can't remember where...
Now since you are no longer using your BlockExample Class you can delete it...(backup it up first)...
There you have it hope this helped...(Took me a very loooooooonnnnggg time to type...so please tell me if it helped...and if it's a noob question please refer to the tutorial section of the modding forums...)
Thank you very much, i have applied everything and i'll test it out shortly.
If you need a graphics artist just ask and i'll see what i can do.
Trying to steal my job!? :sad.gif:
Just kidding............. for the most part.
oh lol, sorry XD
yours were amazing though. I imagine you made multiple block ids for the diff pics? its really cool. and at least when i played this version of fossils(with some cheating mods to see if the stuff spawned) i got the block itself an had to smelt it so its slightly diff from your mod i think.
I like the look of this but it needs to be expanded a little bit. For example, being able to make solid blocks and also armor, like you can for the default materials.
And if possible it would be good to add some other little quirks to the materials to make them more interesting. Aside from the increased durability they're kind of redundant as they are now.
This is an awesome mod. Especially because I had fun making textures for my pack. Do you plan on adding other recipes for this? I want to be able to make blocks.
I figured out why the emerald ore was like that, its not compatible with Mo Creature's Mod or FarmCraft and it is also not compatible with MaxiStack by Roundaround. Do you think you could update this to make it compatible with all?
He could easily make it compatible with alot of mods if he went to modloader. Cause right now he's editing 10 of the minecraft classes. And that could easily be alot less.
sounds cool is this compatable 100% with shockas minerals mod and the required mods to run it as well as the recomended one
also i need to know if it has problems with minecraft advanced
xray mod and extended 2*2 crafting grid if it is then congradulations you will be on my mod list.. i should make a epic all in 1 mod for people who think minecraft is too small and want alot more to it by combining all the big mods
also is this compatable with fancy pack like the whole thing if not what part is it the main or a side addon for it?
To do world generation scripts for things such as ores or other things...
Goto ChunkProviderGenerate.java and look for this code:
This is the code for diamond ore generation...
Copy the code and paste right underneath the one you copied.
In the copied code just change the variables to unused ones like int i100 and int j100...etc...
then change the block to your ore block.
Explanation of variables:
for(int i4 = 0; i4 < 1; i4++)
the amount of veins per chunk(i think)
int k10 = rand.nextInt(16); this is the middle line of code for the variables...this is at what layer and below you want the ore at(I think).
(new WorldGenMinable(Block.oreDiamond.blockID, 7)).generate(worldObj, rand, j7, k10, i15); the amount of ore blocks per vein(i think).
this is what my final code looks like for emerald:
This one is very simple:
Goto ItemPickaxe.java and look for this:
Copy and paste it directly below the one you just copied:
Then Remove block == Block.blockDiamond and change block == Block.oreDiamond to your ore
And finally change the number 2 to the pickaxe you want (2 is iron(aka it is already iron)) in the line of code:
return field_20927_a.func_21208_d() >= 2;
Find the rest of the tool numbers in EnumToolMaterial.java
Looks like this(Emerald means Diamond):
Still in ItemPickaxe.java goto where it says:
And add your block like this:
... Block.blockExample, ...
or whatever it is called.
The final one you asked for...
Goto FurnaceRecipes.java and look for:
and add yours to the bottom...(before the closing brace obviously)
Example:
func_21199_a(Block.blockExample.blockID, new ItemStack(Item.diamond));
...
Since it's an Ore make it extend BlockOre instead of Block...
Then by default it will drop the ore block...ore you can change it in BlockOre.java
If that doesn't work...do it like this in Block.java:
Add this where it belongs...
public static final Block blockExample;
and...
blockExample = (new BlockOre(99, 55)).setHardness(3F).setResistance(5F).setStepSound(soundStoneFootstep).func_20012_a("blockExample");
The 99 in bold is the id number (make it unique) the underlined 55 is the place of the texture on the terrain.png...
and the last part that is underlined is the reference name to put in en_US.lang
which is found somewhere in the jar file i can't remember where...
Now since you are no longer using your BlockExample Class you can delete it...(backup it up first)...
There you have it hope this helped...(Took me a very loooooooonnnnggg time to type...so please tell me if it helped...and if it's a noob question please refer to the tutorial section of the modding forums...)
Thanks!
Changelog:
-------------
V0.41
- Changed Fossil Ore Texture(Credit to: Zer0Rebirth for the texture)
Trying to steal my job!? :sad.gif:
Just kidding............. for the most part.
yours were amazing though. I imagine you made multiple block ids for the diff pics? its really cool. and at least when i played this version of fossils(with some cheating mods to see if the stuff spawned) i got the block itself an had to smelt it so its slightly diff from your mod i think.
And if possible it would be good to add some other little quirks to the materials to make them more interesting. Aside from the increased durability they're kind of redundant as they are now.
Why not just put?
For about a week now, I've been working on Making It Compatiable with Modloader...
And It Worked!
Please report any bugs you may find, thanks!
-deleted-
I just haven't gotten around to it...
And do you think you could make a nether ore?
also i need to know if it has problems with minecraft advanced
xray mod and extended 2*2 crafting grid if it is then congradulations you will be on my mod list.. i should make a epic all in 1 mod for people who think minecraft is too small and want alot more to it by combining all the big mods
also is this compatable with fancy pack like the whole thing if not what part is it the main or a side addon for it?