The game was crashing when, and it was fixed when we moved some alienbiome related things into mod_AlienBiome. I was told in a pm. Could you help me correct that, then we can fix the biome problem?
I have a big problem. After numerous different things going on, I am forced to assume that something has gone wrong with my code, and my alien biome no longer "exists" within the game, even though F3 shows 'alienbiome". One thing is that I cannot locate any new alien biomes in my worlds, and existing biomes won't spawn the mobs that were spawning within them. Now, I may just be having bad luck trying to locate new biomes, but my mobs are DEFINITELY not spawning. Help will be greatly appreciated, as this biome is one of the main parts of my mod.
mod_MangMod
package net.minecraft.src;
import java.util.Map;
import net.minecraft.client.Minecraft;
import java.util.List;
public class mod_MangMod extends BaseMod
{
public static final Block aliengrass = new aliengrass(125, 0).setBlockName("aliengrass").setHardness(0.5F);
public static int aliengrassbottom = ModLoader.addOverride("/terrain.png", "/mangmod/aliengrassbottom.png");
public static int aliengrasstop = ModLoader.addOverride("/terrain.png", "/mangmod/aliengrasstop.png");
public static int aliengrassside = ModLoader.addOverride("/terrain.png", "/mangmod/aliengrassside.png");
public static final Block aliendirt = new aliendirt(126, 0).setBlockName("aliendirt").setHardness(0.5F);
public static final Block alienplank = new alienplank(127, 0).setBlockName("alienplank").setHardness(2F).setResistance(5F);
public static final Block aliencob = new aliencob(128, 0).setBlockName("aliencob").setHardness(2F).setResistance(10F);
public static final Block alienore = new alienore(129, 0).setBlockName("alienore").setHardness(3F).setResistance(5F);
public static final Block alienlog = new alienlog(130, 0).setBlockName("alienlog").setHardness(2F).setResistance(5F);
public static int alienlogbottom = ModLoader.addOverride("/terrain.png", "/mangmod/alienlog1.png");
public static int alienlogtop = ModLoader.addOverride("/terrain.png", "/mangmod/alienlog2.png");
public static int alienlogside = ModLoader.addOverride("/terrain.png", "/mangmod/alienlog3.png");
public static final Block alienleaf = new alienleaf(131, 0).setBlockName("alienleaf").setHardness(0.2F);
public static final Block alienstone = new alienleaf(132, 0).setBlockName("alienstone").setHardness(1.5F).setResistance(10F);
public static final Item cactusjuice = new cactusjuice(5000, 5, false).setItemName("cactusjuice");
public static final Item applejuice = new applejuice(5001, 9, false).setItemName("applejuice");
public static final Item donut = new ItemFood(5002, 4, 2F, false).setItemName("donut");
public static final Item glazeddonut = new ItemFood(5003, 6, 1F, false).setItemName("glazeddonut");
public static final Item diamondbucket = new Item(5004).setItemName("diamondbucket");
public static final Item orange = new ItemFood(5005, 4, 4F, false).setItemName("orange");
public static final Item bacon = new ItemFood(5006, 9, 1F, false).setItemName("bacon");
public static final Item eggsandwich = new ItemFood(5007, 11, 1F, false).setItemName("eggsandwich");
public static final Item tinyalien = new tinyalien(5008).setItemName("tinyalien");
public static final Item tinysteve = new tinysteve(5009).setItemName("tinysteve");
public static final Item tinyzombie = new tinyzombie(5010).setItemName("tinyzombie");
public static final Item alienflesh = new Item(5011).setItemName("alienflesh");
public static final Item lemon = new lemon(5012).setItemName("lemon");
public static final Item actweegee = new actweegee(5013).setItemName("actweegee");
public static final Item ivspawner = new ivspawner(5014).setItemName("ivspawner");
public void load()
{
ModLoader.registerEntityID(innocentvillager.class, "innocentvillager", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(innocentvillager.class, 5, 1, 1, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.plains,
BiomeGenBase.desert,
BiomeGenBase.desertHills,
BiomeGenBase.beach,
BiomeGenBase.extremeHills,
BiomeGenBase.extremeHillsEdge,
BiomeGenBase.forest,
BiomeGenBase.forestHills,
BiomeGenBase.taiga,
BiomeGenBase.taigaHills,
BiomeGenBase.swampland,
BiomeGenBase.river,
BiomeGenBase.jungle,
BiomeGenBase.jungleHills
});
ModLoader.registerEntityID(alienruffian.class, "alienruffian", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(alienruffian.class, 70, 1, 1, EnumCreatureType.creature, new BiomeGenBase[]
{
mod_AlienBiome.alienbiome
});
ModLoader.registerEntityID(alienarcher.class, "alienarcher", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(alienarcher.class, 70, 1, 1, EnumCreatureType.creature, new BiomeGenBase[]
{
mod_AlienBiome.alienbiome
});
ModLoader.registerEntityID(tinyzombie2.class, "Tiny Zombie", ModLoader.getUniqueEntityId());
ModLoader.registerEntityID(actweegee2.class, "actweegee2", ModLoader.getUniqueEntityId());
ModLoader.registerBlock(aliengrass);
ModLoader.addName(aliengrass, "Alien Grass");
aliendirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mangmod/aliendirt.png");
ModLoader.registerBlock(aliendirt);
ModLoader.addName(aliendirt, "Alien Dirt");
alienplank.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mangmod/alienplank.png");
ModLoader.registerBlock(alienplank);
ModLoader.addName(alienplank, "Alien Plank");
aliencob.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mangmod/aliencob.png");
ModLoader.registerBlock(aliencob);
ModLoader.addName(aliencob, "Alien Cobblestone");
alienore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mangmod/alienore.png");
ModLoader.registerBlock(alienore);
ModLoader.addName(alienore, "Uralium Ore");
ModLoader.registerBlock(alienlog);
ModLoader.addName(alienlog, "Alien Log");
alienleaf.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mangmod/alienleaf.png");
ModLoader.registerBlock(alienleaf);
ModLoader.addName(alienleaf, "Alien Leaves");
alienstone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mangmod/alienstone.png");
ModLoader.registerBlock(alienstone);
ModLoader.addName(alienstone, "Alien Stone");
cactusjuice.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/cactusjuice.png");
ModLoader.addName(cactusjuice, "Cactus Juice");
ModLoader.addRecipe(new ItemStack(cactusjuice, 1), new Object [] {"#", "#", "%", Character.valueOf('#'), Block.cactus, Character.valueOf('%'), Item.glassBottle});
applejuice.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/applejuice.png");
ModLoader.addName(applejuice, "Apple Juice");
ModLoader.addRecipe(new ItemStack(applejuice, 1), new Object [] {"#", "#", "%", Character.valueOf('#'), Item.appleRed, Character.valueOf('%'), Item.glassBottle});
donut.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/donut.png");
ModLoader.addName(donut, "Donut");
ModLoader.addRecipe(new ItemStack(donut, 4), new Object [] {"###", "# #", "###", Character.valueOf('#'), Item.wheat});
glazeddonut.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/glazeddonut.png");
ModLoader.addName(glazeddonut, "Glazed Donut");
ModLoader.addRecipe(new ItemStack(glazeddonut, 1), new Object [] {"#", "%", Character.valueOf('#'), Item.sugar, Character.valueOf('%'), donut});
diamondbucket.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/diamondbucket.png");
ModLoader.addName(diamondbucket, "Diamond Bucket");
ModLoader.addRecipe(new ItemStack(diamondbucket, 1), new Object [] {"# #", " # ", Character.valueOf('#'), Item.diamond});
orange.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/orange.png");
ModLoader.addName(orange, "Orange");
bacon.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/bacon.png");
ModLoader.addName(bacon, "Bacon");
ModLoader.addSmelting(Item.porkCooked.shiftedIndex, new ItemStack(bacon, 1));
eggsandwich.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/eggsandwich.png");
ModLoader.addName(eggsandwich, "Egg Sandwich");
ModLoader.addRecipe(new ItemStack(eggsandwich, 1), new Object [] {"#", "%", "#", Character.valueOf('#'), Item.bread, Character.valueOf('%'), Item.egg});
tinyalien.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/tinyalien.png");
ModLoader.addName(tinyalien, "Tiny Alien");
ModLoader.addRecipe(new ItemStack(tinyalien, 1), new Object [] {"#", "%", Character.valueOf('#'), alienflesh, Character.valueOf('%'), Item.diamond});
tinyzombie.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/tinyzombie.png");
ModLoader.addName(tinyzombie, "Tiny Zombie");
ModLoader.addRecipe(new ItemStack(tinyzombie, 1), new Object [] {"#", "%", Character.valueOf('#'), Item.rottenFlesh, Character.valueOf('%'), Item.diamond});
tinysteve.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/tinysteve.png");
ModLoader.addName(tinysteve, "Tiny Steve");
ModLoader.addRecipe(new ItemStack(tinysteve, 1), new Object [] {"#", "%", Character.valueOf('#'), Block.cake, Character.valueOf('%'), tinysteve});
alienflesh.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/alienflesh.png");
ModLoader.addName(alienflesh, "Alien Flesh");
lemon.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/lemon.png");
ModLoader.addName(lemon, "Lemon");
actweegee.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/weegeeicon.png");
ModLoader.addName(actweegee, "Weegeemang Action Figure");
ModLoader.addRecipe(new ItemStack(actweegee, 1), new Object [] {"###", "#%#", "$$$", Character.valueOf('#'), new ItemStack(Item.dyePowder, 1, 4), Character.valueOf('%'), new ItemStack(Item.dyePowder, 1, 3), Character.valueOf('$'), new ItemStack(Block.cloth, 1, 0)});
ivspawner.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/ivspawner.png");
ModLoader.addName(ivspawner, "Innocent Villager");
}
public void addRenderer(Map map)
{
map.put(innocentvillager.class, new RenderBiped(new ModelBiped(), 0.5F));
map.put(tinyzombie2.class, new RenderBiped(new ModelZombie(), 0.5F));
map.put(alienruffian.class, new RenderBiped(new ModelBiped(), 0.5F));
map.put(alienarcher.class, new RenderBiped(new ModelBiped(), 0.5F));
map.put(actweegee2.class, new RenderBiped(new ModelBiped(), 0.5F));
map.put(lemon2.class, new RenderSnowball(lemon.iconIndex));
}
public String getVersion()
{
return "1.2.5";
}
}
mod_AlienBiome (was told to name it this)
package net.minecraft.src;
public class mod_AlienBiome extends BaseMod
{
public static final BiomeGenBase alienbiome = (new alienbiome(25)).setColor(0x000000).setBiomeName("alienbiome");
public void load()
{
ModLoader.addBiome(alienbiome);
}
@Override
public String getVersion() {
// TODO Auto-generated method stub
return "1.2.5";
}
}
alienbiome
package net.minecraft.src;
import java.util.List;
import java.util.Random;
public class alienbiome extends BiomeGenBase
{
public alienbiome(int par1)
{
super(par1);
spawnableCreatureList.clear();
topBlock = (byte)mod_MangMod.aliengrass.blockID;
fillerBlock = (byte)mod_MangMod.aliendirt.blockID;
}
}
alienarcher
package net.minecraft.src;
import java.util.Random;
public class alienarcher extends EntityMob
{
public alienarcher(World world)
{
super(world);
texture = "/mangmod/alienarcher.png";
moveSpeed = 0.3F;
attackStrength = 5;
tasks.addTask(1, new EntityAISwimming(this));
tasks.addTask(2, new EntityAIArrowAttack(this, moveSpeed, 1, 60));
tasks.addTask(3, new EntityAIWander(this, moveSpeed));
tasks.addTask(4, new EntityAIWatchClosest(this, net.minecraft.src.EntityPlayer.class, 8F));
tasks.addTask(4, new EntityAILookIdle(this));
targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, net.minecraft.src.EntityPlayer.class, 16F, 0, true));
}
public boolean isAIEnabled()
{
return true;
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.zombiedeath";
}
protected boolean canDespawn()
{
return false;
}
protected int getDropItemId(){
return mod_MangMod.alienflesh.shiftedIndex;
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(Item.bow, 1);
}
private static final ItemStack defaultHeldItem;
}
alienruffian
package net.minecraft.src;
import java.util.Random;
public class alienruffian extends EntityMob
{
public alienruffian(World world)
{
super(world);
texture = "/mangmod/alienruffian.png";
moveSpeed = 0.8F;
attackStrength = 4;
tasks.addTask(0, new EntityAISwimming(this));
tasks.addTask(1, new EntityAIWander(this, moveSpeed));
tasks.addTask(2, new EntityAIWatchClosest(this, net.minecraft.src.EntityPlayer.class, 8F));
tasks.addTask(3, new EntityAILookIdle(this));
targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, net.minecraft.src.EntityPlayer.class, 16F, 0, true));
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.zombiedeath";
}
protected boolean canDespawn()
{
return false;
}
protected int getDropItemId(){
return mod_MangMod.alienflesh.shiftedIndex;
}
}
I'm trying to make my food item use its own class, but I am getting an error. http://imgur.com/Vi1g3
mod_MangMod
package net.minecraft.src;
import java.util.Map;
import net.minecraft.client.Minecraft;
import java.util.List;
public class mod_MangMod extends BaseMod
{
public static final Block aliengrass = new aliengrass(125, 0).setBlockName("aliengrass").setHardness(0.5F);
public static int aliengrassbottom = ModLoader.addOverride("/terrain.png", "/mangmod/aliengrassbottom.png");
public static int aliengrasstop = ModLoader.addOverride("/terrain.png", "/mangmod/aliengrasstop.png");
public static int aliengrassside = ModLoader.addOverride("/terrain.png", "/mangmod/aliengrassside.png");
public static final Block aliendirt = new aliendirt(126, 0).setBlockName("aliendirt").setHardness(0.5F);
public static final Block alienplank = new alienplank(127, 0).setBlockName("alienplank").setHardness(2F).setResistance(5F);
public static final Block aliencob = new aliencob(128, 0).setBlockName("aliencob").setHardness(2F).setResistance(10F);
public static final Block alienore = new alienore(129, 0).setBlockName("alienore").setHardness(3F).setResistance(5F);
public static final Block alienlog = new alienlog(130, 0).setBlockName("alienlog").setHardness(2F).setResistance(5F);
public static int alienlogbottom = ModLoader.addOverride("/terrain.png", "/mangmod/alienlog1.png");
public static int alienlogtop = ModLoader.addOverride("/terrain.png", "/mangmod/alienlog2.png");
public static int alienlogside = ModLoader.addOverride("/terrain.png", "/mangmod/alienlog3.png");
public static final Block alienleaf = new alienleaf(131, 0).setBlockName("alienleaf").setHardness(2F);
public static final Item cactusjuice = new cactusjuice(5000, 5, 2F, false).setItemName("cactusjuice");
public static final Item applejuice = new ItemFood(5001, 9, 2F, false).setItemName("applejuice");
public static final Item donut = new ItemFood(5002, 4, 2F, false).setItemName("donut");
public static final Item glazeddonut = new ItemFood(5003, 6, 1F, false).setItemName("glazeddonut");
public static final Item diamondbucket = new Item(5004).setItemName("diamondbucket");
public static final Item orange = new ItemFood(5005, 4, 4F, false).setItemName("orange");
public static final Item bacon = new ItemFood(5006, 9, 1F, false).setItemName("bacon");
public static final Item eggsandwich = new ItemFood(5007, 11, 1F, false).setItemName("eggsandwich");
public static final Item tinyalien = new tinyalien(5008).setItemName("tinyalien");
public static final Item tinysteve = new tinysteve(5009).setItemName("tinysteve");
public static final Item tinyzombie = new tinyzombie(5010).setItemName("tinyzombie");
public static final Item alienflesh = new Item(5011).setItemName("alienflesh");
public static final Item lemon = new lemon(5012).setItemName("lemon");
public static final Item actweegee = new actweegee(5013).setItemName("actweegee");
public static final Item ivspawner = new ivspawner(5014).setItemName("ivspawner");
public void load()
{
ModLoader.registerEntityID(innocentvillager.class, "innocentvillager", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(innocentvillager.class, 5, 1, 1, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.plains,
BiomeGenBase.desert,
BiomeGenBase.desertHills,
BiomeGenBase.beach,
BiomeGenBase.extremeHills,
BiomeGenBase.extremeHillsEdge,
BiomeGenBase.forest,
BiomeGenBase.forestHills,
BiomeGenBase.taiga,
BiomeGenBase.taigaHills,
BiomeGenBase.swampland,
BiomeGenBase.river,
BiomeGenBase.jungle,
BiomeGenBase.jungleHills
});
ModLoader.registerEntityID(alienruffian.class, "alienruffian", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(alienruffian.class, 40, 1, 1, EnumCreatureType.creature, new BiomeGenBase[]
{
mod_AlienBiome.alienbiome
});
ModLoader.registerEntityID(alienarcher.class, "alienarcher", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(alienarcher.class, 40, 1, 1, EnumCreatureType.creature, new BiomeGenBase[]
{
mod_AlienBiome.alienbiome
});
ModLoader.registerEntityID(tinyzombie2.class, "Tiny Zombie", ModLoader.getUniqueEntityId());
ModLoader.registerEntityID(actweegee2.class, "actweegee2", ModLoader.getUniqueEntityId());
ModLoader.registerBlock(aliengrass);
ModLoader.addName(aliengrass, "Alien Grass");
aliendirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mangmod/aliendirt.png");
ModLoader.registerBlock(aliendirt);
ModLoader.addName(aliendirt, "Alien Dirt");
alienplank.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mangmod/alienplank.png");
ModLoader.registerBlock(alienplank);
ModLoader.addName(alienplank, "Alien Plank");
aliencob.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mangmod/aliencob.png");
ModLoader.registerBlock(aliencob);
ModLoader.addName(aliencob, "Alien Cobblestone");
alienore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mangmod/alienore.png");
ModLoader.registerBlock(alienore);
ModLoader.addName(alienore, "Uralium Ore");
ModLoader.registerBlock(alienlog);
ModLoader.addName(alienlog, "Alien Log");
alienleaf.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mangmod/alienleaf.png");
ModLoader.registerBlock(alienleaf);
ModLoader.addName(alienleaf, "Alien Leaves");
cactusjuice.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/cactusjuice.png");
ModLoader.addName(cactusjuice, "Cactus Juice");
ModLoader.addRecipe(new ItemStack(cactusjuice, 1), new Object [] {"#", "#", "%", Character.valueOf('#'), Block.cactus, Character.valueOf('%'), Item.glassBottle});
applejuice.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/applejuice.png");
ModLoader.addName(applejuice, "Apple Juice");
ModLoader.addRecipe(new ItemStack(applejuice, 1), new Object [] {"#", "#", "%", Character.valueOf('#'), Item.appleRed, Character.valueOf('%'), Item.glassBottle});
donut.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/donut.png");
ModLoader.addName(donut, "Donut");
ModLoader.addRecipe(new ItemStack(donut, 4), new Object [] {"###", "# #", "###", Character.valueOf('#'), Item.wheat});
glazeddonut.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/glazeddonut.png");
ModLoader.addName(glazeddonut, "Glazed Donut");
ModLoader.addRecipe(new ItemStack(glazeddonut, 1), new Object [] {"#", "%", Character.valueOf('#'), Item.sugar, Character.valueOf('%'), donut});
diamondbucket.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/diamondbucket.png");
ModLoader.addName(diamondbucket, "Diamond Bucket");
ModLoader.addRecipe(new ItemStack(diamondbucket, 1), new Object [] {"# #", " # ", Character.valueOf('#'), Item.diamond});
orange.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/orange.png");
ModLoader.addName(orange, "Orange");
bacon.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/bacon.png");
ModLoader.addName(bacon, "Bacon");
ModLoader.addSmelting(Item.porkCooked.shiftedIndex, new ItemStack(bacon, 1));
eggsandwich.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/eggsandwich.png");
ModLoader.addName(eggsandwich, "Egg Sandwich");
ModLoader.addRecipe(new ItemStack(eggsandwich, 1), new Object [] {"#", "%", "#", Character.valueOf('#'), Item.bread, Character.valueOf('%'), Item.egg});
tinyalien.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/tinyalien.png");
ModLoader.addName(tinyalien, "Tiny Alien");
ModLoader.addRecipe(new ItemStack(tinyalien, 1), new Object [] {"#", "%", Character.valueOf('#'), alienflesh, Character.valueOf('%'), Item.diamond});
tinyzombie.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/tinyzombie.png");
ModLoader.addName(tinyzombie, "Tiny Zombie");
ModLoader.addRecipe(new ItemStack(tinyzombie, 1), new Object [] {"#", "%", Character.valueOf('#'), Item.rottenFlesh, Character.valueOf('%'), Item.diamond});
tinysteve.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/tinysteve.png");
ModLoader.addName(tinysteve, "Tiny Steve");
ModLoader.addRecipe(new ItemStack(tinysteve, 1), new Object [] {"#", "%", Character.valueOf('#'), Block.cake, Character.valueOf('%'), tinysteve});
alienflesh.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/alienflesh.png");
ModLoader.addName(alienflesh, "Alien Flesh");
lemon.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/lemon.png");
ModLoader.addName(lemon, "Lemon");
actweegee.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/weegeeicon.png");
ModLoader.addName(actweegee, "Weegeemang Action Figure");
ModLoader.addRecipe(new ItemStack(actweegee, 1), new Object [] {"###", "#%#", "$$$", Character.valueOf('#'), new ItemStack(Item.dyePowder, 1, 4), Character.valueOf('%'), new ItemStack(Item.dyePowder, 1, 3), Character.valueOf('$'), new ItemStack(Block.cloth, 1, 0)});
ivspawner.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/ivspawner.png");
ModLoader.addName(ivspawner, "Innocent Villager");
}
public void addRenderer(Map map)
{
map.put(innocentvillager.class, new RenderBiped(new ModelBiped(), 0.5F));
map.put(tinyzombie2.class, new RenderBiped(new ModelZombie(), 0.5F));
map.put(alienruffian.class, new RenderBiped(new ModelBiped(), 0.5F));
map.put(alienarcher.class, new RenderBiped(new ModelBiped(), 0.5F));
map.put(actweegee2.class, new RenderBiped(new ModelBiped(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
cactusjuice
package net.minecraft.src;
public class cactusjuice extends ItemFood
{
public cactusjuice(int i, int j, boolean
{
super(i, j, B);
}
public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
super.onFoodEaten(par1ItemStack, par2World, par3EntityPlayer);
return new ItemStack(Item.glassBottle);
}
}
For peat's sake...how many times do I have to come to this topic? ._.
ANYWAY. I am trying to make an NPC run from you when yo come near him, and he should run as fast as the player. When I started using his code, I had movespeed set to 0.8f, and after a few other tests, he is now set 10f, but he isn't any faster. What the heck is going on? o_o
package net.minecraft.src;
import java.util.Random;
public class innocentvillager extends EntityCreature
{
public innocentvillager(World world)
{
super(world);
texture = "/mangmod/iv.png";
moveSpeed = 10F;
tasks.addTask(0, new EntityAIAvoidEntity(this, net.minecraft.src.EntityPlayer.class, 20F, 0.25F, 0.3F));
tasks.addTask(1, new EntityAIAvoidEntity(this, net.minecraft.src.EntityMob.class, 20F, 0.25F, 0.3F));
tasks.addTask(2, new EntityAIWatchClosest(this, net.minecraft.src.EntityPlayer.class, 30F));
tasks.addTask(3, new EntityAIWatchClosest(this, net.minecraft.src.EntityMob.class, 30F));
tasks.addTask(4, new EntityAISwimming(this));;
tasks.addTask(5, new EntityAIWander(this, 0.2F));
tasks.addTask(6, new EntityAILookIdle(this));
tasks.addTask(7, new EntityAIOpenDoor(this, true));
}
public boolean isAIEnabled()
{
return true;
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
protected int getDropItemId(){
return Item.appleRed.shiftedIndex;
}
protected boolean canDespawn()
{
return false;
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(Item.appleRed, 1);
}
private static final ItemStack defaultHeldItem;
}
Of course I'm going to add stuff I want...it's just going to be a community-driven mod as well. Thanks for your support. I might have releasable beta in a week or two.
Oi...for an Innocent Villager, this guy isn't so innocent. So I go test him and he won't flee from mobs (I don't think so anyway) and won't flee from me (could creative mode be doing that?) He SHOULD flee 16 blocks away from any mob/player. Any help?
innocentvillager
package net.minecraft.src;
import java.util.Random;
public class innocentvillager extends EntityCreature
{
public innocentvillager(World world)
{
super(world);
texture = "/mangmod/iv.png";
moveSpeed = 0.8F;
tasks.addTask(0, new EntityAISwimming(this));;
tasks.addTask(1, new EntityAIWander(this, 0.2F));
tasks.addTask(2, new EntityAIWatchClosest(this, net.minecraft.src.EntityPlayer.class, 20F));
tasks.addTask(3, new EntityAIWatchClosest(this, net.minecraft.src.EntityMob.class, 20F));
tasks.addTask(4, new EntityAILookIdle(this));
tasks.addTask(5, new EntityAIOpenDoor(this, true));
tasks.addTask(6, new EntityAIAvoidEntity(this, net.minecraft.src.EntityMob.class, 16F, 0.25F, 0.3F));
tasks.addTask(7, new EntityAIAvoidEntity(this, net.minecraft.src.EntityPlayer.class, 16F, 0.25F, 0.3F));
}
public boolean isAIEnabled()
{
return true;
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
protected int getDropItemId(int i, Random random, int j)
{
if (i == 0)
{
return Item.appleRed.shiftedIndex;
}
if (i == 1)
{
return mod_MangMod.orange.shiftedIndex;
}
if (i == 2)
{
return Item.melon.shiftedIndex;
}
if (i == 3)
{
return mod_MangMod.lemon.shiftedIndex;
}
if (i == 4)
{
return Block.pumpkin.blockID;
}
else
{
return 0;
}
}
protected boolean canDespawn()
{
return false;
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(Item.appleRed, 1);
}
private static final ItemStack defaultHeldItem;
}
Oi...for an Innocent Villager, this guy isn't so innocent. So I go test him and he won't flee from mobs (I don't think so anyway) and won't flee from me (could creative mode be doing that?) He SHOULD flee 16 blocks away from any mob/player. Any help?
innocentvillager
package net.minecraft.src;
import java.util.Random;
public class innocentvillager extends EntityCreature
{
public innocentvillager(World world)
{
super(world);
texture = "/mangmod/iv.png";
moveSpeed = 0.8F;
tasks.addTask(0, new EntityAISwimming(this));;
tasks.addTask(1, new EntityAIWander(this, 0.2F));
tasks.addTask(2, new EntityAIWatchClosest(this, net.minecraft.src.EntityPlayer.class, 20F));
tasks.addTask(3, new EntityAIWatchClosest(this, net.minecraft.src.EntityMob.class, 20F));
tasks.addTask(4, new EntityAILookIdle(this));
tasks.addTask(5, new EntityAIOpenDoor(this, true));
tasks.addTask(6, new EntityAIAvoidEntity(this, net.minecraft.src.EntityMob.class, 16F, 0.25F, 0.3F));
tasks.addTask(7, new EntityAIAvoidEntity(this, net.minecraft.src.EntityPlayer.class, 16F, 0.25F, 0.3F));
}
public boolean isAIEnabled()
{
return true;
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
protected int getDropItemId(int i, Random random, int j)
{
if (i == 0)
{
return Item.appleRed.shiftedIndex;
}
if (i == 1)
{
return mod_MangMod.orange.shiftedIndex;
}
if (i == 2)
{
return Item.melon.shiftedIndex;
}
if (i == 3)
{
return mod_MangMod.lemon.shiftedIndex;
}
if (i == 4)
{
return Block.pumpkin.blockID;
}
else
{
return 0;
}
}
protected boolean canDespawn()
{
return false;
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(Item.appleRed, 1);
}
private static final ItemStack defaultHeldItem;
}
Sorry, I don't think that code works for entities, just for blocks with damage values. Meaning if the damage value is 0 it will drop a red apple, if the damage value equals to 1, it will drop an orange. For entities, you should look in either EntityCow or EntitySpider.
Ok, but what about him not running like he is supposed to?
Oi...for an Innocent Villager, this guy isn't so innocent. So I go test him (no errors) and now he doesn't drop anything. AND, he won't flee from mobs (I don't think so anyway) and won't flee from me (could creative mode be doing that?) He SHOULD flee 16 blocks away from any mob/player. Any help?
innocentvillager
package net.minecraft.src;
import java.util.Random;
public class innocentvillager extends EntityCreature
{
public innocentvillager(World world)
{
super(world);
texture = "/mangmod/iv.png";
moveSpeed = 0.8F;
tasks.addTask(0, new EntityAISwimming(this));;
tasks.addTask(1, new EntityAIWander(this, 0.2F));
tasks.addTask(2, new EntityAIWatchClosest(this, net.minecraft.src.EntityPlayer.class, 20F));
tasks.addTask(3, new EntityAIWatchClosest(this, net.minecraft.src.EntityMob.class, 20F));
tasks.addTask(4, new EntityAILookIdle(this));
tasks.addTask(5, new EntityAIOpenDoor(this, true));
tasks.addTask(6, new EntityAIAvoidEntity(this, net.minecraft.src.EntityMob.class, 16F, 0.25F, 0.3F));
tasks.addTask(7, new EntityAIAvoidEntity(this, net.minecraft.src.EntityPlayer.class, 16F, 0.25F, 0.3F));
}
public boolean isAIEnabled()
{
return true;
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
protected int getDropItemId(int i, Random random, int j)
{
if (i == 0)
{
return Item.appleRed.shiftedIndex;
}
if (i == 1)
{
return mod_MangMod.orange.shiftedIndex;
}
if (i == 2)
{
return Item.melon.shiftedIndex;
}
if (i == 3)
{
return mod_MangMod.lemon.shiftedIndex;
}
if (i == 4)
{
return Block.pumpkin.blockID;
}
else
{
return 0;
}
}
protected boolean canDespawn()
{
return false;
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(Item.appleRed, 1);
}
private static final ItemStack defaultHeldItem;
}
0
0
mod_MangMod
mod_AlienBiome (was told to name it this)
alienbiome
alienarcher
alienruffian
0
0
mod_MangMod
cactusjuice
0
0
ANYWAY. I am trying to make an NPC run from you when yo come near him, and he should run as fast as the player. When I started using his code, I had movespeed set to 0.8f, and after a few other tests, he is now set 10f, but he isn't any faster. What the heck is going on? o_o
0
EDIT: It works!!! Thanks guys!
0
0
0
0
0
Bumpedy Bump Bump.
0
Bumpedy Bump.
0
Ok, but what about him not running like he is supposed to?
0
innocentvillager