I have a problem, I have created 2 mobs and they refuse to spawn. When I only had codded 1 of the mobs, it spawned in fine. But when I added the 2nd and loaded the same world, all of my first mob had despawned and none of my custom mobs would spawn at all. I tried creating new worlds, changing spawn rates etc... none of it works. Heres the code:
package net.minecraft.src;
import java.util.Map;
public class mod_HumanNPC extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityHumanNPC.class, "Axe Man", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityHumanNPC.class, 100, 14, 18, EnumCreatureType.monster);
ModLoader.registerEntityID(EntityHumanNPCArcher.class, "Woodlands Archer", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityHumanNPCArcher.class, 25, 14, 18, EnumCreatureType.monster);
}
public void addRenderer(Map map)
{
map.put(EntityHumanNPC.class, new RenderBiped(new ModelBiped(), 0.5F));
map.put(EntityHumanNPCArcher.class, new RenderBiped(new ModelBiped(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
Alright so I am new to modding and creating mobs. Is there a way to make my mushroom boss mob more aggresive. And is there a way to make the mob model look like a cow or chicken?
Please approve this post thnxs
PS
Following skywarps advice my goblin holds a stone sword but it just walks around aimlessly \
My mobs invisible. When i right click with the spawn egg my arm swing and then i hear footsteps so i think its there but just invisible.
Heres my code
package net.minecraft.src;
import java.lang.reflect.Method;
public class mod_Russomanian extends BaseMod
{
public mod_Russomanian()
{
}
public void AddEntityID()
{
//This defines your entity. Class name, entity name, and then the entity ID.
EntityList.addMapping(EntityRussomanian.class, "Russomanian", ModLoader.getUniqueEntityId());
//This adds your mob to the spawn list.
SpawnListEntry.addCreaturesToSpawnList("Surface biomes", EntityRussomanian.class);
}
@Override
public String getVersion() {
// TODO Auto-generated method stub
return null;
}
@Override
public void load() {
ModLoader.registerEntityID(EntityRussomanian.class,"Russomanian", 0xFFFFFF,0x000000, 0);
}
}
and
package net.minecraft.src;
public class EntityRussomanian extends EntityCreature
{
public EntityRussomanian(World world)
{
super(world);
//This is the texture for your mob
texture = "/textures/Russomanian.png";
}
protected int getDropItemId()
{
//This is the item your mob will drop
return Item.swordDiamond.shiftedIndex;
}
@Override
public int getMaxHealth() {
// TODO Auto-generated method stub
return 35;
}
}
First of all, run recompile.bat. After that, run reobf.bat. If it says stuff below "Obfuscating client" other than "Obfuscating server", check your minecraft_compile.log and search for "^".
how do i make the mod created by player? here is what my code looks like i dont think its working becuase i cant find the creature in the testing world.
entity_modname
package net.minecraft.src;
public class EntityDiamondWarrior extends EntityCreature
{
public EntityDiamondWarrior(World world)
{
super(world);
texture = "/mob/DiamondWarrior.png";
}
protected int getDropItemId()
{
return Item.Diamond.shiftedIndex;
}
}
mod_filename
package net.minecraft.src;
import java.lang.reflect.Method;
public class mod_DiamondWarrior extends BaseMod
{
public mod_DiamondWarrior()
{
}
Oh no, I completely followed this post in Minecraft 1.5 (you know this is official, not alpha or beta :P) but It isn't rendered, but activates a pressure plate
http://www.youtube.com/user/pancakesimone
Please approve this post thnxs
PS
Following skywarps advice my goblin holds a stone sword but it just walks around aimlessly \
Heres my code
package net.minecraft.src;
import java.lang.reflect.Method;
public class mod_Russomanian extends BaseMod
{
public mod_Russomanian()
{
}
public void AddEntityID()
{
//This defines your entity. Class name, entity name, and then the entity ID.
EntityList.addMapping(EntityRussomanian.class, "Russomanian", ModLoader.getUniqueEntityId());
//This adds your mob to the spawn list.
SpawnListEntry.addCreaturesToSpawnList("Surface biomes", EntityRussomanian.class);
}
@Override
public String getVersion() {
// TODO Auto-generated method stub
return null;
}
@Override
public void load() {
ModLoader.registerEntityID(EntityRussomanian.class,"Russomanian", 0xFFFFFF,0x000000, 0);
}
}
and
package net.minecraft.src;
public class EntityRussomanian extends EntityCreature
{
public EntityRussomanian(World world)
{
super(world);
//This is the texture for your mob
texture = "/textures/Russomanian.png";
}
protected int getDropItemId()
{
//This is the item your mob will drop
return Item.swordDiamond.shiftedIndex;
}
@Override
public int getMaxHealth() {
// TODO Auto-generated method stub
return 35;
}
}
where is recompile.bat located???
entity_modname
mod_filename