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?
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?
Alrighty, I can try and help with that.
Mainly, you just need to move these two bits of code back to your mod_MangMod class:
//Put me near your block and item Declarations
public static final BiomeGenBase alienbiome = (new alienbiome(25)).setColor(0x000000).setBiomeName("alienbiome");
//Put me in public void load
ModLoader.addBiome(alienbiome);
Once you've done that, delete your mod_AlienBiome class.
If you get an error once you've done this, post the error along side your mod_MangMod class.
Mods loaded: 1
ModLoader 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 9f578458 --------
Generated 6/24/12 1:25 PM
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0_03, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Intel Bear Lake B version 1.4.0 - Build 8.14.10.1930, Intel
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at net.minecraft.src.alienbiome.<init>(alienbiome.java:12)
at net.minecraft.src.mod_MangMod.<clinit>(mod_MangMod.java:7)
... 15 more
--- END ERROR REPORT 4117231a ----------
mod_MangMod (the one and only mod_ now)
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 BiomeGenBase alienbiome = (new alienbiome(25)).setColor(0x000000).setBiomeName("alienbiome");
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.addBiome(alienbiome);
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[]
{
alienbiome
});
ModLoader.registerEntityID(alienarcher.class, "alienarcher", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(alienarcher.class, 70, 1, 1, EnumCreatureType.creature, new BiomeGenBase[]
{
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");
ModLoader.addRecipe(new ItemStack(alienplank, 4), new Object [] {"#", Character.valueOf('#'), alienlog});
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");
ModLoader.addSmelting(aliencob.blockID, new ItemStack(alienstone, 1));
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";
}
}
Hi i am wondering if anyone can help me with this bit of code
public static final Item BlackberrySeeds = new ItemBlackberrySeeds(2500,
BlackberrySeeds.blockID, Block.tilledField.blockID)
.setItemName("BlackberrySeeds");
It says ItemBlackberrySeeds cannot be resolved to a type
Please help also this is my mod_ file
package net.minecraft.src;
public class mod_Blackberrys extends BaseMod {
// Just a standard block.
public static final Block Blackberrycrop = new BlockCropBlackberry(165, 0)
.setBlockName("BlackberryCrop");
// This is a fairly standard item but it has two new arguments. The first is
// the block it plants, in this case is our new crop "cropNameHere". The
// second is the block that is required to be right clicked on to plant the
// seeds.
// We are using tilled field/dirt for this crop but you can change it to
// whatever you like. Remember to change it in the block class as well.
public static final Item BlackberrySeeds = new ItemBlackberrySeeds(2500,
BlackberrySeeds.blockID, Block.tilledField.blockID)
.setItemName("BlackberrySeeds");
// These static ints are the textures of the crop in its various stages of
// growth.
public static int cropStageOne = ModLoader.addOverride("/terrain.png",
"/stageOne.png");
public static int cropStageTwo = ModLoader.addOverride("/terrain.png",
"/stageTwo.png");
public static int cropStageThree = ModLoader.addOverride("/terrain.png",
"/stageThree.png");
public static int cropStageFour = ModLoader.addOverride("/terrain.png",
"/stageFour.png");
public static int cropStageFive = ModLoader.addOverride("/terrain.png",
"/stageFive.png");
public static int cropStageSix = ModLoader.addOverride("/terrain.png",
"/stageSix.png");
public static int cropStageSeven = ModLoader.addOverride("/terrain.png",
"/stageSeven.png");
public static int cropStageEight = ModLoader.addOverride("/terrain.png",
"/stageEight.png");
public void load() {
Blackberrycrop.blockIndexInTexture = ModLoader.addOverride(
"/terrain.png", "/crop.png");
ModLoader.registerBlock(Blackberrycrop);
ModLoader.addName(Blackberrycrop, "Blackberry crop");
BlackberrySeeds.iconIndex = ModLoader.addOverride("/gui/items.png",
"/seeds.png");
ModLoader.addName(BlackberrySeeds, "Blackberry Seeds");
ModLoader.addRecipe(new ItemStack(BlackberrySeeds), new Object[] { "#",
'#', Block.dirt });
}
public String getVersion() {
return "1.2.5";
}
}
Im going along in the tutorial, but, I've ran into a problem:
there is a bug in my mod that prevents me from eating BeefStew
the main mod code:
package net.minecraft.src;
public class mod_Block extends BaseMod
{
public static final Block CobblestoneBrick = new BlockCobblestoneBrick(161, 0).setHardness(2.5F).setResistance(3F).setBlockName("Cobblestone Brick");
public static final Item GoldCoin = new Item(5000).setItemName("Gold Coin");
public static final Item BeefStew = new ItemFood(5001, 8, 1F, false).setItemName("Beef Stew");
public void load()
{
CobblestoneBrick.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/CobblestoneBrick.png");
ModLoader.registerBlock(CobblestoneBrick);
ModLoader.addName(CobblestoneBrick, "Cobblestone Brick");
ModLoader.addRecipe(new ItemStack(CobblestoneBrick, 4), new Object [] {"##", "##", Character.valueOf('#'), Block.cobblestone});
GoldCoin.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/GoldCoin.png");
ModLoader.addName(GoldCoin, "Gold Coin");
ModLoader.addRecipe(new ItemStack(GoldCoin, 8), new Object [] {"GG", Character.valueOf('G'), Item.ingotGold});
BeefStew.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/Beefsoup.png");
ModLoader.addName(BeefStew, "Beef Stew");
ModLoader.addRecipe(new ItemStack(BeefStew, 1), new Object [] {"B", "O", "U", Character.valueOf('B'), Item.beefRaw, Character.valueOf('O'), Block.mushroomBrown, Character.valueOf('U'), Item.bowlEmpty});
//ModLoader.addRecipe(new ItemStack(BeefStew, 1), new Object [] {"B", "O", "U", Character.valueOf('#'), Item.beefRaw, Character.valueOf('O'), Block.mushroomRed, Item.bowlEmpty, Character.valueOf('O')});
}
public String getVersion()
{
return "1.2.5";
}
}
the BeefStrew code:
package net.minecraft.src;
public class ItemBeefStew extends ItemFood
{
public ItemBeefStew(int i)
{
super(i);
maxStackSize = 1;
}
public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
super.onFoodEaten(par1ItemStack, par2World, par3EntityPlayer);
return new ItemStack(Item.bowlEmpty);
}
}
eclipse tells me there is a way to fix this by adding an argument to ItemFood, but that will change the base class and I don't want to do that, neither is it recommended
Im going along in the tutorial, but, I've ran into a problem:
there is a bug in my mod that prevents me from eating BeefStew
the main mod code:
package net.minecraft.src;
public class mod_Block extends BaseMod
{
public static final Block CobblestoneBrick = new BlockCobblestoneBrick(161, 0).setHardness(2.5F).setResistance(3F).setBlockName("Cobblestone Brick");
public static final Item GoldCoin = new Item(5000).setItemName("Gold Coin");
public static final Item BeefStew = new ItemFood(5001, 8, 1F, false).setItemName("Beef Stew");
public void load()
{
CobblestoneBrick.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/CobblestoneBrick.png");
ModLoader.registerBlock(CobblestoneBrick);
ModLoader.addName(CobblestoneBrick, "Cobblestone Brick");
ModLoader.addRecipe(new ItemStack(CobblestoneBrick, 4), new Object [] {"##", "##", Character.valueOf('#'), Block.cobblestone});
GoldCoin.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/GoldCoin.png");
ModLoader.addName(GoldCoin, "Gold Coin");
ModLoader.addRecipe(new ItemStack(GoldCoin, 8), new Object [] {"GG", Character.valueOf('G'), Item.ingotGold});
BeefStew.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/Beefsoup.png");
ModLoader.addName(BeefStew, "Beef Stew");
ModLoader.addRecipe(new ItemStack(BeefStew, 1), new Object [] {"B", "O", "U", Character.valueOf('B'), Item.beefRaw, Character.valueOf('O'), Block.mushroomBrown, Character.valueOf('U'), Item.bowlEmpty});
//ModLoader.addRecipe(new ItemStack(BeefStew, 1), new Object [] {"B", "O", "U", Character.valueOf('#'), Item.beefRaw, Character.valueOf('O'), Block.mushroomRed, Item.bowlEmpty, Character.valueOf('O')});
}
public String getVersion()
{
return "1.2.5";
}
}
the BeefStrew code:
package net.minecraft.src;
public class ItemBeefStew extends ItemFood
{
public ItemBeefStew(int i)
{
super(i);
maxStackSize = 1;
}
public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
super.onFoodEaten(par1ItemStack, par2World, par3EntityPlayer);
return new ItemStack(Item.bowlEmpty);
}
}
eclipse tells me there is a way to fix this by adding an argument to ItemFood, but that will change the base class and I don't want to do that, neither is it recommended
thanks in advance for help
Change
public static final Item BeefStew = new ItemFood(5001, 8, 1F, false).setItemName("Beef Stew");
to
public static final Item BeefStew = new BeefStew(5001, 8, false).setItemName("Beef Stew");
This might not solve your problem, but the code needs to properly reference its class if you want it to leave a bowl when it is eaten.
public static final Item BeefStew = new ItemFood(5001, 8, 1F, false).setItemName("Beef Stew");
to
public static final Item BeefStew = new BeefStew(5001, 8, false).setItemName("Beef Stew");
This might not solve your problem, but the code needs to properly reference its class if you want it to leave a bowl when it is eaten.
thanks, but now I got an error:
Mods loaded: 1
ModLoader 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 9f578458 --------
Generated 6/25/12 12:40 AM
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.6.0_25, Sun Microsystems Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 3450 version 2.1.8787, ATI Technologies Inc.
java.lang.Error: Unresolved compilation problem:
The constructor ItemBeefStew(int, int, boolean) is undefined
at net.minecraft.src.mod_Block.<init>(mod_Block.java:8)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 20cc1811 ----------
Mods loaded: 1
ModLoader 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 9f578458 --------
Generated 6/24/12 1:25 PM
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0_03, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Intel Bear Lake B version 1.4.0 - Build 8.14.10.1930, Intel
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at net.minecraft.src.alienbiome.<init>(alienbiome.java:12)
at net.minecraft.src.mod_MangMod.<clinit>(mod_MangMod.java:7)
... 15 more
--- END ERROR REPORT 4117231a ----------
mod_MangMod (the one and only mod_ now)
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 BiomeGenBase alienbiome = (new alienbiome(25)).setColor(0x000000).setBiomeName("alienbiome");
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.addBiome(alienbiome);
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[]
{
alienbiome
});
ModLoader.registerEntityID(alienarcher.class, "alienarcher", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(alienarcher.class, 70, 1, 1, EnumCreatureType.creature, new BiomeGenBase[]
{
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");
ModLoader.addRecipe(new ItemStack(alienplank, 4), new Object [] {"#", Character.valueOf('#'), alienlog});
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");
ModLoader.addSmelting(aliencob.blockID, new ItemStack(alienstone, 1));
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";
}
}
I need help, there are no coding errors and i've double checked everything but no matter what i cant get my NPC's to hold ANY items please help.. much appreciated thanks!
any plans to make these tutorials in video form for the super newbs that still can't figure it out? (like myself) I know this may seem extremely inept but i still don't know if i need to create a new class for each mod_Block or what? i'm extemely lost and i've even looked at the link for additional help that was posted on the OP. I haven't even been able to get past to creating of the class for the Mod_modname... If anyone could give me detailed assistance i would be very appreciative.
Mods loaded: 1
ModLoader 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 9f578458 --------
Generated 6/24/12 1:25 PM
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0_03, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Intel Bear Lake B version 1.4.0 - Build 8.14.10.1930, Intel
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at net.minecraft.src.alienbiome.<init>(alienbiome.java:12)
at net.minecraft.src.mod_MangMod.<clinit>(mod_MangMod.java:7)
... 15 more
--- END ERROR REPORT 4117231a ----------
mod_MangMod (the one and only mod_ now)
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 BiomeGenBase alienbiome = (new alienbiome(25)).setColor(0x000000).setBiomeName("alienbiome");
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.addBiome(alienbiome);
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[]
{
alienbiome
});
ModLoader.registerEntityID(alienarcher.class, "alienarcher", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(alienarcher.class, 70, 1, 1, EnumCreatureType.creature, new BiomeGenBase[]
{
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");
ModLoader.addRecipe(new ItemStack(alienplank, 4), new Object [] {"#", Character.valueOf('#'), alienlog});
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");
ModLoader.addSmelting(aliencob.blockID, new ItemStack(alienstone, 1));
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";
}
}
Wow...I keep being covered up by other posts...help please!
I think there is a bug with mine, that causes saturation to never go down :/
any idea for what number I should set for my food, I want to have the same saturation as mushroom soup
package net.minecraft.src;
public class ItemBeefStew extends ItemFood
{
public ItemBeefStew(int i)
{
super(i, 8, 1F, false);
maxStackSize = 1;
}
public ItemStack onFoodEaten(ItemStack itemStack, World world, EntityPlayer entityPlayer)
{
entityPlayer.getFoodStats().addStats(this);
world.playSoundAtEntity(entityPlayer, "random.burp", 0.5F, world.rand.nextFloat() * 0.1F + 0.9F);
itemStack.stackSize--;
entityPlayer.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 60 * 20, 0));
entityPlayer.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 60 * 20, 0));
return new ItemStack(Item.bowlEmpty);
}
}
My mod isnt working and i cant find what is wrong with it. Can someone help? It shows a Leather Cap where its supposed to be on creative.
package net.minecraft.src;
public class mod_ChocolateMilk extends BaseMod
{
public static final Item CM = (new ItemFood(3000, 6, 2F, false)).setItemName("ChocolateMilk"); [color=#ff0000]//No Spaces[/color]
public void load()
{
CM.iconIndex = ModLoader.addOverride("/gui/items.png", "/Modpics/chocolatemilkmod.png");[color=#ff0000]//I Would ReName files So That They Have No Spaces[/color]
ModLoader.addName(CM, "Chocolate Milk");
ModLoader.addRecipe(new ItemStack(CM, 1), new Object [] {"", "%$", "", Character.valueOf('%'), Item.bucketMilk, Character.valueOf('$'), new ItemStack(Item.dyePowder, 1, 3)});
}
public String getVersion()
{
return "1.2.5";
}
}
Mods loaded: 1
ModLoader 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 9f578458 --------
Generated 6/24/12 1:25 PM
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0_03, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Intel Bear Lake B version 1.4.0 - Build 8.14.10.1930, Intel
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at net.minecraft.src.alienbiome.<init>(alienbiome.java:12)
at net.minecraft.src.mod_MangMod.<clinit>(mod_MangMod.java:7)
... 15 more
--- END ERROR REPORT 4117231a ----------
mod_MangMod (the one and only mod_ now)
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 BiomeGenBase alienbiome = (new alienbiome(25)).setColor(0x000000).setBiomeName("alienbiome");
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.addBiome(alienbiome);
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[]
{
alienbiome
});
ModLoader.registerEntityID(alienarcher.class, "alienarcher", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(alienarcher.class, 70, 1, 1, EnumCreatureType.creature, new BiomeGenBase[]
{
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");
ModLoader.addRecipe(new ItemStack(alienplank, 4), new Object [] {"#", Character.valueOf('#'), alienlog});
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");
ModLoader.addSmelting(aliencob.blockID, new ItemStack(alienstone, 1));
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";
}
}
Help pplleeaassee? This isn't a "I can't make a block, hurr durr" post, I can't test my mod because of a crash. Help will get +1s.
Help pplleeaassee? This isn't a "I can't make a block, hurr durr" post, I can't test my mod because of a crash. Help will get +1s.
Stop being so impatient, the reason that you don't get a reply is because none of the people who are just trying to give techguy a little help know how to fix your problem, if you are not content to wait please go and post a topic in mod development, otherwise, try to be more patient please.
-Thank You-
Note: the reason that I reply to the following is because I know (or a least think I know) how to fix this persons problem, but I don't know how to fix yours, so I can't help you (Sorry)
Although, after looking closely at your code, I believe that you need to make your own render file instead of just having a render snowball, I believe that render files are very specific, but I could be wrong.
I need help with something.. there are no coding issues but for some reason i CANNOT can any of my NPCs to hold ANY item... please help? much appreciated to anyone whom can help thank you...
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
-
View User Profile
-
View Posts
-
Send Message
Curse Premium-
View User Profile
-
View Posts
-
Send Message
Retired StaffAlrighty, I can try and help with that.
Mainly, you just need to move these two bits of code back to your mod_MangMod class:
//Put me near your block and item Declarations public static final BiomeGenBase alienbiome = (new alienbiome(25)).setColor(0x000000).setBiomeName("alienbiome");Once you've done that, delete your mod_AlienBiome class.
If you get an error once you've done this, post the error along side your mod_MangMod class.
-
View User Profile
-
View Posts
-
Send Message
Curse Premiummod_MangMod (the one and only mod_ now)
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 BiomeGenBase alienbiome = (new alienbiome(25)).setColor(0x000000).setBiomeName("alienbiome"); 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.addBiome(alienbiome); 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[] { alienbiome }); ModLoader.registerEntityID(alienarcher.class, "alienarcher", ModLoader.getUniqueEntityId()); ModLoader.addSpawn(alienarcher.class, 70, 1, 1, EnumCreatureType.creature, new BiomeGenBase[] { 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"); ModLoader.addRecipe(new ItemStack(alienplank, 4), new Object [] {"#", Character.valueOf('#'), alienlog}); 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"); ModLoader.addSmelting(aliencob.blockID, new ItemStack(alienstone, 1)); 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"; } }You need to make an ItemBlackberrySeeds class
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumthere is a bug in my mod that prevents me from eating BeefStew
the main mod code:
package net.minecraft.src; public class mod_Block extends BaseMod { public static final Block CobblestoneBrick = new BlockCobblestoneBrick(161, 0).setHardness(2.5F).setResistance(3F).setBlockName("Cobblestone Brick"); public static final Item GoldCoin = new Item(5000).setItemName("Gold Coin"); public static final Item BeefStew = new ItemFood(5001, 8, 1F, false).setItemName("Beef Stew"); public void load() { CobblestoneBrick.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/CobblestoneBrick.png"); ModLoader.registerBlock(CobblestoneBrick); ModLoader.addName(CobblestoneBrick, "Cobblestone Brick"); ModLoader.addRecipe(new ItemStack(CobblestoneBrick, 4), new Object [] {"##", "##", Character.valueOf('#'), Block.cobblestone}); GoldCoin.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/GoldCoin.png"); ModLoader.addName(GoldCoin, "Gold Coin"); ModLoader.addRecipe(new ItemStack(GoldCoin, 8), new Object [] {"GG", Character.valueOf('G'), Item.ingotGold}); BeefStew.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/Beefsoup.png"); ModLoader.addName(BeefStew, "Beef Stew"); ModLoader.addRecipe(new ItemStack(BeefStew, 1), new Object [] {"B", "O", "U", Character.valueOf('B'), Item.beefRaw, Character.valueOf('O'), Block.mushroomBrown, Character.valueOf('U'), Item.bowlEmpty}); //ModLoader.addRecipe(new ItemStack(BeefStew, 1), new Object [] {"B", "O", "U", Character.valueOf('#'), Item.beefRaw, Character.valueOf('O'), Block.mushroomRed, Item.bowlEmpty, Character.valueOf('O')}); } public String getVersion() { return "1.2.5"; } }the BeefStrew code:
package net.minecraft.src; public class ItemBeefStew extends ItemFood { public ItemBeefStew(int i) { super(i); maxStackSize = 1; } public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { super.onFoodEaten(par1ItemStack, par2World, par3EntityPlayer); return new ItemStack(Item.bowlEmpty); } }eclipse tells me there is a way to fix this by adding an argument to ItemFood, but that will change the base class and I don't want to do that, neither is it recommended
thanks in advance for help
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumChange
public static final Item BeefStew = new ItemFood(5001, 8, 1F, false).setItemName("Beef Stew");to
public static final Item BeefStew = new BeefStew(5001, 8, false).setItemName("Beef Stew");This might not solve your problem, but the code needs to properly reference its class if you want it to leave a bowl when it is eaten.
thanks, but now I got an error:
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumHelp please? I can't play my mod...
-
View User Profile
-
View Posts
-
Send Message
Retired Staff-
View User Profile
-
View Posts
-
Send Message
Curse PremiumWow...I keep being covered up by other posts...help please!
any idea for what number I should set for my food, I want to have the same saturation as mushroom soup
package net.minecraft.src; public class ItemBeefStew extends ItemFood { public ItemBeefStew(int i) { super(i, 8, 1F, false); maxStackSize = 1; } public ItemStack onFoodEaten(ItemStack itemStack, World world, EntityPlayer entityPlayer) { entityPlayer.getFoodStats().addStats(this); world.playSoundAtEntity(entityPlayer, "random.burp", 0.5F, world.rand.nextFloat() * 0.1F + 0.9F); itemStack.stackSize--; entityPlayer.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 60 * 20, 0)); entityPlayer.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 60 * 20, 0)); return new ItemStack(Item.bowlEmpty); } }package net.minecraft.src; public class mod_ChocolateMilk extends BaseMod { public static final Item CM = (new ItemFood(3000, 6, 2F, false)).setItemName("Chocolate Milk"); public void load() { CM.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod pics/chocolate milk mod.png"); ModLoader.addName(CM, "Chocolate Milk"); ModLoader.addRecipe(new ItemStack(CM, 1), new Object [] {"", "%$", "", Character.valueOf('%'), Item.bucketMilk, Character.valueOf('$'), new ItemStack(Item.dyePowder, 1, 3)}); } public String getVersion() { return "1.2.5"; } }What I Tryed Worked And I Put It In Red.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumHelp pplleeaassee? This isn't a "I can't make a block, hurr durr" post, I can't test my mod because of a crash. Help will get +1s.
mod_SuperDiamondTools
package net.minecraft.src; public class mod_SuperDiamondTools extends BaseMod { public static final Item SuperDiamondsword = new SuperDiamondSword(2003, EnumToolSuperDiamond.SuperDiamond).setItemName("Super Diamond sword"); { SuperDiamondsword.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/Reinforced Diamond Sword.png"); ModLoader.addName(SuperDiamondsword, "Super Diamond sword"); ModLoader.addRecipe(new ItemStack(SuperDiamondsword, 1), new Object [] {"#", "#", "%", Character.valueOf ('#'), SuperDiamond, Character.valueOf ('%'), Item.stick}); } public String getVersion() { return "1.2.5"; } @Override public void load() { // TODO Auto-generated method stub } }-
View User Profile
-
View Posts
-
Send Message
Curse PremiumStop being so impatient, the reason that you don't get a reply is because none of the people who are just trying to give techguy a little help know how to fix your problem, if you are not content to wait please go and post a topic in mod development, otherwise, try to be more patient please.
-Thank You-
Note: the reason that I reply to the following is because I know (or a least think I know) how to fix this persons problem, but I don't know how to fix yours, so I can't help you (Sorry)
Although, after looking closely at your code, I believe that you need to make your own render file instead of just having a render snowball, I believe that render files are very specific, but I could be wrong.
You need to have the following stuff in the load() method:
SuperDiamondsword.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/Reinforced Diamond Sword.png"); ModLoader.addName(SuperDiamondsword, "Super Diamond sword"); ModLoader.addRecipe(new ItemStack(SuperDiamondsword, 1), new Object [] {"#", "#", "%", Character.valueOf ('#'), SuperDiamond, Character.valueOf ('%'), Item.stick});so your code should look like this:
package net.minecraft.src; public class mod_SuperDiamondTools extends BaseMod { public static final Item SuperDiamondsword = new SuperDiamondSword(2003, EnumToolSuperDiamond.SuperDiamond).setItemName("Super Diamond sword"); public void load() { SuperDiamondsword.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/Reinforced Diamond Sword.png"); ModLoader.addName(SuperDiamondsword, "Super Diamond sword"); ModLoader.addRecipe(new ItemStack(SuperDiamondsword, 1), new Object [] {"#", "#", "%", Character.valueOf ('#'), SuperDiamond, Character.valueOf ('%'), Item.stick}); } public String getVersion() { return "1.2.5"; } }