public void AddRenderer(Map map)
{
map.put(net.minecraft.src.EntityYourThrowable.class, new RenderYourThrowable(mod_YourMod.YourThrowable.getIconFromDamage(0)));
}
Hello, I am making a grenade that when it explodes creates heaps of fire around the are where it exploded. I didn't know whether to make a new explosion type or whether there was a way to check if the Item exploded and making it then create fire. All help is apreciated :biggrin.gif:
package net.minecraft.src;
import java.util.Random;
public class mod_RedOre extends BaseMod
{
public static final Block RedOre = new BlockRedOre(139, 0).setHardness(2 .5F).setResistance(5.0F).setBlockName ("RedOre")
public static final Item RedCrystal = new ItemRedCrystal(140).setItemName("RedCrystal");
public int vein = 20;
public int tries = 10;
public mod_RedOre()
{
ModLoader.RegisterBlock(RedOre);
RedOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/redore.png");
RedCrystal.iconIndex = ModLoader.addOverride("/gui/items.png", "/redcrystal.png");
ModLoader.AddName(RedOre, "Red Ore");
ModLoader.AddName(RedCrystal, "Red Crystal");
}
public void GenerateSurface(World world, Random random, int chunkX, int chunkZ) //error that sucks
{
for (int i = 0; i < tries; i++)
{
posX = chunkX + random.nextInt(16);
posY = random.nextInt(30);
posZ = chunkZ + random.nextInt(16);
(new WorldGenMinable(RedOre.blockID, vein)).generate(world, random, posX, posY, posZ);
}
}
public void load()
{
}
public String getVersion()
{
return "0.1";
}
}
And you needed to add the public void load and change the String Version to get Version
I'm really not sure what that float is for, but the numbers in the add spawn bit (4, 5, 6,) are for changing the minimum, average, and maximum amount of this mob that will spawn in a chunk
0
0
0
1
Thanx in advance,
-KMeister
Edit: SOLVED!!
0
And you needed to add the public void load and change the String Version to get Version
0
0
0
0
0
0
0
0
Its this that actually tells the game to spawn your mob and to render it correctly
0
PS: Let me know when you release it i would love to make a puzzle map with this
0