still get the same error :sad.gif: Thanks for helping anyway
error(again):
== MCP v4.3 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.7.0\bin\javac.exe" -g -verbose -classpath "lib/;lib/
*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_u
til.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft\net\minecraft\
client\*.java src/minecraft\net\minecraft\isom\*.java src/minecraft\net\minecraf
t\src\*.java conf/patches/*.java failed.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_foods.java:15: error: cannot find symbol
"*","X","*", Character.valueOf('*'), Item.bread, Character.valueOf('X'), Item.meat
^
symbol: variable meat
location: class Item
1 error
==================
> Done in 11.11 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
You don't call the "meat" instance variable from Item.class, you call it from whatever class you instantiated it in. In this case, your mod_ file. It might look like this:
I get the following runtime error whenever i run minecraft:
Mods loaded: 14
ModLoader Beta 1.8.1
net.minecraft.src.mod_blackFlower 1.8.1
net.minecraft.src.mod_bluelightFlower 1.8.1
net.minecraft.src.mod_brownFlower 1.8.1
net.minecraft.src.mod_cyanFlower 1.8.1
net.minecraft.src.mod_Flower 1.8.1
net.minecraft.src.mod_greendarkFlower 1.8.1
net.minecraft.src.mod_greenFlower 1.8.1
net.minecraft.src.mod_greyFlower 1.8.1
net.minecraft.src.mod_greylightFlower 1.8.1
net.minecraft.src.mod_magentaFlower 1.8.1
net.minecraft.src.mod_orangeFlower 1.8.1
net.minecraft.src.mod_pinkFlower 1.8.1
net.minecraft.src.mod_purpleFlower 1.8.1
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT e6c7abc1 --------
Generated 9/24/11 5:18 PM
Minecraft: Minecraft Beta 1.8.1
OS: Windows Vista (x86) version 6.0
Java: 1.7.0, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: GeForce GT 330M/PCI/SSE2 version 3.3.0, NVIDIA Corporation
java.lang.StringIndexOutOfBoundsException: String index out of range: 7
at java.lang.String.charAt(String.java:695)
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:276)
at net.minecraft.src.ModLoader.AddRecipe(ModLoader.java:330)
at net.minecraft.src.mod_rainbowFlower.<init>(mod_rainbowFlower.java:25)
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:224)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1027)
at net.minecraft.src.ModLoader.init(ModLoader.java:692)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:121)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:72)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:168)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:140)
at net.minecraft.client.Minecraft.run(Minecraft.java:438)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT ddfcbd08 ----------
with the following code:
package net.minecraft.src;
import java.util.Random;
public class mod_rainbowFlower extends BaseMod
{
public static Block rainbow;
public static Block potflower;
public mod_rainbowFlower()
{
rainbow = new BlockFlower(255, ModLoader.addOverride("/terrain.png", "/MoreFlowersMod/RainbowFlower.png")).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setBlockName("rainbow");
potflower = new Blockpotflower(244, ModLoader.addOverride("/terrain.png", "/MoreFlowersMod/RainbowFlower.png")).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setBlockName("potflower");
ModLoader.RegisterBlock(rainbow);
ModLoader.RegisterBlock(potflower);
ModLoader.AddName(rainbow, "Rainbow Flower");
ModLoader.AddName(potflower, "Flower Pot");
ModLoader.AddRecipe(new ItemStack(potflower, 1), new Object[] {
"r", "cdc", "ccc", Character.valueOf('r'), rainbow, Character.valueOf('c'), Item.brick, Character.valueOf('d'), Block.dirt
});
}
public void GenerateSurface(World var1, Random var2, int var3, int var4)
{
int var5;
int var6;
int var7;
int var8;
for(var5 = 0; var5 < .02; ++var5)
{
var6 = var3 + var2.nextInt(16) + 8;
var7 = var2.nextInt(128);
var8 = var4 + var2.nextInt(16) + 8;
(new WorldGenFlowers(mod_rainbowFlower.rainbow.blockID)).generate(var1, var2, var6, var7, var8);
}
}
public String Version()
{
return "1.8.1";
}
}
I wanted to create a mod that use wools which is different colors, but I do not know what should be the Block.whatever or Item.whatever.
And for those who don't understand:
ModLoader.AddRecipe(new ItemStack(ARGH,1), new Object[]{
"*", "X", Character.valueOf('*'), Block. ???
the
Block. ???
is the wool. What should the '???' be called? And what must you use to use wool with different colors?
Help will really be appreciated
for anyone who answers the question
I wanted to create a mod that use wools which is different colors, but I do not know what should be the Block.whatever or Item.whatever.
And for those who don't understand:
ModLoader.AddRecipe(new ItemStack(ARGH,1), new Object[]{
"*", "X", Character.valueOf('*'), Block. ???
the
Block. ???
is the wool. What should the '???' be called? And what must you use to use wool with different colors?
Help will really be appreciated
for anyone who answers the question
, new ItemStack(Block.cloth, 1, 14)
1 is the quantity, 14 is the color code. Check here for the other colors.
*** Minecraft Coder Pack Version 2.11 ***
MCP 2.11 running in C:\Users\DAM\Desktop\eclipse\MCP
Compiling Minecraft
sources\minecraft\net\minecraft\src\BlockoreFireDiamond.java:9: cannot find symb
ol
symbol : class Random
location: class net.minecraft.src.BlockoreFireDiamond
public int idDropped(int i, Random random)
^
1 error
*** minecraft_server.jar was not found, skipping
=== MCP 2.11 recompile script finished ===
Press any key to continue . . .
package net.minecraft.src;
public class BlockoreFireDiamond extends Block
{
public BlockoreFireDiamond(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random)
{
return mod_oreFireDiamond.firediamond.shiftedIndex;
}
}
Possibly a stupid question, but nonetheless I can't figure out how to do it.
How do you make multiple blocks fall from the breaking of another block, E.G. the boat.... I'm writing some furniture code and have no idea as to how...
I recompile, and it says I have no errors.
But then, I run the game, and it says this:
Mods loaded: 2
ModLoader Beta 1.8.1
net.minecraft.src.mod_Items 3.14159265
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT 209464d6 --------
Generated 10/2/11 7:39 PM
Minecraft: Minecraft Beta 1.8.1
OS: Windows 7 (x86) version 6.1
Java: 1.6.0_26, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 5450 version 2.1.9029, ATI Technologies Inc.
java.lang.NullPointerException
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:279)
at net.minecraft.src.ModLoader.AddRecipe(ModLoader.java:330)
at net.minecraft.src.mod_Tools.<init>(mod_Tools.java:87)
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:224)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1027)
at net.minecraft.src.ModLoader.init(ModLoader.java:692)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:121)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:72)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:168)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:140)
at net.minecraft.client.Minecraft.run(Minecraft.java:438)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 856e82d1 ----------
I recompile, and it says I have no errors.
But then, I run the game, and it says this:
Mods loaded: 2
ModLoader Beta 1.8.1
net.minecraft.src.mod_Items 3.14159265
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT 209464d6 --------
Generated 10/2/11 7:39 PM
Minecraft: Minecraft Beta 1.8.1
OS: Windows 7 (x86) version 6.1
Java: 1.6.0_26, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 5450 version 2.1.9029, ATI Technologies Inc.
java.lang.NullPointerException
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:279)
at net.minecraft.src.ModLoader.AddRecipe(ModLoader.java:330)
at net.minecraft.src.mod_Tools.<init>(mod_Tools.java:87)
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:224)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1027)
at net.minecraft.src.ModLoader.init(ModLoader.java:692)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:121)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:72)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:168)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:140)
at net.minecraft.client.Minecraft.run(Minecraft.java:438)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 856e82d1 ----------
Help? :tongue.gif:
Give your code. We cant help if you dont give us your code.
Give your code. We cant help if you dont give us your code.
Okay, I have replied to this several times and posted my code, but apparently it isn't showing up,so in hopes of it showing up THIS time,here it is again, ALL of my code:
package net.minecraft.src;
import java.util.Random;
public class mod_Items extends BaseMod
{
public static final Item itemTitaniumIngot = new ItemTitaniumIngot(5006).setItemName("TitaniumIngot");
public static final Item itemMeteoriteIngot = new ItemMeteoriteIngot(5046).setItemName("MeteoriteIngot");
public static final Item itemAntiMatter = new ItemAntiMatter(6005).setItemName("AntiMatter");
public static final Item itemDiamondRod = new ItemDiamondRod(6050).setItemName("DiamondRod");
public mod_Items()
{
itemTitaniumIngot.iconIndex = ModLoader.addOverride("/gui/item.png", "/Cyber/Ore/Titanium/TitaniumIngot.png");
itemMeteoriteIngot.iconIndex = ModLoader.addOverride("/gui/item.png", "/Cyber/Ore/Meteorite/MeteoriteIngot.png");
itemAntiMatter.iconIndex = ModLoader.addOverride("/gui/item.png", "/Cyber/Ore/AntiMatter/RefinedAntiMatter.png");
itemDiamondRod.iconIndex = ModLoader.addOverride("/gui/item.png", "/Cyber/Items/DiamondRod.png");
ModLoader.AddName(itemTitaniumIngot, "Titanium Ingot");
ModLoader.AddName(itemMeteoriteIngot, "Meteorite Ingot");
ModLoader.AddName(itemAntiMatter, "Anti-Matter Gem");
ModLoader.AddName(itemDiamondRod, "Diamond Rod");
}
public String Version()
{
return "3.14159265";
}
}
package net.minecraft.src;
import java.util.Random;
public class mod_Blocks extends BaseMod
{
public static final Block oreTitanium = new BlockTitaniumOre(5005, 0).setHardness(4F).setResistance(10F).setBlockName("TitaniumOre");
public static final Block oreMeteorite = new BlockMeteorite(5045, 0).setHardness(5F).setResistance(30F).setBlockName("MeteoriteOre").setLightValue(2.5F);
public static final Block oreAntiMatter = new BlockAntiMatter(6006, 0).setHardness(9F).setResistance(80F).setBlockName("AntiMatterOre");
public mod_Blocks()
{
ModLoader.RegisterBlock(oreTitanium);
ModLoader.RegisterBlock(oreMeteorite);
ModLoader.RegisterBlock(oreAntiMatter);
oreTitanium.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Cyber/Ore/Titanium/TitaniumOre.png");
oreMeteorite.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Cyber/Ore/Meteorite/MeteoriteOre.png");
oreAntiMatter.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Cyber/Ore/AntiMatter/AntiMatterOre.png");
ModLoader.AddName(oreTitanium, "Titanium Ore");
ModLoader.AddName(oreMeteorite, "Meteorite");
ModLoader.AddName(oreAntiMatter, "Anti-Matter Block");
ModLoader.AddSmelting(mod_Blocks.oreTitanium.blockID, new ItemStack (mod_Items.itemTitaniumIngot, 1));
ModLoader.AddSmelting(mod_Blocks.oreMeteorite.blockID, new ItemStack (mod_Items.itemMeteoriteIngot, 1));
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for (int i=0; i < 1; i++)
{
int randPosX = chunkX + rand.nextInt(6);
int randPosY = rand.nextInt(64);
int randPosZ = chunkZ + rand.nextInt(6);
(new WorldGenMinable(oreTitanium.blockID, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for (int i=0; i < 1; i++)
{
int randPosX = chunkX + rand.nextInt(4);
int randPosY = rand.nextInt(64);
int randPosZ = chunkZ + rand.nextInt(4);
(new WorldGenMinable(oreMeteorite.blockID, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public String Version()
{
return "3.14159265";
}
}
package net.minecraft.src;
import java.util.Random;
public class mod_Tools extends BaseMod
{
public static final Item TitaniumPickaxe = new ItemPickaxe(5000,EnumToolMaterial.TITANIUM).setItemName("TitaniumPickaxe");
public static final Item TitaniumShovel = new ItemSpade(5001,EnumToolMaterial.TITANIUM).setItemName("TitaniumShovel");
public static final Item TitaniumSword = new ItemSword(5002,EnumToolMaterial.TITANIUM).setItemName("TitaniumSword");
public static final Item TitaniumAxe = new ItemAxe(5003,EnumToolMaterial.TITANIUM).setItemName("TitaniumAxe");
public static final Item TitaniumHoe = new ItemHoe(5004,EnumToolMaterial.TITANIUM).setItemName("TitaniumHoe");
public static final Item MeteoritePickaxe = new ItemPickaxe(5040, EnumToolMaterial.METEORITE).setItemName("MeteoritePickaxe");
public static final Item MeteoriteShovel = new ItemSpade(5041, EnumToolMaterial.METEORITE).setItemName("MeteoriteShovel");
public static final Item MeteoriteSword = new ItemSword(5042, EnumToolMaterial.METEORITE).setItemName("MeteoriteSword");
public static final Item MeteoriteAxe = new ItemAxe(5043, EnumToolMaterial.METEORITE).setItemName("MeteoriteAxe");
public static final Item MeteoriteHoe = new ItemHoe(5044, EnumToolMaterial.METEORITE).setItemName("MeteoriteHoe");
public static final Item AntiMatterPickaxe = new ItemPickaxe(6000, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterPickaxe");
public static final Item AntiMatterShovel = new ItemSpade(6001, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterPickaxe");
public static final Item AntiMatterSword = new ItemSword(6002, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterPickaxe");
public static final Item AntiMatterAxe = new ItemAxe(6003, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterPickaxe");
public static final Item AntiMatterHoe = new ItemHoe(6004, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterPickaxe");
public mod_Tools()
{
TitaniumPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumPickaxe.png");
TitaniumShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumShovel.png");
TitaniumSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumSword.png");
TitaniumAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumAxe.png");
TitaniumHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumHoe.png");
MeteoritePickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoritePickaxe.png");
MeteoriteShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteShovel.png");
MeteoriteSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteSword.png");
MeteoriteAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteAxe.png");
MeteoriteHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteHoe.png");
AntiMatterPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterPickaxe.png");
AntiMatterShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterShovel.png");
AntiMatterSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterSword.png");
AntiMatterAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterAxe.png");
AntiMatterHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterHoe.png");
ModLoader.AddName(TitaniumPickaxe, "Titanium Pickaxe");
ModLoader.AddName(TitaniumShovel, "Titanium Shovel");
ModLoader.AddName(TitaniumSword, "Titanium Sword");
ModLoader.AddName(TitaniumAxe, "Titanium Axe");
ModLoader.AddName(TitaniumHoe, "Titanium Hoe");
ModLoader.AddName(MeteoritePickaxe, "Meteorite Pickaxe");
ModLoader.AddName(MeteoriteShovel, "Meteorite Shovel");
ModLoader.AddName(MeteoriteSword, "Meteorite Sword");
ModLoader.AddName(MeteoriteAxe, "Meteorite Axe");
ModLoader.AddName(MeteoriteHoe, "Meteorite Hoe");
ModLoader.AddName(AntiMatterPickaxe, "Anti-Matter Pickaxe");
ModLoader.AddName(AntiMatterShovel, "Anti-Matter Shovel");
ModLoader.AddName(AntiMatterSword, "Anti-Matter Sword");
ModLoader.AddName(AntiMatterAxe, "Anti-Matter Axe");
ModLoader.AddName(AntiMatterHoe, "Anti-Matter Hoe");
ModLoader.AddRecipe(new ItemStack(TitaniumPickaxe, 1), new Object[] {
"XXX", " S ", " S ", Character.valueOf('X'), mod_Items.itemTitaniumIngot, Character.valueOf('S'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(TitaniumShovel, 1), new Object[] {
" X ", " S ", " S ", Character.valueOf('X'), mod_Items.itemTitaniumIngot, Character.valueOf('S'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(TitaniumSword, 1), new Object[] {
" X ", " X ", " S ", Character.valueOf('X'), mod_Items.itemTitaniumIngot, Character.valueOf('S'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(TitaniumAxe, 1), new Object[] {
"XX ", "XS ", " S ", Character.valueOf('X'), mod_Items.itemTitaniumIngot, Character.valueOf('S'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(TitaniumHoe, 1), new Object[] {
"XX ", " S ", " S ", Character.valueOf('X'), mod_Items.itemTitaniumIngot, Character.valueOf('S'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(MeteoritePickaxe, 1), new Object[] {
"XXX", " S ", " S ", Character.valueOf('X'), mod_Items.itemMeteoriteIngot, Character.valueOf('S'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(MeteoriteShovel, 1), new Object[] {
" X ", " S ", " S ", Character.valueOf('X'), mod_Items.itemMeteoriteIngot, Character.valueOf('S'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(MeteoriteSword, 1), new Object[] {
" X ", " X ", " S ", Character.valueOf('X'), mod_Items.itemMeteoriteIngot, Character.valueOf('S'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(MeteoriteAxe, 1), new Object[] {
"XX ", "XS ", " S ", Character.valueOf('X'), mod_Items.itemMeteoriteIngot, Character.valueOf('S'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(MeteoriteHoe, 1), new Object[] {
"XX ", " S ", " S ", Character.valueOf('X'), mod_Items.itemMeteoriteIngot, Character.valueOf('S'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(AntiMatterPickaxe, 1), new Object[] {
"XXX", " S ", " S ", Character.valueOf('X'), mod_Items.itemAntiMatter, Character.valueOf('S'), mod_Items.itemDiamondRod.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(AntiMatterShovel, 1), new Object[] {
" X ", " S ", " S ", Character.valueOf('X'), mod_Items.itemAntiMatter, Character.valueOf('S'), mod_Items.itemDiamondRod.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(AntiMatterSword, 1), new Object[] {
" X ", " X ", " S ", Character.valueOf('X'), mod_Items.itemAntiMatter, Character.valueOf('S'), mod_Items.itemDiamondRod.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(AntiMatterAxe, 1), new Object[] {
"XX ", "XS ", " S ", Character.valueOf('X'), mod_Items.itemAntiMatter, Character.valueOf('S'), mod_Items.itemDiamondRod.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(AntiMatterHoe, 1), new Object[] {
"XX ", " S ", " S ", Character.valueOf('X'), mod_Items.itemAntiMatter, Character.valueOf('S'), mod_Items.itemDiamondRod.shiftedIndex
});
}
public String Version()
{
return "3.14159265";
}
}
package net.minecraft.src;
import java.util.Random;
public class mod_Armor extends BaseMod
{
public static final Item TitaniumHelmet = (new ItemArmor(5007, 4, 5, 3).setItemName("TitaniumHelmet"));
public static final Item TitaniumChestplate = (new ItemArmor(5008, 4, 5, 1).setItemName("TitaniumChestplate"));
public static final Item TitaniumLeggings = (new ItemArmor(5009, 4, 5, 2).setItemName("TitaniumLeggings"));
public static final Item TitaniumBoots = (new ItemArmor(5010, 3, 4, 0).setItemName("TitaniumBoots"));
public static final Item MeteoriteHelmet = (new ItemArmor(5047, 5, 6, 3).setItemName("MeteoriteHelmet"));
public static final Item MeteoriteChestplate = (new ItemArmor(5048, 5, 6, 1).setItemName("MeteoriteChestplate"));
public static final Item MeteoriteLeggings = (new ItemArmor(5049, 5, 6, 2).setItemName("MeteoriteLeggings"));
public static final Item MeteoriteBoots = (new ItemArmor(5050, 5, 6, 0).setItemName("MeteoriteBoots"));
public static final Item AntiMatterHelmet = (new ItemArmor(6007, 20, 7, 3).setItemName("AntiMatterHelmet"));
public static final Item AntiMatterChestplate = (new ItemArmor(6008, 20, 7, 1).setItemName("AntiMatterChestplate"));
public static final Item AntiMatterLeggings = (new ItemArmor(6009, 20, 7, 2).setItemName("AntiMatterLeggings"));
public static final Item AntiMatterBoots = (new ItemArmor(6010, 20, 7, 0).setItemName("AntiMatterBoots"));
public mod_Armor()
{
TitaniumHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumHelmet.png");
TitaniumChestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumChestplate.png");
TitaniumLeggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumLeggings.png");
TitaniumBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumBoots.png");
MeteoriteHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteHelmet.png");
MeteoriteChestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteChestplate.png");
MeteoriteLeggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteLeggings.png");
MeteoriteBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteBoots.png");
AntiMatterHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterHelmet.png");
AntiMatterChestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterChestplate.png");
AntiMatterLeggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterLeggings.png");
AntiMatterBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterBoots.png");
ModLoader.AddRecipe(new ItemStack(TitaniumHelmet, 1), new Object [] {
"XXX", "X X", Character.valueOf('X'), mod_Items.itemTitaniumIngot.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(TitaniumChestplate, 1), new Object [] {
"X X", "XXX", "XXX", Character.valueOf('X'), mod_Items.itemTitaniumIngot.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(TitaniumLeggings, 1), new Object [] {
"XXX", "X X", "X X", Character.valueOf('X'), mod_Items.itemTitaniumIngot.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(TitaniumBoots, 1), new Object [] {
"X X", "X X", Character.valueOf('X'), mod_Items.itemTitaniumIngot.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(MeteoriteHelmet, 1), new Object [] {
"XXX", "X X", Character.valueOf('X'), mod_Items.itemMeteoriteIngot.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(MeteoriteChestplate, 1), new Object [] {
"X X", "XXX", "XXX", Character.valueOf('X'), mod_Items.itemMeteoriteIngot.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(MeteoriteLeggings, 1), new Object [] {
"XXX", "X X", "X X", Character.valueOf('X'), mod_Items.itemMeteoriteIngot.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(MeteoriteBoots, 1), new Object [] {
"X X", "X X", Character.valueOf('X'), mod_Items.itemMeteoriteIngot.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(AntiMatterHelmet, 1), new Object [] {
"XXX", "X X", Character.valueOf('X'), mod_Items.itemAntiMatter.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(AntiMatterChestplate, 1), new Object [] {
"X X", "XXX", "XXX", Character.valueOf('X'), mod_Items.itemAntiMatter.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(AntiMatterLeggings, 1), new Object [] {
"XXX", "X X", "X X", Character.valueOf('X'), mod_Items.itemAntiMatter.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(AntiMatterBoots, 1), new Object [] {
"X X", "X X", Character.valueOf('X'), mod_Items.itemAntiMatter.shiftedIndex
});
ModLoader.AddName(TitaniumHelmet, "Titanium Helmet");
ModLoader.AddName(TitaniumChestplate, "Titanium Chestplate");
ModLoader.AddName(TitaniumLeggings, "Titanium Leggings");
ModLoader.AddName(TitaniumBoots, "Titanium Boots");
ModLoader.AddName(MeteoriteHelmet, "Meteorite Helmet");
ModLoader.AddName(MeteoriteChestplate, "Meteorite Chestplate");
ModLoader.AddName(MeteoriteLeggings, "Meteorite Leggings");
ModLoader.AddName(MeteoriteBoots, "Meteorite Boots");
ModLoader.AddName(AntiMatterHelmet, "Anti-Matter Helmet");
ModLoader.AddName(AntiMatterChestplate, "Anti-Matter Chestplate");
ModLoader.AddName(AntiMatterLeggings, "Anti-Matter Leggings");
ModLoader.AddName(AntiMatterBoots, "Anti-Matter Boots");
}
public String Version()
{
return "3.14159265";
}
}
And then there is my blocks and items:
package net.minecraft.src;
import java.util.Random;
public class BlockAntiMatter extends Block
{
protected BlockAntiMatter(int i, int j)
{
super (i,j, Material.iron);
}
public int idDropped(int i, Random random)
{
return mod_Items.itemAntiMatter.shiftedIndex;
}
public int quantityDropped(Random random)
{
return 1;
}
}
package net.minecraft.src;
import java.util.Random;
public class BlockMeteorite extends Block
{
protected BlockMeteorite(int i, int j)
{
super (i,j, Material.iron);
}
public int idDropped(int i, Random random)
{
return mod_Blocks.oreMeteorite.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
package net.minecraft.src;
import java.util.Random;
public class BlockTitaniumOre extends Block
{
protected BlockTitaniumOre(int i, int j)
{
super (i,j, Material.iron);
}
public int idDropped(int i, Random random)
{
return mod_Blocks.oreTitanium.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
package net.minecraft.src;
public class ItemAntiMatter extends Item
{
public ItemAntiMatter(int i)
{
super (i);
maxStackSize = 64;
}
}
package net.minecraft.src;
public class ItemDiamondRod extends Item
{
public ItemDiamondRod(int i)
{
super (i);
maxStackSize = 64;
}
}
package net.minecraft.src;
public class ItemMeteoriteIngot extends Item
{
public ItemMeteoriteIngot(int i)
{
super (i);
maxStackSize = 64;
}
}
package net.minecraft.src;
public class ItemTitaniumIngot extends Item
{
public ItemTitaniumIngot(int i)
{
super (i);
maxStackSize = 64;
}
}
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT 209464d6 --------
Generated 10/2/11 7:39 PM
Minecraft: Minecraft Beta 1.8.1
OS: Windows 7 (x86) version 6.1
Java: 1.6.0_26, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 5450 version 2.1.9029, ATI Technologies Inc.
java.lang.NullPointerException
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:279)
at net.minecraft.src.ModLoader.AddRecipe(ModLoader.java:330)
at net.minecraft.src.mod_Tools.<init>(mod_Tools.java:87)
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:224)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1027)
at net.minecraft.src.ModLoader.init(ModLoader.java:692)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:121)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:72)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:168)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:140)
at net.minecraft.client.Minecraft.run(Minecraft.java:438)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 856e82d1 ----------
I want to get into modding, but a bunch has happened over 5 months and I'm not about to sift through 70 pages to figure out where to start.
Is the first post still what I should be working from?
I personally would recommend going to the website. All of the tutorials there work unless otherwise specified. Even if they say they are for a different version, they still work for new versions. Good luck!
error(again):
You don't call the "meat" instance variable from Item.class, you call it from whatever class you instantiated it in. In this case, your mod_ file. It might look like this:
Notice I changed "Item.meat" to your mod_ file.
with the following code:
how do i fix this?
It worked! BTW, how did you fix it so if it happens again, i can actually fix it?
And for those who don't understand:
the is the wool. What should the '???' be called? And what must you use to use wool with different colors?
Help will really be appreciated
for anyone who answers the question
1 is the quantity, 14 is the color code.
Check here for the other colors.
you need to add
under package
and this code:
Now, i get no errors, but teh texture does not display. It instead displays the stone texture. How do i fix this?
How do you make multiple blocks fall from the breaking of another block, E.G. the boat.... I'm writing some furniture code and have no idea as to how...
But then, I run the game, and it says this:
Help? :tongue.gif:
Give your code. We cant help if you dont give us your code.
Okay, I have replied to this several times and posted my code, but apparently it isn't showing up,so in hopes of it showing up THIS time,here it is again, ALL of my code:
And then there is my blocks and items:
And generation code:
And again, I have the error:
Mods loaded: 2
ModLoader Beta 1.8.1
net.minecraft.src.mod_Items 3.14159265
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT 209464d6 --------
Generated 10/2/11 7:39 PM
Minecraft: Minecraft Beta 1.8.1
OS: Windows 7 (x86) version 6.1
Java: 1.6.0_26, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 5450 version 2.1.9029, ATI Technologies Inc.
java.lang.NullPointerException
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:279)
at net.minecraft.src.ModLoader.AddRecipe(ModLoader.java:330)
at net.minecraft.src.mod_Tools.<init>(mod_Tools.java:87)
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:224)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1027)
at net.minecraft.src.ModLoader.init(ModLoader.java:692)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:121)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:72)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:168)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:140)
at net.minecraft.client.Minecraft.run(Minecraft.java:438)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 856e82d1 ----------
And that's it. :wink.gif:
EDIT: Woo! It finally shows up! :tongue.gif:
EDIT: Never mind, I fixed it.
I want to get into modding, but a bunch has happened over 5 months and I'm not about to sift through 70 pages to figure out where to start.
Is the first post still what I should be working from?
Give a little. =♥=
I personally would recommend going to the website. All of the tutorials there work unless otherwise specified. Even if they say they are for a different version, they still work for new versions. Good luck!
RSMC - A massive RPG mod which adds skills and tons of content to Minecraft, one block at a time!