1

What is wrong with my code?

The Offspring's Avatar The Offspring6/26/13 5:11 pm
1 emeralds 325 5
6/28/2013 10:05 am
bmanrules's Avatar bmanrules
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's Avatar
The Offspring
Level 23 : Expert Pokemon
3

Create an account or sign in to comment.

5

1
06/28/2013 10:05 am
Level 57 : Grandmaster Programmer
bmanrules
bmanrules's Avatar
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
06/28/2013 9:43 am
Level 45 : Master Blob
Gegy
Gegy's Avatar

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
06/26/2013 5:19 pm
Level 66 : High Grandmaster Modder
duke_Frans
duke_Frans's Avatar
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
06/26/2013 5:16 pm
Level 61 : High Grandmaster Sweetheart
Nuggetcake
Nuggetcake's Avatar
I don't think 'ice mountains' is a real biome.. I might be wrong i dont play mc anymore. well much.
1
06/26/2013 5:14 pm
Level 23 : Expert Pokemon
The Offspring
The Offspring's Avatar
plz help
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome