@tijmen707:
Yes, I meant the errors reported by Minecraft. Put them into Code/Code tags so it doesn't cover an entire post.
Also, I'm not really familiar with making mobs, and I can't access my code for reference at the moment, so I'm not sure what is going on.
But the error information may help another user identify your problem.
@Minecraftstudio:
Sorry, I don't know what's going on. Maybe the problem is in your PortableGrillOvenIdle class? I don't think it is in the line the errors are pointing to.
@Yosi56:
Yeah, I'm really sorry... I was thinking of Item coordinates cause someone asked that yesterday(?).
To figure out the index number you can count from left to right (From 0 to 255)...
Or take the coordinates and...
((X+1) * (Y+1) ) - 1 = Index
X and Y are of course from the coordinate system I just explained to you in the last post...
... I don't know of an easier way to figure out the Index number. *shrug* Sorry.
hello i am new to minecraft and new to java , i have managed to get a new block to compile successfully , when i try and test game i get "exception in thread main java.lang.unsatisfiedlinkerror no awt in java.library.path ,any help would be most appreciated
many thanks
Exon
sorted it , sorry to trouble you , wrong classpath
Question...
I am making a new ladder block, basically it just glows. I copied the BlockLadder, changed to BlockLadderGlow. That works. Added the block into the Crafting Manager, that works. I can craft it, place it in the world, and it glows... but for some reason I can't climb it like a normal ladder.
I looked through a few classes that might tell the game what block IDs the player is allowed to ascend, or something to that effect; but couldn't find it anywhere.
Anybody know how I can "climb" my new block?
Bumping, anybody know how to climb a new block type? Thanks!
****.Everything was normal with my mod but SUDDENLY game started to crash after i place final block in the crafting grid needed to craft new block.Can some1 help?
****.Everything was normal with my mod but SUDDENLY game started to crash after i place final block in the crafting grid needed to craft new block.Can some1 help?
****.Everything was normal with my mod but SUDDENLY game started to crash after i place final block in the crafting grid needed to craft new block.Can some1 help?
package net.minecraft.src;
import java.lang.reflect.Method;
public class mod_Senku extends BaseMod
{
public mod_Senku()
{
}
public String Version()
{
return "Senku Mob v 1.0";
}
public void AddEntityID()
{
//This defines your entity. Class name, entity name, and then the entity ID.
EntityList.addMapping(EntitySenku.class, "Senku", ModLoader.getUniqueEntityId());
//This adds your mob to the spawn list.
spawnlist.addCreaturesToSpawnList("Surface biomes", EntitySenku.class);
}
}
*** Minecraft Coder Pack Version 2.7 ***
Finding javac.exe... if you want to speed this up, add it to your PATH
Path set.
Compiling Minecraft
sources\minecraft\net\minecraft\src\mod_Senku.java:19: addMapping(java.lang.Clas
s,java.lang.String,int) has private access in net.minecraft.src.EntityList
EntityList.addMapping(EntitySenku.class, "Senku", ModLoader.getU
niqueEntityId());
^
sources\minecraft\net\minecraft\src\mod_Senku.java:21: cannot find symbol
symbol : method addCreaturesToSpawnList(java.lang.String,java.lang.Class<net.mi
necraft.src.EntitySenku>)
location: class net.minecraft.src.spawnlist
spawnlist.addCreaturesToSpawnList("Surface biomes", EntitySenku.
class);
^
2 errors
Compiling Minecraft Start Class
*** minecraft_server.jar was not found, skipping
=== MCP 2.7 recompile script finished ===
Press any key to continue . . .
I need help with this, I can't figure out what the symbol is, and private access?
@minecraftstudio:
No. If your portablegrill class is supposed to behave like a BlockContainer, then it is supposed to extend BlockContainer. But I said to remove .setHardness and the other function it errors on because BlockContainers apparently do not have those functions.
As well, for your other problem, look up "constructors" on a java tutorial. You either did not create the classes you're trying to declare those items as, or you didn't give those classes constructors. Either way that's a rookie mistake and you need to read up a bit on Java and programming to fix it.
@pwned: Using modloader is extremely easy actually. You simply create a new class that begins with "mod_" and instead of declaring things in minecraft's main classes like Item, Block, and Recipes, you instead put everything into your mod class. Check out the modloader Javadocs (separate download) to find out what goes into which function. And you can put your Block/Item declarations (the block = (new Block(#, #)) stuff) into a static { } function.
Also, you can declare as many static variables as you want. 'static' simply means that a variable will never change during a single program run.
@Kyshu: Yep, in fact, I think "package net.minecraft.src;" should probably go at the top of pretty much every class you could possibly make.
If you use the Eclipse IDE, and go to New > Class, it should even add that line (and a few others) for you.
Edit for new problem: You have to add the package line to the very TOP of the code. The very, very top. You have it after "extends BaseMod" and that's not where it goes. It is basically what tells the compiler where to find all the other minecraft code you are using. Without it nothing works. So it should ALWAYS be placed at the very top of every new class you make.
@everyone: I'm sorry I can't help everyone, and almost all of the problems are simply due to many of you not understanding programming. You would probably learn a lot simply by going through some Java learning tutorials. Having a better understanding of programming would probably help you to fix your errors.
Also, I recommend everyone use Eclipse or another Java IDE, not just notepad. If you set up an IDE correctly, then they will tell you what your errors are before you ever compile. You will get red stop signs over the lines erroring on you, and hovering your mouse over those signs tells you exactly what the problem is.
Things like this are how programmers get by. So learning to code is just one step, you should also learn to use your environment! :biggrin.gif:
Thanks Spore I Got The Grill Kinda Working Just A Few In Game Bugs I Can Fix On My Own Though!
If Anyones Seen My Above Posts About My Hand Pick Mod WOuld Be Great If Someone Could Help Me With The Error Code Error code
sources\minecraft\net\minecraft\src\Item.java:281: cannot find symbol
symbol : constructor ItemHandPickWood(int,int)
location: class net.minecraft.src.ItemHandPickWood
public static Item HandPickWood = (new ItemHandPickWood(5000, 0)).func_20010_a(7, 15).func_20011_a("HandPickWood");
^
sources\minecraft\net\minecraft\src\Item.java:282: cannot find symbol
symbol : constructor ItemHandPickStone(int,int)
location: class net.minecraft.src.ItemHandPickStone
public static Item HandPickStone = (new ItemHandPickStone(5001, 0)).func_20010_a(8, 15).func_20011_a("HandPickStone");
^
sources\minecraft\net\minecraft\src\Item.java:283: cannot find symbol
symbol : constructor ItemHandPickSteel(int,int)
location: class net.minecraft.src.ItemHandPickSteel
public static Item HandPickSteel = (new ItemHandPickSteel(5002, 0)).func_20010_a(9, 15).func_20011_a("HandPickSteel");
And Heres My Item.Java Because That Seems To Be Where The Errors At Item.Java
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
import java.io.PrintStream;
import java.util.Random;
public class Item
{
protected Item(int i)
{
maxStackSize = 64;
maxDamage = 32;
bFull3D = false;
field_21018_bf = false;
field_20926_a = null;
shiftedIndex = 256 + i;
if(itemsList[256 + i] != null)
{
System.out.println((new StringBuilder()).append("CONFLICT @ ").append(i).toString());
}
itemsList[256 + i] = this;
}
public Item setIconIndex(int i)
{
iconIndex = i;
return this;
}
public Item func_21009_c(int i)
{
maxStackSize = i;
return this;
}
public Item func_20010_a(int i, int j)
{
iconIndex = i + j * 16;
return this;
}
public int getIconIndex(ItemStack itemstack)
{
return iconIndex;
}
public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l)
{
return false;
}
public float getStrVsBlock(ItemStack itemstack, Block block)
{
return 1.0F;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
return itemstack;
}
public int getItemStackLimit()
{
return maxStackSize;
}
public int func_21012_a(int i)
{
return 0;
}
public boolean func_21010_e()
{
return field_21018_bf;
}
protected Item func_21015_a(boolean flag)
{
field_21018_bf = flag;
return this;
}
public int getMaxDamage()
{
return maxDamage;
}
protected Item func_21013_d(int i)
{
maxDamage = i;
return this;
}
public void hitEntity(ItemStack itemstack, EntityLiving entityliving)
{
}
public void hitBlock(ItemStack itemstack, int i, int j, int k, int l)
{
}
public int getDamageVsEntity(Entity entity)
{
return 1;
}
public boolean canHarvestBlock(Block block)
{
return false;
}
public void func_4019_b(ItemStack itemstack, EntityLiving entityliving)
{
}
public Item setFull3D()
{
bFull3D = true;
return this;
}
public boolean isFull3D()
{
return bFull3D;
}
public boolean shouldRotateAroundWhenRendering()
{
return false;
}
public Item func_20011_a(String s)
{
healAmount = (new StringBuilder()).append("item.").append(s).toString();
return this;
}
public String func_20009_a()
{
return healAmount;
}
public String func_21011_b(ItemStack itemstack)
{
return healAmount;
}
public Item func_21017_a(Item item)
{
if(maxStackSize > 1)
{
throw new IllegalArgumentException("Max stack size must be 1 for items with crafting results");
} else
{
field_20926_a = item;
return this;
}
}
public Item func_21016_h()
{
return field_20926_a;
}
public boolean func_21014_i()
{
return field_20926_a != null;
}
protected static Random itemRand = new Random();
public static Item itemsList[] = new Item[32000];
public static Item shovelSteel;
public static Item pickaxeSteel;
public static Item axeSteel;
public static Item flintAndSteel = (new ItemFlintAndSteel(3)).func_20010_a(5, 0).func_20011_a("flintAndSteel");
public static Item appleRed = (new ItemFood(4, 4)).func_20010_a(10, 0).func_20011_a("apple");
public static Item bow = (new ItemBow(5)).func_20010_a(5, 1).func_20011_a("bow");
public static Item arrow = (new Item(6)).func_20010_a(5, 2).func_20011_a("arrow");
public static Item coal = (new ItemCoal(7)).func_20010_a(7, 0).func_20011_a("coal");
public static Item diamond = (new Item(8)).func_20010_a(7, 3).func_20011_a("emerald");
public static Item ingotIron = (new Item(9)).func_20010_a(7, 1).func_20011_a("ingotIron");
public static Item ingotGold = (new Item(10)).func_20010_a(7, 2).func_20011_a("ingotGold");
public static Item swordSteel;
public static Item swordWood;
public static Item shovelWood;
public static Item pickaxeWood;
public static Item axeWood;
public static Item swordStone;
public static Item shovelStone;
public static Item pickaxeStone;
public static Item axeStone;
public static Item swordDiamond;
public static Item shovelDiamond;
public static Item pickaxeDiamond;
public static Item axeDiamond;
public static Item stick = (new Item(24)).func_20010_a(5, 3).setFull3D().func_20011_a("stick");
public static Item bowlEmpty = (new Item(25)).func_20010_a(7, 4).func_20011_a("bowl");
public static Item bowlSoup = (new ItemSoup(26, 10)).func_20010_a(8, 4).func_20011_a("mushroomStew");
public static Item swordGold;
public static Item shovelGold;
public static Item pickaxeGold;
public static Item axeGold;
public static Item silk = (new Item(31)).func_20010_a(8, 0).func_20011_a("string");
public static Item feather = (new Item(32)).func_20010_a(8, 1).func_20011_a("feather");
public static Item gunpowder = (new Item(33)).func_20010_a(8, 2).func_20011_a("sulphur");
public static Item hoeWood;
public static Item hoeStone;
public static Item hoeSteel;
public static Item hoeDiamond;
public static Item hoeGold;
public static Item seeds;
public static Item wheat = (new Item(40)).func_20010_a(9, 1).func_20011_a("wheat");
public static Item bread = (new ItemFood(41, 5)).func_20010_a(9, 2).func_20011_a("bread");
public static Item helmetLeather = (new ItemArmor(42, 0, 0, 0)).func_20010_a(0, 0).func_20011_a("helmetCloth");
public static Item plateLeather = (new ItemArmor(43, 0, 0, 1)).func_20010_a(0, 1).func_20011_a("chestplateCloth");
public static Item legsLeather = (new ItemArmor(44, 0, 0, 2)).func_20010_a(0, 2).func_20011_a("leggingsCloth");
public static Item bootsLeather = (new ItemArmor(45, 0, 0, 3)).func_20010_a(0, 3).func_20011_a("bootsCloth");
public static Item helmetChain = (new ItemArmor(46, 1, 1, 0)).func_20010_a(1, 0).func_20011_a("helmetChain");
public static Item plateChain = (new ItemArmor(47, 1, 1, 1)).func_20010_a(1, 1).func_20011_a("chestplateChain");
public static Item legsChain = (new ItemArmor(48, 1, 1, 2)).func_20010_a(1, 2).func_20011_a("leggingsChain");
public static Item bootsChain = (new ItemArmor(49, 1, 1, 3)).func_20010_a(1, 3).func_20011_a("bootsChain");
public static Item helmetSteel = (new ItemArmor(50, 2, 2, 0)).func_20010_a(2, 0).func_20011_a("helmetIron");
public static Item plateSteel = (new ItemArmor(51, 2, 2, 1)).func_20010_a(2, 1).func_20011_a("chestplateIron");
public static Item legsSteel = (new ItemArmor(52, 2, 2, 2)).func_20010_a(2, 2).func_20011_a("leggingsIron");
public static Item bootsSteel = (new ItemArmor(53, 2, 2, 3)).func_20010_a(2, 3).func_20011_a("bootsIron");
public static Item helmetDiamond = (new ItemArmor(54, 3, 3, 0)).func_20010_a(3, 0).func_20011_a("helmetDiamond");
public static Item plateDiamond = (new ItemArmor(55, 3, 3, 1)).func_20010_a(3, 1).func_20011_a("chestplateDiamond");
public static Item legsDiamond = (new ItemArmor(56, 3, 3, 2)).func_20010_a(3, 2).func_20011_a("leggingsDiamond");
public static Item bootsDiamond = (new ItemArmor(57, 3, 3, 3)).func_20010_a(3, 3).func_20011_a("bootsDiamond");
public static Item helmetGold = (new ItemArmor(58, 1, 4, 0)).func_20010_a(4, 0).func_20011_a("helmetGold");
public static Item plateGold = (new ItemArmor(59, 1, 4, 1)).func_20010_a(4, 1).func_20011_a("chestplateGold");
public static Item legsGold = (new ItemArmor(60, 1, 4, 2)).func_20010_a(4, 2).func_20011_a("leggingsGold");
public static Item bootsGold = (new ItemArmor(61, 1, 4, 3)).func_20010_a(4, 3).func_20011_a("bootsGold");
public static Item flint = (new Item(62)).func_20010_a(6, 0).func_20011_a("flint");
public static Item porkRaw = (new ItemFood(63, 3)).func_20010_a(7, 5).func_20011_a("porkchopRaw");
public static Item porkCooked = (new ItemFood(64, 8)).func_20010_a(8, 5).func_20011_a("porkchopCooked");
public static Item painting = (new ItemPainting(65)).func_20010_a(10, 1).func_20011_a("painting");
public static Item appleGold = (new ItemFood(66, 42)).func_20010_a(11, 0).func_20011_a("appleGold");
public static Item sign = (new ItemSign(67)).func_20010_a(10, 2).func_20011_a("sign");
public static Item doorWood;
public static Item bucketEmpty;
public static Item bucketWater;
public static Item bucketLava;
public static Item minecartEmpty = (new ItemMinecart(72, 0)).func_20010_a(7, 8).func_20011_a("minecart");
public static Item saddle = (new ItemSaddle(73)).func_20010_a(8, 6).func_20011_a("saddle");
public static Item doorSteel;
public static Item redstone = (new ItemRedstone(75)).func_20010_a(8, 3).func_20011_a("redstone");
public static Item snowball = (new ItemSnowball(76)).func_20010_a(14, 0).func_20011_a("snowball");
public static Item boat = (new ItemBoat(77)).func_20010_a(8, 8).func_20011_a("boat");
public static Item leather = (new Item(78)).func_20010_a(7, 6).func_20011_a("leather");
public static Item bucketMilk;
public static Item brick = (new Item(80)).func_20010_a(6, 1).func_20011_a("brick");
public static Item clay = (new Item(81)).func_20010_a(9, 3).func_20011_a("clay");
public static Item reed;
public static Item paper = (new Item(83)).func_20010_a(10, 3).func_20011_a("paper");
public static Item book = (new Item(84)).func_20010_a(11, 3).func_20011_a("book");
public static Item slimeBall = (new Item(85)).func_20010_a(14, 1).func_20011_a("slimeball");
public static Item minecartCrate = (new ItemMinecart(86, 1)).func_20010_a(7, 9).func_20011_a("minecartChest");
public static Item minecartPowered = (new ItemMinecart(87, 2)).func_20010_a(7, 10).func_20011_a("minecartFurnace");
public static Item egg = (new ItemEgg(88)).func_20010_a(12, 0).func_20011_a("egg");
public static Item compass = (new Item(89)).func_20010_a(6, 3).func_20011_a("compass");
public static Item fishingRod = (new ItemFishingRod(90)).func_20010_a(5, 4).func_20011_a("fishingRod");
public static Item pocketSundial = (new Item(91)).func_20010_a(6, 4).func_20011_a("clock");
public static Item lightStoneDust = (new Item(92)).func_20010_a(9, 4).func_20011_a("yellowDust");
public static Item fishRaw = (new ItemFood(93, 2)).func_20010_a(9, 5).func_20011_a("fishRaw");
public static Item fishCooked = (new ItemFood(94, 5)).func_20010_a(10, 5).func_20011_a("fishCooked");
public static Item field_21021_aU = (new ItemDye(95)).func_20010_a(14, 4).func_20011_a("dyePowder");
public static Item field_21020_aV = (new Item(96)).func_20010_a(12, 1).func_20011_a("bone").setFull3D();
public static Item field_21019_aW = (new Item(97)).func_20010_a(13, 0).func_20011_a("sugar").setFull3D();
public static Item field_21022_aX;
public static Item record13 = (new ItemRecord(2000, "13")).func_20010_a(0, 15).func_20011_a("record");
public static Item recordCat = (new ItemRecord(2001, "cat")).func_20010_a(1, 15).func_20011_a("record");
public static Item ShortBladeWood = (new ItemShortBladeWood(1200, 0)).func_20010_a(2, 15).func_20011_a("ShortBladeWood");
public static Item ShortBladeStone = (new ItemShortBladeStone(1600, 1)).func_20010_a(3, 15).func_20011_a("ShortBladeStone");
public static Item ShortBladeSteel = (new ItemShortBladeSteel(1100, 2)).func_20010_a(4, 15).func_20011_a("ShortBladeSteel");
public static Item ShortBladeDiamond = (new ItemShortBladeDiamond(2020, 3)).func_20010_a(5, 15).func_20011_a("ShortBladeDiamond");
public static Item ShortBladeGold = (new ItemShortBladeGold(1610, 0)).func_20010_a(6, 15).func_20011_a("ShortBladeGold");
public static Item HandPickWood = (new ItemHandPickWood(1602, 0)).func_20010_a(7, 15).func_20011_a("HandPickWood");
public static Item HandPickStone = (new ItemHandPickStone(1601, 0)).func_20010_a(8, 15).func_20011_a("HandPickStone");
public static Item HandPickSteel = (new ItemHandPickSteel(5002, 0)).func_20010_a(9, 15).func_20011_a("HandPickSteel");
public static Item HandPickDiamond = (new ItemHandPickDiamond(5090, 3)).func_20010_a(10, 15).func_20011_a("HandPickDiamond");
public static Item HandPickGold = (new ItemHandPickGold(5004, 0)).func_20010_a(11, 15).func_20011_a("HandPickGold");
public final int shiftedIndex;
protected int maxStackSize;
protected int maxDamage;
protected int iconIndex;
protected boolean bFull3D;
protected boolean field_21018_bf;
private Item field_20926_a;
private String healAmount;
static
{
shovelSteel = (new ItemSpade(0, EnumToolMaterial.IRON)).func_20010_a(2, 5).func_20011_a("shovelIron");
pickaxeSteel = (new ItemPickaxe(1, EnumToolMaterial.IRON)).func_20010_a(2, 6).func_20011_a("pickaxeIron");
axeSteel = (new ItemAxe(2, EnumToolMaterial.IRON)).func_20010_a(2, 7).func_20011_a("hatchetIron");
swordSteel = (new ItemSword(11, EnumToolMaterial.IRON)).func_20010_a(2, 4).func_20011_a("swordIron");
swordWood = (new ItemSword(12, EnumToolMaterial.WOOD)).func_20010_a(0, 4).func_20011_a("swordWood");
shovelWood = (new ItemSpade(13, EnumToolMaterial.WOOD)).func_20010_a(0, 5).func_20011_a("shovelWood");
pickaxeWood = (new ItemPickaxe(14, EnumToolMaterial.WOOD)).func_20010_a(0, 6).func_20011_a("pickaxeWood");
axeWood = (new ItemAxe(15, EnumToolMaterial.WOOD)).func_20010_a(0, 7).func_20011_a("hatchetWood");
swordStone = (new ItemSword(16, EnumToolMaterial.STONE)).func_20010_a(1, 4).func_20011_a("swordStone");
shovelStone = (new ItemSpade(17, EnumToolMaterial.STONE)).func_20010_a(1, 5).func_20011_a("shovelStone");
pickaxeStone = (new ItemPickaxe(18, EnumToolMaterial.STONE)).func_20010_a(1, 6).func_20011_a("pickaxeStone");
axeStone = (new ItemAxe(19, EnumToolMaterial.STONE)).func_20010_a(1, 7).func_20011_a("hatchetStone");
swordDiamond = (new ItemSword(20, EnumToolMaterial.EMERALD)).func_20010_a(3, 4).func_20011_a("swordDiamond");
shovelDiamond = (new ItemSpade(21, EnumToolMaterial.EMERALD)).func_20010_a(3, 5).func_20011_a("shovelDiamond");
pickaxeDiamond = (new ItemPickaxe(22, EnumToolMaterial.EMERALD)).func_20010_a(3, 6).func_20011_a("pickaxeDiamond");
HandPickDiamond = (new ItemHandPickDiamond(5090, EnumToolMaterial.EMERALD)).func_20010_a(10, 15).func_20011_a("HandPickDiamond");
axeDiamond = (new ItemAxe(23, EnumToolMaterial.EMERALD)).func_20010_a(3, 7).func_20011_a("hatchetDiamond");
swordGold = (new ItemSword(27, EnumToolMaterial.GOLD)).func_20010_a(4, 4).func_20011_a("swordGold");
shovelGold = (new ItemSpade(28, EnumToolMaterial.GOLD)).func_20010_a(4, 5).func_20011_a("shovelGold");
pickaxeGold = (new ItemPickaxe(29, EnumToolMaterial.GOLD)).func_20010_a(4, 6).func_20011_a("pickaxeGold");
axeGold = (new ItemAxe(30, EnumToolMaterial.GOLD)).func_20010_a(4, 7).func_20011_a("hatchetGold");
hoeWood = (new ItemHoe(34, EnumToolMaterial.WOOD)).func_20010_a(0, 8).func_20011_a("hoeWood");
hoeStone = (new ItemHoe(35, EnumToolMaterial.STONE)).func_20010_a(1, 8).func_20011_a("hoeStone");
hoeSteel = (new ItemHoe(36, EnumToolMaterial.IRON)).func_20010_a(2, 8).func_20011_a("hoeIron");
hoeDiamond = (new ItemHoe(37, EnumToolMaterial.EMERALD)).func_20010_a(3, 8).func_20011_a("hoeDiamond");
hoeGold = (new ItemHoe(38, EnumToolMaterial.GOLD)).func_20010_a(4, 8).func_20011_a("hoeGold");
seeds = (new ItemSeeds(39, Block.crops.blockID)).func_20010_a(9, 0).func_20011_a("seeds");
doorWood = (new ItemDoor(68, Material.wood)).func_20010_a(11, 2).func_20011_a("doorWood");
bucketEmpty = (new ItemBucket(69, 0)).func_20010_a(10, 4).func_20011_a("bucket");
bucketWater = (new ItemBucket(70, Block.waterStill.blockID)).func_20010_a(11, 4).func_20011_a("bucketWater").func_21017_a(bucketEmpty);
bucketLava = (new ItemBucket(71, Block.lavaStill.blockID)).func_20010_a(12, 4).func_20011_a("bucketLava").func_21017_a(bucketEmpty);
doorSteel = (new ItemDoor(74, Material.iron)).func_20010_a(12, 2).func_20011_a("doorIron");
bucketMilk = (new ItemBucket(79, -1)).func_20010_a(13, 4).func_20011_a("milk").func_21017_a(bucketEmpty);
reed = (new ItemReed(82, Block.reed)).func_20010_a(11, 1).func_20011_a("reeds");
field_21022_aX = (new ItemReed(98, Block.field_21026_bg)).func_21009_c(1).func_20010_a(13, 1).func_20011_a("cake");
}
}
minecraftstudio, you really shouldn't be posting that code. Item.java is mostly Notch's code, and posting it is kind of illegal. :tongue.gif:
As for your problem, again, I think it is because you did not define your constructors, or your classes. I can't be sure which because I don't have all your code.
Edit: Also, FYI, that capitalizing every word thing can get kind of annoying.
How do you get a new ore block you've created to generate in the world?
its in the ChunkProviderGenerate file in the populate section you will see like dirt diamond iron select one of them depending on how common so dirt most common diamond least common copy that bit of code for example iron :
for(int j3 = 0; j3 < 20; j3++)
{
int k6 = k + rand.nextInt(16);
int l9 = rand.nextInt(64);
int j14 = l + rand.nextInt(16);
(new WorldGenMinable(Block.oreIron.blockID, 8)).generate(worldObj, rand, k6, l9, j14);
}
and change Block.oreIron.blockID to the same your block
hope it helps
hm.. is this up to date?
cuz now all of them called felid's or somthing
****.Everything was normal with my mod but SUDDENLY game started to crash after i place final block in the crafting grid needed to craft new block.Can some1 help?
hey guys bumping.
aand yeah this happen then mod was ported to modloader.
Code is here.
package net.minecraft.src;
public class mod_AwesomeMod extends BaseMod
{
public mod_AwesomeMod()
{
}
public String Version()
{
return "1";
}
public void AddRecipes(CraftingManager craftingmanager)
{
craftingmanager.addRecipe(new ItemStack(field_210014_someBlock, 16), new Object[] {
"###", "XXX", "YYY", Character.valueOf('#'), Block.dirt, Character.valueOf('X'), Block.gravel, Character.valueOf('Y'), Item.clay
});
craftingmanager.addRecipe(new ItemStack(field_210015_someeBlock, 16), new Object[] {
"###", "XXX", "YYY", Character.valueOf('#'), Block.stone, Character.valueOf('X'), Block.gravel, Character.valueOf('Y'), Item.clay
});
craftingmanager.addRecipe(new ItemStack(field_210016_someeeBlock, 16), new Object[] {
"###", "XXX", "YYY", Character.valueOf('#'), Item.ingotIron, Character.valueOf('X'), Block.gravel, Character.valueOf('Y'), Item.clay
});
}
public static final Block field_210014_someBlock;
public static final Block field_210015_someeBlock;
public static final Block field_210016_someeeBlock;
static
{
field_210014_someBlock = (new BlockAwesomeblock(114, 38)).setHardness(0.5F).setResistance(25F).setStepSound(Block.soundStoneFootstep).setLightValue(0.6F).func_20012_a("dirtRoad");
field_210015_someeBlock = (new BlockConcentrateAwesome(115, 39)).setHardness(1.0F).setResistance(50F).setStepSound(Block.soundStoneFootstep).setLightValue(0.75F).func_20012_a("stoneRoad");
field_210016_someeeBlock = (new BlockPureAwesomeness(116, 40)).setHardness(2.0F).setResistance(75F).setStepSound(Block.soundStoneFootstep).setLightValue(0.9F).func_20012_a("ironRoad");
}
}
****.Everything was normal with my mod but SUDDENLY game started to crash after i place final block in the crafting grid needed to craft new block.Can some1 help?
hey guys bumping.
aand yeah this happen then mod was ported to modloader.
Code is here.
package net.minecraft.src;
public class mod_AwesomeMod extends BaseMod
{
public mod_AwesomeMod()
{
}
public String Version()
{
return "1";
}
public void AddRecipes(CraftingManager craftingmanager)
{
craftingmanager.addRecipe(new ItemStack(field_210014_someBlock, 16), new Object[] {
"###", "XXX", "YYY", Character.valueOf('#'), Block.dirt, Character.valueOf('X'), Block.gravel, Character.valueOf('Y'), Item.clay
});
craftingmanager.addRecipe(new ItemStack(field_210015_someeBlock, 16), new Object[] {
"###", "XXX", "YYY", Character.valueOf('#'), Block.stone, Character.valueOf('X'), Block.gravel, Character.valueOf('Y'), Item.clay
});
craftingmanager.addRecipe(new ItemStack(field_210016_someeeBlock, 16), new Object[] {
"###", "XXX", "YYY", Character.valueOf('#'), Item.ingotIron, Character.valueOf('X'), Block.gravel, Character.valueOf('Y'), Item.clay
});
}
public static final Block field_210014_someBlock;
public static final Block field_210015_someeBlock;
public static final Block field_210016_someeeBlock;
static
{
field_210014_someBlock = (new BlockAwesomeblock(114, 38)).setHardness(0.5F).setResistance(25F).setStepSound(Block.soundStoneFootstep).setLightValue(0.6F).func_20012_a("dirtRoad");
field_210015_someeBlock = (new BlockConcentrateAwesome(115, 39)).setHardness(1.0F).setResistance(50F).setStepSound(Block.soundStoneFootstep).setLightValue(0.75F).func_20012_a("stoneRoad");
field_210016_someeeBlock = (new BlockPureAwesomeness(116, 40)).setHardness(2.0F).setResistance(75F).setStepSound(Block.soundStoneFootstep).setLightValue(0.9F).func_20012_a("ironRoad");
}
}
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
import java.io.PrintStream;
import java.util.Random;
public class Item
{
protected Item(int i)
{
maxStackSize = 64;
maxDamage = 32;
bFull3D = false;
field_21018_bf = false;
field_20926_a = null;
shiftedIndex = 256 + i;
if(itemsList[256 + i] != null)
{
System.out.println((new StringBuilder()).append("CONFLICT @ ").append(i).toString());
}
itemsList[256 + i] = this;
}
public Item setIconIndex(int i)
{
iconIndex = i;
return this;
}
public Item func_21009_c(int i)
{
maxStackSize = i;
return this;
}
public Item func_20010_a(int i, int j)
{
iconIndex = i + j * 16;
return this;
}
public int getIconIndex(ItemStack itemstack)
{
return iconIndex;
}
public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l)
{
return false;
}
public float getStrVsBlock(ItemStack itemstack, Block block)
{
return 1.0F;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
return itemstack;
}
public int getItemStackLimit()
{
return maxStackSize;
}
public int func_21012_a(int i)
{
return 0;
}
public boolean func_21010_e()
{
return field_21018_bf;
}
protected Item func_21015_a(boolean flag)
{
field_21018_bf = flag;
return this;
}
public int getMaxDamage()
{
return maxDamage;
}
protected Item func_21013_d(int i)
{
maxDamage = i;
return this;
}
public void hitEntity(ItemStack itemstack, EntityLiving entityliving)
{
}
public void hitBlock(ItemStack itemstack, int i, int j, int k, int l)
{
}
public int getDamageVsEntity(Entity entity)
{
return 1;
}
public boolean canHarvestBlock(Block block)
{
return false;
}
public void func_4019_b(ItemStack itemstack, EntityLiving entityliving)
{
}
public Item setFull3D()
{
bFull3D = true;
return this;
}
public boolean isFull3D()
{
return bFull3D;
}
public boolean shouldRotateAroundWhenRendering()
{
return false;
}
public Item func_20011_a(String s)
{
healAmount = (new StringBuilder()).append("item.").append(s).toString();
return this;
}
public String func_20009_a()
{
return healAmount;
}
public String func_21011_b(ItemStack itemstack)
{
return healAmount;
}
public Item func_21017_a(Item item)
{
if(maxStackSize > 1)
{
throw new IllegalArgumentException("Max stack size must be 1 for items with crafting results");
} else
{
field_20926_a = item;
return this;
}
}
public Item func_21016_h()
{
return field_20926_a;
}
public boolean func_21014_i()
{
return field_20926_a != null;
}
protected static Random itemRand = new Random();
public static Item itemsList[] = new Item[32000];
public static Item shovelSteel;
public static Item pickaxeSteel;
public static Item axeSteel;
public static Item flintAndSteel = (new ItemFlintAndSteel(3)).func_20010_a(5, 0).func_20011_a("flintAndSteel");
public static Item appleRed = (new ItemFood(4, 4)).func_20010_a(10, 0).func_20011_a("apple");
public static Item bow = (new ItemBow(5)).func_20010_a(5, 1).func_20011_a("bow");
public static Item arrow = (new Item(6)).func_20010_a(5, 2).func_20011_a("arrow");
public static Item coal = (new ItemCoal(7)).func_20010_a(7, 0).func_20011_a("coal");
public static Item diamond = (new Item(8)).func_20010_a(7, 3).func_20011_a("emerald");
public static Item ingotIron = (new Item(9)).func_20010_a(7, 1).func_20011_a("ingotIron");
public static Item ingotGold = (new Item(10)).func_20010_a(7, 2).func_20011_a("ingotGold");
public static Item swordSteel;
public static Item swordWood;
public static Item shovelWood;
public static Item pickaxeWood;
public static Item axeWood;
public static Item swordStone;
public static Item shovelStone;
public static Item pickaxeStone;
public static Item axeStone;
public static Item swordDiamond;
public static Item shovelDiamond;
public static Item pickaxeDiamond;
public static Item axeDiamond;
public static Item stick = (new Item(24)).func_20010_a(5, 3).setFull3D().func_20011_a("stick");
public static Item bowlEmpty = (new Item(25)).func_20010_a(7, 4).func_20011_a("bowl");
public static Item bowlSoup = (new ItemSoup(26, 10)).func_20010_a(8, 4).func_20011_a("mushroomStew");
public static Item swordGold;
public static Item shovelGold;
public static Item pickaxeGold;
public static Item axeGold;
public static Item silk = (new Item(31)).func_20010_a(8, 0).func_20011_a("string");
public static Item feather = (new Item(32)).func_20010_a(8, 1).func_20011_a("feather");
public static Item gunpowder = (new Item(33)).func_20010_a(8, 2).func_20011_a("sulphur");
public static Item hoeWood;
public static Item hoeStone;
public static Item hoeSteel;
public static Item hoeDiamond;
public static Item hoeGold;
public static Item seeds;
public static Item wheat = (new Item(40)).func_20010_a(9, 1).func_20011_a("wheat");
public static Item bread = (new ItemFood(41, 5)).func_20010_a(9, 2).func_20011_a("bread");
public static Item helmetLeather = (new ItemArmor(42, 0, 0, 0)).func_20010_a(0, 0).func_20011_a("helmetCloth");
public static Item plateLeather = (new ItemArmor(43, 0, 0, 1)).func_20010_a(0, 1).func_20011_a("chestplateCloth");
public static Item legsLeather = (new ItemArmor(44, 0, 0, 2)).func_20010_a(0, 2).func_20011_a("leggingsCloth");
public static Item bootsLeather = (new ItemArmor(45, 0, 0, 3)).func_20010_a(0, 3).func_20011_a("bootsCloth");
public static Item helmetChain = (new ItemArmor(46, 1, 1, 0)).func_20010_a(1, 0).func_20011_a("helmetChain");
public static Item plateChain = (new ItemArmor(47, 1, 1, 1)).func_20010_a(1, 1).func_20011_a("chestplateChain");
public static Item legsChain = (new ItemArmor(48, 1, 1, 2)).func_20010_a(1, 2).func_20011_a("leggingsChain");
public static Item bootsChain = (new ItemArmor(49, 1, 1, 3)).func_20010_a(1, 3).func_20011_a("bootsChain");
public static Item helmetSteel = (new ItemArmor(50, 2, 2, 0)).func_20010_a(2, 0).func_20011_a("helmetIron");
public static Item plateSteel = (new ItemArmor(51, 2, 2, 1)).func_20010_a(2, 1).func_20011_a("chestplateIron");
public static Item legsSteel = (new ItemArmor(52, 2, 2, 2)).func_20010_a(2, 2).func_20011_a("leggingsIron");
public static Item bootsSteel = (new ItemArmor(53, 2, 2, 3)).func_20010_a(2, 3).func_20011_a("bootsIron");
public static Item helmetDiamond = (new ItemArmor(54, 3, 3, 0)).func_20010_a(3, 0).func_20011_a("helmetDiamond");
public static Item plateDiamond = (new ItemArmor(55, 3, 3, 1)).func_20010_a(3, 1).func_20011_a("chestplateDiamond");
public static Item legsDiamond = (new ItemArmor(56, 3, 3, 2)).func_20010_a(3, 2).func_20011_a("leggingsDiamond");
public static Item bootsDiamond = (new ItemArmor(57, 3, 3, 3)).func_20010_a(3, 3).func_20011_a("bootsDiamond");
public static Item helmetGold = (new ItemArmor(58, 1, 4, 0)).func_20010_a(4, 0).func_20011_a("helmetGold");
public static Item plateGold = (new ItemArmor(59, 1, 4, 1)).func_20010_a(4, 1).func_20011_a("chestplateGold");
public static Item legsGold = (new ItemArmor(60, 1, 4, 2)).func_20010_a(4, 2).func_20011_a("leggingsGold");
public static Item bootsGold = (new ItemArmor(61, 1, 4, 3)).func_20010_a(4, 3).func_20011_a("bootsGold");
public static Item flint = (new Item(62)).func_20010_a(6, 0).func_20011_a("flint");
public static Item porkRaw = (new ItemFood(63, 3)).func_20010_a(7, 5).func_20011_a("porkchopRaw");
public static Item porkCooked = (new ItemFood(64, 8)).func_20010_a(8, 5).func_20011_a("porkchopCooked");
public static Item painting = (new ItemPainting(65)).func_20010_a(10, 1).func_20011_a("painting");
public static Item appleGold = (new ItemFood(66, 42)).func_20010_a(11, 0).func_20011_a("appleGold");
public static Item sign = (new ItemSign(67)).func_20010_a(10, 2).func_20011_a("sign");
public static Item doorWood;
public static Item bucketEmpty;
public static Item bucketWater;
public static Item bucketLava;
public static Item minecartEmpty = (new ItemMinecart(72, 0)).func_20010_a(7, 8).func_20011_a("minecart");
public static Item saddle = (new ItemSaddle(73)).func_20010_a(8, 6).func_20011_a("saddle");
public static Item doorSteel;
public static Item redstone = (new ItemRedstone(75)).func_20010_a(8, 3).func_20011_a("redstone");
public static Item snowball = (new ItemSnowball(76)).func_20010_a(14, 0).func_20011_a("snowball");
public static Item boat = (new ItemBoat(77)).func_20010_a(8, 8).func_20011_a("boat");
public static Item leather = (new Item(78)).func_20010_a(7, 6).func_20011_a("leather");
public static Item bucketMilk;
public static Item brick = (new Item(80)).func_20010_a(6, 1).func_20011_a("brick");
public static Item clay = (new Item(81)).func_20010_a(9, 3).func_20011_a("clay");
public static Item reed;
public static Item paper = (new Item(83)).func_20010_a(10, 3).func_20011_a("paper");
public static Item book = (new Item(84)).func_20010_a(11, 3).func_20011_a("book");
public static Item slimeBall = (new Item(85)).func_20010_a(14, 1).func_20011_a("slimeball");
public static Item minecartCrate = (new ItemMinecart(86, 1)).func_20010_a(7, 9).func_20011_a("minecartChest");
public static Item minecartPowered = (new ItemMinecart(87, 2)).func_20010_a(7, 10).func_20011_a("minecartFurnace");
public static Item egg = (new ItemEgg(88)).func_20010_a(12, 0).func_20011_a("egg");
public static Item compass = (new Item(89)).func_20010_a(6, 3).func_20011_a("compass");
public static Item fishingRod = (new ItemFishingRod(90)).func_20010_a(5, 4).func_20011_a("fishingRod");
public static Item pocketSundial = (new Item(91)).func_20010_a(6, 4).func_20011_a("clock");
public static Item lightStoneDust = (new Item(92)).func_20010_a(9, 4).func_20011_a("yellowDust");
public static Item fishRaw = (new ItemFood(93, 2)).func_20010_a(9, 5).func_20011_a("fishRaw");
public static Item fishCooked = (new ItemFood(94, 5)).func_20010_a(10, 5).func_20011_a("fishCooked");
public static Item field_21021_aU = (new ItemDye(95)).func_20010_a(14, 4).func_20011_a("dyePowder");
public static Item field_21020_aV = (new Item(96)).func_20010_a(12, 1).func_20011_a("bone").setFull3D();
public static Item field_21019_aW = (new Item(97)).func_20010_a(13, 0).func_20011_a("sugar").setFull3D();
public static Item field_21022_aX;
public static Item record13 = (new ItemRecord(2000, "13")).func_20010_a(0, 15).func_20011_a("record");
public static Item recordCat = (new ItemRecord(2001, "cat")).func_20010_a(1, 15).func_20011_a("record");
public static Item ShortBladeWood = (new ItemShortBladeWood(1200, 0)).func_20010_a(2, 15).func_20011_a("ShortBladeWood");
public static Item ShortBladeStone = (new ItemShortBladeStone(1600, 1)).func_20010_a(3, 15).func_20011_a("ShortBladeStone");
public static Item ShortBladeSteel = (new ItemShortBladeSteel(1100, 2)).func_20010_a(4, 15).func_20011_a("ShortBladeSteel");
public static Item ShortBladeDiamond = (new ItemShortBladeDiamond(2020, 3)).func_20010_a(5, 15).func_20011_a("ShortBladeDiamond");
public static Item ShortBladeGold = (new ItemShortBladeGold(1610, 0)).func_20010_a(6, 15).func_20011_a("ShortBladeGold");
public static Item HandPickWood = (new ItemHandPickWood(5000, 0)).func_20010_a(7, 15).func_20011_a("HandPickWood");
public static Item HandPickStone = (new ItemHandPickStone(5001, 0)).func_20010_a(8, 15).func_20011_a("HandPickStone");
public static Item HandPickSteel = (new ItemHandPickSteel(5002, 0)).func_20010_a(9, 15).func_20011_a("HandPickSteel");
public static Item HandPickDiamond = (new ItemHandPickDiamond(5003, 0)).func_20010_a(10, 15).func_20011_a("HandPickDiamond");
public static Item HandPickGold = (new ItemHandPickGold(5004, 0)).func_20010_a(11, 15).func_20011_a("HandPickGold");
public final int shiftedIndex;
protected int maxStackSize;
protected int maxDamage;
protected int iconIndex;
protected boolean bFull3D;
protected boolean field_21018_bf;
private Item field_20926_a;
private String healAmount;
static
{
shovelSteel = (new ItemSpade(0, EnumToolMaterial.IRON)).func_20010_a(2, 5).func_20011_a("shovelIron");
pickaxeSteel = (new ItemPickaxe(1, EnumToolMaterial.IRON)).func_20010_a(2, 6).func_20011_a("pickaxeIron");
axeSteel = (new ItemAxe(2, EnumToolMaterial.IRON)).func_20010_a(2, 7).func_20011_a("hatchetIron");
swordSteel = (new ItemSword(11, EnumToolMaterial.IRON)).func_20010_a(2, 4).func_20011_a("swordIron");
swordWood = (new ItemSword(12, EnumToolMaterial.WOOD)).func_20010_a(0, 4).func_20011_a("swordWood");
shovelWood = (new ItemSpade(13, EnumToolMaterial.WOOD)).func_20010_a(0, 5).func_20011_a("shovelWood");
pickaxeWood = (new ItemPickaxe(14, EnumToolMaterial.WOOD)).func_20010_a(0, 6).func_20011_a("pickaxeWood");
axeWood = (new ItemAxe(15, EnumToolMaterial.WOOD)).func_20010_a(0, 7).func_20011_a("hatchetWood");
swordStone = (new ItemSword(16, EnumToolMaterial.STONE)).func_20010_a(1, 4).func_20011_a("swordStone");
shovelStone = (new ItemSpade(17, EnumToolMaterial.STONE)).func_20010_a(1, 5).func_20011_a("shovelStone");
pickaxeStone = (new ItemPickaxe(18, EnumToolMaterial.STONE)).func_20010_a(1, 6).func_20011_a("pickaxeStone");
axeStone = (new ItemAxe(19, EnumToolMaterial.STONE)).func_20010_a(1, 7).func_20011_a("hatchetStone");
swordDiamond = (new ItemSword(20, EnumToolMaterial.EMERALD)).func_20010_a(3, 4).func_20011_a("swordDiamond");
shovelDiamond = (new ItemSpade(21, EnumToolMaterial.EMERALD)).func_20010_a(3, 5).func_20011_a("shovelDiamond");
pickaxeDiamond = (new ItemPickaxe(22, EnumToolMaterial.EMERALD)).func_20010_a(3, 6).func_20011_a("pickaxeDiamond");
axeDiamond = (new ItemAxe(23, EnumToolMaterial.EMERALD)).func_20010_a(3, 7).func_20011_a("hatchetDiamond");
swordGold = (new ItemSword(27, EnumToolMaterial.GOLD)).func_20010_a(4, 4).func_20011_a("swordGold");
shovelGold = (new ItemSpade(28, EnumToolMaterial.GOLD)).func_20010_a(4, 5).func_20011_a("shovelGold");
pickaxeGold = (new ItemPickaxe(29, EnumToolMaterial.GOLD)).func_20010_a(4, 6).func_20011_a("pickaxeGold");
axeGold = (new ItemAxe(30, EnumToolMaterial.GOLD)).func_20010_a(4, 7).func_20011_a("hatchetGold");
hoeWood = (new ItemHoe(34, EnumToolMaterial.WOOD)).func_20010_a(0, 8).func_20011_a("hoeWood");
hoeStone = (new ItemHoe(35, EnumToolMaterial.STONE)).func_20010_a(1, 8).func_20011_a("hoeStone");
hoeSteel = (new ItemHoe(36, EnumToolMaterial.IRON)).func_20010_a(2, 8).func_20011_a("hoeIron");
hoeDiamond = (new ItemHoe(37, EnumToolMaterial.EMERALD)).func_20010_a(3, 8).func_20011_a("hoeDiamond");
hoeGold = (new ItemHoe(38, EnumToolMaterial.GOLD)).func_20010_a(4, 8).func_20011_a("hoeGold");
seeds = (new ItemSeeds(39, Block.crops.blockID)).func_20010_a(9, 0).func_20011_a("seeds");
doorWood = (new ItemDoor(68, Material.wood)).func_20010_a(11, 2).func_20011_a("doorWood");
bucketEmpty = (new ItemBucket(69, 0)).func_20010_a(10, 4).func_20011_a("bucket");
bucketWater = (new ItemBucket(70, Block.waterStill.blockID)).func_20010_a(11, 4).func_20011_a("bucketWater").func_21017_a(bucketEmpty);
bucketLava = (new ItemBucket(71, Block.lavaStill.blockID)).func_20010_a(12, 4).func_20011_a("bucketLava").func_21017_a(bucketEmpty);
doorSteel = (new ItemDoor(74, Material.iron)).func_20010_a(12, 2).func_20011_a("doorIron");
bucketMilk = (new ItemBucket(79, -1)).func_20010_a(13, 4).func_20011_a("milk").func_21017_a(bucketEmpty);
reed = (new ItemReed(82, Block.reed)).func_20010_a(11, 1).func_20011_a("reeds");
field_21022_aX = (new ItemReed(98, Block.field_21026_bg)).func_21009_c(1).func_20010_a(13, 1).func_20011_a("cake");
}
}
Yes I know its a lot of code but its everything i changed for this mod and Im not saying someone needs to sit down and go through all this code To Help Me If Its Something you Want To Do and can easily Do I will Greatly appricate it! And give you !!!! THANKS!
We can only helop you if you post us the error log output by the recompile.bat =/
Just go to cmd.exe and type recompile.bat>_name-whatever-log_.txt
<name-whatever-log> is not important, just a name you want for the log file :tongue.gif: (but add .txt!)
Hey hey hey hey hey maan.There arent any errors!!Game just crashes when block crafting!
I CAN just spawn block by the id BUT CANT craft it!
@kyshu: Take off that "abstract"! When did you add that?
I'm not sure why you added that, but you only use that keyword in very specific circumstances.
I'm not sure that it will fix your mod not working or not... let me know.
@minecraftstudio: Oh, I don't know why I didn't realize this before, but... It's because you're declaring your new tools with two ints (5000, 0).
The constructor wants an int and an enumerated type.
Look at how you coded your tool initializations:
HandPickSteel = (new ItemHandPickSteel(5002, 0)).func_20010_a(9, 15).func_20011_a("HandPickSteel");
And look at how Notch does it:
shovelSteel = (new ItemSpade(0, EnumToolMaterial.IRON)).func_20010_a(2, 5).func_20011_a("shovelIron");
See the difference there?
@Gloosx: I'm not sure dude. Your code looks okay as far as I can tell. Try running minecraft in command line and seeing if you can get a command line error.
I am trying to add a recipe using the modloader way but it doesn't work:
public class mod_SandStoneTOSand extends BaseMod
{
public mod_SandStoneTOSand()
{
}
public void AddRecipes(CraftingManager recipes)
{
recipes.addRecipe(new ItemStack(Block.sand, 4), new Object[] {
"#", Character.valueOf('#'), Block.field_9264_Q
});
}
public String Version()
{
return "Beta 1.2_02";
}
}
Error:
*** Minecraft Coder Pack Version 2.7 ***
Compiling Minecraft
sources\minecraft\net\minecraft\src\mod_SandStoneTOSand.java:9: cannot find symb
ol
symbol : class CraftingManager
location: class mod_SandStoneTOSand
public void AddRecipes(CraftingManager recipes)
^
sources\minecraft\net\minecraft\src\mod_SandStoneTOSand.java:11: cannot find sym
bol
symbol : class ItemStack
location: class mod_SandStoneTOSand
recipes.addRecipe(new ItemStack(Block.sand, 4), new Object[] {
^
sources\minecraft\net\minecraft\src\mod_SandStoneTOSand.java:11: cannot find sym
bol
symbol : variable Block
location: class mod_SandStoneTOSand
recipes.addRecipe(new ItemStack(Block.sand, 4), new Object[] {
^
sources\minecraft\net\minecraft\src\mod_SandStoneTOSand.java:12: cannot find sym
bol
symbol : variable Block
location: class mod_SandStoneTOSand
"#", Character.valueOf('#'), Block.field_9264_Q
^
4 errors
Compiling Minecraft Start Class
*** minecraft_server.jar was not found, skipping
=== MCP 2.7 recompile script finished ===
Press any key to continue . . .
thanks this helped :biggrin.gif:
[simg]http://i.min.us/ievcu8.png[/simg]
many thanks
Exon
sorted it , sorry to trouble you , wrong classpath
thankyou
Bumping, anybody know how to climb a new block type? Thanks!
Can you list all the mods you have?
Mods loaded:
ModLoader Beta 1.2_02v2
mod_Roads 1
I need help with this, I can't figure out what the symbol is, and private access?
Hate to keep quoting myself, but I found the answer for anybody who might need this later.
It's in EntityLiving.java, around line 520.
I modified line 521 to say this:
Where is what checked if my new 'ladderg' was climbable.
Hope that could help somebody!
No. If your portablegrill class is supposed to behave like a BlockContainer, then it is supposed to extend BlockContainer. But I said to remove .setHardness and the other function it errors on because BlockContainers apparently do not have those functions.
As well, for your other problem, look up "constructors" on a java tutorial. You either did not create the classes you're trying to declare those items as, or you didn't give those classes constructors. Either way that's a rookie mistake and you need to read up a bit on Java and programming to fix it.
@pwned: Using modloader is extremely easy actually. You simply create a new class that begins with "mod_" and instead of declaring things in minecraft's main classes like Item, Block, and Recipes, you instead put everything into your mod class. Check out the modloader Javadocs (separate download) to find out what goes into which function. And you can put your Block/Item declarations (the block = (new Block(#, #)) stuff) into a static { } function.
Also, you can declare as many static variables as you want. 'static' simply means that a variable will never change during a single program run.
@Kyshu: Yep, in fact, I think "package net.minecraft.src;" should probably go at the top of pretty much every class you could possibly make.
If you use the Eclipse IDE, and go to New > Class, it should even add that line (and a few others) for you.
Edit for new problem: You have to add the package line to the very TOP of the code. The very, very top. You have it after "extends BaseMod" and that's not where it goes. It is basically what tells the compiler where to find all the other minecraft code you are using. Without it nothing works. So it should ALWAYS be placed at the very top of every new class you make.
@everyone: I'm sorry I can't help everyone, and almost all of the problems are simply due to many of you not understanding programming. You would probably learn a lot simply by going through some Java learning tutorials. Having a better understanding of programming would probably help you to fix your errors.
Also, I recommend everyone use Eclipse or another Java IDE, not just notepad. If you set up an IDE correctly, then they will tell you what your errors are before you ever compile. You will get red stop signs over the lines erroring on you, and hovering your mouse over those signs tells you exactly what the problem is.
Things like this are how programmers get by. So learning to code is just one step, you should also learn to use your environment! :biggrin.gif:
If Anyones Seen My Above Posts About My Hand Pick Mod WOuld Be Great If Someone Could Help Me With The Error Code
Error code
And Heres My Item.Java Because That Seems To Be Where The Errors At
Item.Java
PLEASE HELP!
The Maze Adventure Map
http://www.youtube.com/user/Wiz909090
As for your problem, again, I think it is because you did not define your constructors, or your classes. I can't be sure which because I don't have all your code.
Edit: Also, FYI, that capitalizing every word thing can get kind of annoying.
hm.. is this up to date?
cuz now all of them called felid's or somthing
[simg]http://i.min.us/ievcu8.png[/simg]
hey guys bumping.
aand yeah this happen then mod was ported to modloader.
Code is here.
I really need your help Minecraftforum.
ItemHandPickWood.Java
ItemHandPickStone.Java
ItemHandPickSteel.Java
ItemHandPickDiamond.Java
ItemHandPickGold.Java
RecipesTools.Java
CraftingManager.Java
Item.Java
Yes I know its a lot of code but its everything i changed for this mod and Im not saying someone needs to sit down and go through all this code To Help Me If Its Something you Want To Do and can easily Do I will Greatly appricate it! And give you !!!! THANKS!
The Maze Adventure Map
http://www.youtube.com/user/Wiz909090
Hey hey hey hey hey maan.There arent any errors!!Game just crashes when block crafting!
I CAN just spawn block by the id BUT CANT craft it!
How do I set the Java PATH? I've been trying Google for the past 45 minutes and am now giving up, and posting.
I'm not sure why you added that, but you only use that keyword in very specific circumstances.
I'm not sure that it will fix your mod not working or not... let me know.
@minecraftstudio: Oh, I don't know why I didn't realize this before, but... It's because you're declaring your new tools with two ints (5000, 0).
The constructor wants an int and an enumerated type.
Look at how you coded your tool initializations:
And look at how Notch does it:
See the difference there?
@Gloosx: I'm not sure dude. Your code looks okay as far as I can tell. Try running minecraft in command line and seeing if you can get a command line error.
Error: