1

What is wrong with my code?

The Offspring 6/26/13 5:11 pm
344
6/28/2013 10:05 am
this is my first mob mod ever, i have done the Entity, the Model, And Render But this file mod_ChestMonsterMod wont work, i had quite a few errors but eclipse fixed it for me apparently if you are a modder please could you tell me what is wrong?



package net.minecraft.src;
import java.util.Map;
import java.util.Random;
import java.util.*;

public class mod_ChestMonsterMod extends BaseMod
{

{

//Chestmonster
//adds egg and registers the entity
ModLoader.registerEntityID(EntityChestMonster.class, "Chest Monster", ModLoader.getUniqueEntityId(), (255 << 16), (255 << 16));
ModLoader.registerEntityID(EntityChestMonster.class, "Chest Monster", ModLoader.getUniqueEntityId());

ModLoader.addSpawn("Chest Monster", 3, 0, 5, EnumCreatureType.creature, new BiomeGenBase[] {
BiomeGenBase.iceMountains,
BiomeGenBase.icePlains,
BiomeGenBase.taiga,
BiomeGenBase.desert,
BiomeGenBase.desertHills,
BiomeGenBase.frozenOcean,
BiomeGenBase.plains,
BiomeGenBase.taiga,
BiomeGenBase.taigaHills,
BiomeGenBase.swampland
});




}

public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{

for (int i = 0; i < 1; i++)
{


}
}


public String getVersion()
{
return "Chest Monster Mod Version 1.0";
}

public void addRenderer(Map map)
{
map.put(EntityChestMonster.class, new RenderChestMonster(new ModelChestMonster(), 0.5F));
}


@Override
public void load() {
// TODO Auto-generated method stub

}


}
Posted by
The Offspring
Level 23 : Expert Pokémon
3

  Have something to say?

JoinSign in

5

bmanrules
06/28/2013 10:05 am
Level 57 : Grandmaster Programmer
Well, posting your crash report would be helpful, but I'm pretty sure ModLoader.getUniqueEntityId() has either been depreciated or does not work in the latest update. Replace all instances of that in your code with a integer below -128.
1
Gegy
06/28/2013 9:43 am
Level 46 : Master Blob

package net.minecraft.src;
import java.util.Map;
import java.util.Random;
import java.util.*;

public class mod_ChestMonsterMod extends BaseMod
{

{



}

public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{

for (int i = 0; i < 1; i++)
{


}
}


public String getVersion()
{
return "Chest Monster Mod Version 1.0";
}

public void addRenderer(Map map)
{
map.put(EntityChestMonster.class, new RenderChestMonster(new ModelChestMonster(), 0.5F));
}


@Override
public void load()
{

//Chestmonster
//adds egg and registers the entity
ModLoader.registerEntityID(EntityChestMonster.class, "Chest Monster", ModLoader.getUniqueEntityId(), (255 << 16), (255 << 16));
ModLoader.registerEntityID(EntityChestMonster.class, "Chest Monster", ModLoader.getUniqueEntityId());

ModLoader.addSpawn("Chest Monster", 3, 0, 5, EnumCreatureType.creature, new BiomeGenBase[] {
BiomeGenBase.iceMountains,
BiomeGenBase.icePlains,
BiomeGenBase.taiga,
BiomeGenBase.desert,
BiomeGenBase.desertHills,
BiomeGenBase.frozenOcean,
BiomeGenBase.plains,
BiomeGenBase.taiga,
BiomeGenBase.taigaHills,
BiomeGenBase.swampland
});





}


}
1
duke_Frans
06/26/2013 5:19 pm
Level 66 : High Grandmaster Modder
You must put
//Chestmonster
//adds egg and registers the entity
ModLoader.registerEntityID(EntityChestMonster.class, "Chest Monster", ModLoader.getUniqueEntityId(), (255 << 16), (255 << 16));
ModLoader.registerEntityID(EntityChestMonster.class, "Chest Monster", ModLoader.getUniqueEntityId());

ModLoader.addSpawn("Chest Monster", 3, 0, 5, EnumCreatureType.creature, new BiomeGenBase[] {
BiomeGenBase.iceMountains,
BiomeGenBase.icePlains,
BiomeGenBase.taiga,
BiomeGenBase.desert,
BiomeGenBase.desertHills,
BiomeGenBase.frozenOcean,
BiomeGenBase.plains,
BiomeGenBase.taiga,
BiomeGenBase.taigaHills,
BiomeGenBase.swampland

In your void load method
1
Nuggetcake
06/26/2013 5:16 pm
Level 61 : High Grandmaster Sweetheart Kitten
I don't think 'ice mountains' is a real biome.. I might be wrong i dont play mc anymore. well much.
1
The Offspring
06/26/2013 5:14 pm
Level 23 : Expert Pokémon
plz help
1

Welcome