I managed to fix my errors and hopefully i can help you. If you were to look at my code it said ModLoader.addOveride. While making my coding that was what it(eclipse) said it was supposed to be as opposed to ModLoader.addOverride (one more r) When i typed in the extra r it brought up (string, string, int i) or something like that but if i deleted the int i it wouldnt work. If i deleted the int i and took one r off it still didnt work. What i did do to get it to work was deleting and uninstalling EVERYTHING then going on the internet and downloading the newest versions of everything again then installing it all again just to be safe. I then retyped the code and it worked. I dont know how one r was such a pain but it was. If this doesnt help you i hope will help someone else
Okay, I try it when i get home from school.
Thanks for the reply
Okay, I try it when i get home from school.
Thanks for the reply
If your gunna be doing it later on thing that i also did (on another computer that was having an error) was convert from
public static final net.minecraft.src.BlockPlatinumOre PlatinumOre;
static
{
PlatinumOre = (new BlockPlatinumOre(126, ModLoader.addOveride("/terrain.png", "/moreore/PlatinumOre.png"))).setHardness(5F).setResistance(6F).setBlockName("Platinum Ore");
}
into something like this
public static final net.minecraft.src.BlockPlatinumOre PlatinumOre = (new BlockPlatinumOre(126, ModLoader.addOveride("/terrain.png", "/moreore/PlatinumOre.png"))).setHardness(5F).setResistance(6F).setBlockName("Platinum Ore");
so the whole static section other than that was gone but i would consult mrsal about that because i dont know if that would have some negative affects to it.
Why won't my block smelt?!?
I did exactly what you did in the smelting tutorial, i got none errors and stille my block won't smelt.
Please tell me what wrong. Here is my code
package net.minecraft.src;
public class Mod_lol extends BaseMod
{
public static final Block HellstoneBlock;
static
{
HellstoneBlock = (new BlockHellstoneBlock(123, ModLoader.addOverride("/terrain.png","/mods/HellstoneBlock.png" ))).setHardness(3F).setResistance(5F).setStepSound(Block.soundWoodFootstep).setBlockName("Hellstone");
}
public Mod_lol()
{
ModLoader.registerBlock(HellstoneBlock);
ModLoader.addName(HellstoneBlock, "HellstoneBlock Ore");
ModLoader.addSmelting(Block.planks.blockID, new ItemStack(HellstoneBlock, 1));
}
public void load()
{
}
public String getVersion()
{
return "Minecraft 1.2.3 and above Prøving Mod";
}
}
Well if you don't care about it, THEN DON'T POST IT.
When i posted the error that was an error i had but sometime between when you replied and i posted that i fixed it. when i said i dont care for it i didn't mean it to be jerk i meant it by it had already been dealt with. Now I've stumbled upon another error where the thing says there is no errors in my coding but when i load it the game doesn't crash but the block doesn't spawn or smelt. here is the code:
the base file
package net.minecraft.src;
import java.util.Random;
public class Mod_Moreore extends BaseMod
{
public static final Block PlatinumOre;
static
{
PlatinumOre = (new BlockPlatinumOre(201, ModLoader.addOverride("/terrain.png", "/Moreore/PlatinumOre.png"))).setHardness(4.0F).setResistance(6.0F).setStepSound(Block.soundStoneFootstep).setBlockName("PlatinumOre");
}
public Mod_Moreore()
{
ModLoader.registerBlock(PlatinumOre);
ModLoader.addName(PlatinumOre, "Platinum Ore");
ModLoader.addSmelting(Block.planks.blockID, new ItemStack(PlatinumOre, 1));
}
public void generateSurface(World world, Random rand, int chunkx, int chunkz)
{
//Platinum Ore
for(int l = 0; l<45; l++)
{
int i1 = chunkx +rand.nextInt(16);
int j1 = rand.nextInt(64);
int k1 = chunkz + rand.nextInt(16);
(new WorldGenMinable(PlatinumOre.blockID, 20)).generate(world, rand, i1, j1, k1);
}
//end Platinum Ore
}
public void load()
{
}
public String getVersion()
{
return "Minecraft 1.2.3 Moreore mod";
}
}
and the block
package net.minecraft.src;
import java.util.Random;
public class BlockPlatinumOre extends BlockStone
{
public BlockPlatinumOre(int i, int j)
{
super(i, j);
}
public int quantityDropped(Random random)
{
return 1;
}
public int idDropped(int i, Random random, int j)
{
return Mod_Moreore.PlatinumOre.blockID;
}
}
When i posted the error that was an error i had but sometime between when you replied and i posted that i fixed it. when i said i dont care for it i didn't mean it to be jerk i meant it by it had already been dealt with. Now I've stumbled upon another error where the thing says there is no errors in my coding but when i load it the game doesn't crash but the block doesn't spawn or smelt. here is the code:
the base file
package net.minecraft.src;
import java.util.Random;
public class Mod_Moreore extends BaseMod
{
public static final Block PlatinumOre;
static
{
PlatinumOre = (new BlockPlatinumOre(201, ModLoader.addOverride("/terrain.png", "/Moreore/PlatinumOre.png"))).setHardness(4.0F).setResistance(6.0F).setStepSound(Block.soundStoneFootstep).setBlockName("PlatinumOre");
}
public Mod_Moreore()
{
ModLoader.registerBlock(PlatinumOre);
ModLoader.addName(PlatinumOre, "Platinum Ore");
ModLoader.addSmelting(Block.planks.blockID, new ItemStack(PlatinumOre, 1));
}
public void generateSurface(World world, Random rand, int chunkx, int chunkz)
{
//Platinum Ore
for(int l = 0; l<45; l++)
{
int i1 = chunkx +rand.nextInt(16);
int j1 = rand.nextInt(64);
int k1 = chunkz + rand.nextInt(16);
(new WorldGenMinable(PlatinumOre.blockID, 20)).generate(world, rand, i1, j1, k1);
}
//end Platinum Ore
}
public void load()
{
}
public String getVersion()
{
return "Minecraft 1.2.3 Moreore mod";
}
}
and the block
package net.minecraft.src;
import java.util.Random;
public class BlockPlatinumOre extends BlockStone
{
public BlockPlatinumOre(int i, int j)
{
super(i, j);
}
public int quantityDropped(Random random)
{
return 1;
}
public int idDropped(int i, Random random, int j)
{
return Mod_Moreore.PlatinumOre.blockID;
}
}
I got the same problem
If you find out how to fix it, PLEASEEEE help me
Adding new armor, and I made a new Enum and ItemArmor. What did I do wrong? The armor won't go into the armor slot in game
package net.minecraft.src;
public class ItemDiamondEdgedArmor extends Item
{
private static final int maxDamageArray[] =
{
11, 16, 15, 13
};
/**
* Stores the armor type: 0 is helmet, 1 is plate, 2 is legs and 3 is boots
*/
public final int armorType;
/** Holds the amount of damage that the armor reduces at full durability. */
public final int damageReduceAmount;
/**
* Used on RenderPlayer to select the correspondent armor to be rendered on the player: 0 is cloth, 1 is chain, 2 is
* iron, 3 is diamond and 4 is gold.
*/
public final int renderIndex;
/** The EnumArmorMaterial used for this ItemArmor */
private final EnumDiamondEdgedArmorMaterial material;
public ItemDiamondEdgedArmor(int par1, EnumDiamondEdgedArmorMaterial par2EnumArmorMaterial, int par3, int par4)
{
super(par1);
material = par2EnumArmorMaterial;
armorType = par4;
renderIndex = par3;
damageReduceAmount = par2EnumArmorMaterial.getDamageReductionAmount(par4);
setMaxDamage(par2EnumArmorMaterial.getDurability(par4));
maxStackSize = 1;
}
/**
* Return the enchantability factor of the item, most of the time is based on material.
*/
public int getItemEnchantability()
{
return material.getEnchantability();
}
/**
* Returns the 'max damage' factor array for the armor, each piece of armor have a durability factor (that gets
* multiplied by armor material factor)
*/
static int[] getMaxDamageArray()
{
return maxDamageArray;
}
}
package net.minecraft.src;
public enum EnumDiamondEdgedArmorMaterial
{
DIAMONDEDGED(40, new int[] {
3, 10, 8, 3
}, 0);
/**
* Holds the maximum damage factor (each piece multiply this by it's own value) of the material, this is the item
* damage (how much can absorb before breaks)
*/
private int maxDamageFactor;
private int damageReductionAmountArray[];
/** Return the enchantability factor of the material */
private int enchantability;
private EnumDiamondEdgedArmorMaterial(int par3, int par4ArrayOfInteger[], int par5)
{
maxDamageFactor = par3;
damageReductionAmountArray = par4ArrayOfInteger;
enchantability = par5;
}
/**
* Returns the durability for a armor slot of for this type.
*/
public int getDurability(int par1)
{
return ItemArmor.getMaxDamageArray()[par1] * maxDamageFactor;
}
/**
* Return the damage reduction (each 1 point is a half a shield on gui) of the piece index passed (0 = helmet, 1 =
* plate, 2 = legs and 3 = boots)
*/
public int getDamageReductionAmount(int par1)
{
return damageReductionAmountArray[par1];
}
/**
* Return the enchantability factor of the material.
*/
public int getEnchantability()
{
return enchantability;
}
}
and the mod
package net.minecraft.src;
import java.util.Random;
public class mod_everything extends BaseMod
{
public static Item PumpkinSpice;
public static final Item PumpkinCookie = (new ItemFood(999, 1, 1F, false)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/PumpkinCookie.png")).setItemName("PumpkinCookie");
public static Item PurpleSword;
public static final Block CompressedObsidian;
public static final Block PureObsidian;
public static final Block DiamondEdgedObsidian;
public static Item DiamondEdgedIngot;
public static Item DiamondEdgedSword;
public static Item DiamondEdgedAxe;
public static Item DiamondEdgedShovel;
public static Item DiamondEdgedPick;
public static Item DiamondEdgedHoe;
static
{
PumpkinSpice = (new Item(1000)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/PumpkinSpice.png")).setItemName("PumpkinSpice");
PurpleSword = (new ItemPurpleSword(8010, EnumToolMaterial.STONE)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/PurpleSword.png")).setItemName("PurpleSword");
CompressedObsidian = (new BlockCompressedObsidian(200, ModLoader.addOverride("/terrain.png", "/mods/CompressedObsidian.png"))).setHardness(5F).setResistance(2000F).setStepSound(Block.soundStoneFootstep).setBlockName("CompressedObsidian");
PureObsidian = (new BlockPureObsidian(201, ModLoader.addOverride("/terrain.png", "/mods/PureObsidian.png"))).setHardness(5F).setResistance(2000F).setStepSound(Block.soundGlassFootstep).setBlockName("PureObsidian");
DiamondEdgedObsidian = (new BlockDiamondEdgedObsidian(202, ModLoader.addOverride("/terrain.png", "/mods/DiamondEdgedObsidian.png"))).setHardness(5F).setResistance(2000F).setStepSound(Block.soundGlassFootstep).setBlockName("DiamondEdgedObsidian");
DiamondEdgedIngot = (new Item(8004)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/DiamondEdgedIngot.png")).setItemName("DiamondEdgedIngot");
DiamondEdgedSword = (new ItemDiamondEdgedSword(8005, EnumDiamondEdgedToolMaterial.DIAMONDEDGED)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/DiamondEdgedSword.png")).setItemName("DiamondEdgedSword");
DiamondEdgedAxe = (new ItemDiamondEdgedAxe(8006, EnumDiamondEdgedToolMaterial.DIAMONDEDGED)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/DiamondEdgedAxe.png")).setItemName("DiamondEdgedAxe");
DiamondEdgedShovel = (new ItemDiamondEdgedShovel(8007, EnumDiamondEdgedToolMaterial.DIAMONDEDGED)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/DiamondEdgedShovel.png")).setItemName("DiamondEdgedShovel");
DiamondEdgedPick = (new ItemDiamondEdgedPick(8008, EnumDiamondEdgedToolMaterial.DIAMONDEDGED)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/DiamondEdgedPick.png")).setItemName("DiamondEdgedPick");
DiamondEdgedHoe = (new ItemDiamondEdgedHoe(8009, EnumDiamondEdgedToolMaterial.DIAMONDEDGED)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/DiamondEdgedHoe.png")).setItemName("DiamondEdgedHoe");
}
public void load()
{
//Pumpkin
ModLoader.addName(PumpkinSpice, "Pumpkin Spice");
ModLoader.addRecipe(new ItemStack(PumpkinSpice, 3), new Object[]{
"xxx", Character.valueOf('x'), Block.pumpkin
});
ModLoader.addName(PumpkinCookie, "Pumpkin Cookie");
ModLoader.addRecipe(new ItemStack(PumpkinCookie, 8), new Object[]{
"wsw", Character.valueOf('s'), PumpkinSpice, Character.valueOf('w'), Item.wheat
});
//CoLoRs!
ModLoader.addName(PurpleSword, "Purple Sword");
ModLoader.addRecipe(new ItemStack(PurpleSword, 1), new Object[]{
" p ", " p ", " s ", Character.valueOf('p'), Block.cloth, Character.valueOf('s'), Item.stick
});
//Diamond Edged Obsidian
ModLoader.registerBlock(CompressedObsidian);
ModLoader.addName(CompressedObsidian, "Compressed Obsidian");
ModLoader.addRecipe(new ItemStack(CompressedObsidian, 1), new Object[]{
"ooo", "ooo", "ooo", Character.valueOf('o'), Block.obsidian
});
ModLoader.registerBlock(PureObsidian);
ModLoader.addName(PureObsidian, "Pure Obsidian");
ModLoader.addSmelting(CompressedObsidian.blockID, new ItemStack(PureObsidian, 1));
ModLoader.registerBlock(DiamondEdgedObsidian);
ModLoader.addName(DiamondEdgedObsidian, "Diamond Edged Obsidian");
ModLoader.addRecipe(new ItemStack(DiamondEdgedObsidian, 1), new Object[]{
"od", Character.valueOf('o'), PureObsidian, Character.valueOf('d'), Item.diamond
});
ModLoader.addName(DiamondEdgedIngot, "Diamond Edged Ingot");
ModLoader.addSmelting(DiamondEdgedObsidian.blockID, new ItemStack(DiamondEdgedIngot));
ModLoader.addName(DiamondEdgedSword, "Diamond Edged Sword");
ModLoader.addRecipe(new ItemStack(DiamondEdgedSword, 1), new Object []{
" d ", " d ", " s ", Character.valueOf('d'), DiamondEdgedIngot, Character.valueOf('s'), Item.stick
});
ModLoader.addName(DiamondEdgedAxe, "Diamond Edged Axe");
ModLoader.addRecipe(new ItemStack(DiamondEdgedAxe, 1), new Object []{
"dd ", "ds ", " s ", Character.valueOf('d'), DiamondEdgedIngot, Character.valueOf('s'), Item.stick
});
ModLoader.addName(DiamondEdgedShovel, "Diamond Edged Shovel");
ModLoader.addRecipe(new ItemStack(DiamondEdgedShovel, 1), new Object []{
" d ", " s ", " s ", Character.valueOf('d'), DiamondEdgedIngot, Character.valueOf('s'), Item.stick
});
ModLoader.addName(DiamondEdgedPick, "Diamond Edged Pickaxe");
ModLoader.addRecipe(new ItemStack(DiamondEdgedPick, 1), new Object []{
"ddd", " s ", " s ", Character.valueOf('d'), DiamondEdgedIngot, Character.valueOf('s'), Item.stick
});
ModLoader.addName(DiamondEdgedHoe, "Diamond Edged Hoe");
ModLoader.addRecipe(new ItemStack(DiamondEdgedHoe, 1), new Object []{
"dd ", " s ", " s ", Character.valueOf('d'), DiamondEdgedIngot, Character.valueOf('s'), Item.stick
});
}
public static Item PumpkinHelmet;
public static Item PumpkinChest;
public static Item PumpkinLegs;
public static Item PumpkinBoots;
public static Item DiamondEdgedHelmet;
public static Item DiamondEdgedChest;
public static Item DiamondEdgedLegs;
public static Item DiamondEdgedBoots;
public mod_everything()
{
ModLoader.registerBlock(CompressedObsidian);
ModLoader.registerBlock(PureObsidian);
ModLoader.registerBlock(DiamondEdgedObsidian);
}
static
{
PumpkinHelmet = (new ItemArmor(8000, EnumArmorMaterial.CLOTH, 5, 0)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/PumpkinHelmet.png")).setItemName("PumpkinHelmet");
PumpkinChest = (new ItemArmor(8001, EnumArmorMaterial.CLOTH, 5, 1)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/PumpkinChest.png")).setItemName("PumpkinChest");
PumpkinLegs = (new ItemArmor(8002, EnumArmorMaterial.CLOTH, 5, 2)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/PumpkinLegs.png")).setItemName("PumpkinLegs");
PumpkinBoots = (new ItemArmor(8003, EnumArmorMaterial.CLOTH, 5, 3)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/PumpkinBoots.png")).setItemName("PumpkinBoots");
ModLoader.addName(PumpkinHelmet, "Pumpkin Helmet");
ModLoader.addName(PumpkinChest, "Pumpkin Chestplate");
ModLoader.addName(PumpkinLegs, "Pumpkin Leggings");
ModLoader.addName(PumpkinBoots, "Pumpkin Boots");
ModLoader.addArmor("pumpkin");
ModLoader.addRecipe(new ItemStack(PumpkinHelmet, 1), new Object[]{
"ppp", "p p", Character.valueOf('p'), Block.pumpkin
});
ModLoader.addRecipe(new ItemStack(PumpkinChest, 1), new Object[]{
"p p", "ppp", "ppp", Character.valueOf('p'), Block.pumpkin
});
ModLoader.addRecipe(new ItemStack(PumpkinLegs, 1), new Object[]{
"ppp", "p p", "p p", Character.valueOf('p'), Block.pumpkin
});
ModLoader.addRecipe(new ItemStack(PumpkinBoots, 1), new Object[]{
"p p", "p p", Character.valueOf('p'), Block.pumpkin
});
DiamondEdgedHelmet = (new ItemDiamondEdgedArmor(8011, EnumDiamondEdgedArmorMaterial.DIAMONDEDGED, 6, 0)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/DiamondEdgedHelmet.png")).setItemName("DiamondEdgedHelmet");
DiamondEdgedChest = (new ItemDiamondEdgedArmor(8012, EnumDiamondEdgedArmorMaterial.DIAMONDEDGED, 6, 1)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/DiamondEdgedChest.png")).setItemName("DiamondEdgedChest");
DiamondEdgedLegs = (new ItemDiamondEdgedArmor(8013, EnumDiamondEdgedArmorMaterial.DIAMONDEDGED, 6, 2)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/DiamondEdgedLegs.png")).setItemName("DiamondEdgedLegs");
DiamondEdgedBoots = (new ItemDiamondEdgedArmor(8014, EnumDiamondEdgedArmorMaterial.DIAMONDEDGED, 6, 3)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/DiamondEdgedBoots.png")).setItemName("DiamondEdgedBoots");
ModLoader.addName(DiamondEdgedHelmet, "Diamond Edged Helmet");
ModLoader.addName(DiamondEdgedChest, "Diamond Edged Chestplate");
ModLoader.addName(DiamondEdgedLegs, "Diamond Edged Leggings");
ModLoader.addName(DiamondEdgedBoots, "Diamond Edged Boots");
ModLoader.addArmor("DiamondEdged");
ModLoader.addRecipe(new ItemStack(DiamondEdgedHelmet, 1), new Object[]{
"ppp", "p p", Character.valueOf('p'), Block.dirt
});
ModLoader.addRecipe(new ItemStack(DiamondEdgedChest, 1), new Object[]{
"p p", "ppp", "ppp", Character.valueOf('p'), Block.dirt
});
ModLoader.addRecipe(new ItemStack(DiamondEdgedLegs, 1), new Object[]{
"ppp", "p p", "p p", Character.valueOf('p'), Block.dirt
});
ModLoader.addRecipe(new ItemStack(DiamondEdgedBoots, 1), new Object[]{
"p p", "p p", Character.valueOf('p'), Block.dirt
});
}
@Override
public String getVersion() {
// TODO Auto-generated method stub
return null;
}
}
If your gunna be doing it later on thing that i also did (on another computer that was having an error) was convert from
public static final net.minecraft.src.BlockPlatinumOre PlatinumOre;
static
{
PlatinumOre = (new BlockPlatinumOre(126, ModLoader.addOveride("/terrain.png", "/moreore/PlatinumOre.png"))).setHardness(5F).setResistance(6F).setBlockName("Platinum Ore");
}
into something like this
public static final net.minecraft.src.BlockPlatinumOre PlatinumOre = (new BlockPlatinumOre(126, ModLoader.addOveride("/terrain.png", "/moreore/PlatinumOre.png"))).setHardness(5F).setResistance(6F).setBlockName("Platinum Ore");
so the whole static section other than that was gone but i would consult mrsal about that because i dont know if that would have some negative affects to it.
You could do that. Just take out the minecraft.net.src part between public static final and you need Block BlockPlantinum. Geeze that was confusing ill post the code I mean.
public static final Block PlatinumOre = (new BlockPlatinumOre(126, ModLoader.addOveride("/terrain.png", "/moreore/PlatinumOre.png"))).setHardness(5F).setResistance(6F).setBlockName("Platinum Ore");
i have done the way that i posted before which removes errors if you are having some but i can never fix the fact that the block wont spawn or smelt. I know for a fact that it works because when i try to use the exact coding you use with the tutorial block it works but when i do it with platinum it doesn't work.I think i made some stupid little mistake but i cant see it.
base file
package net.minecraft.src;
import java.util.Random;
public class Mod_Moreore extends BaseMod
{
// Declaration
public static final Block PlatinumOre = (new BlockPlatinumOre(123, ModLoader.addOverride("/terrain.png", "/Moreore/PlatinumOre.png"))).setHardness(4.0F).setResistance(6.0F).setStepSound(Block.soundStoneFootstep).setBlockName("PlatinumOre");
public Mod_Moreore()
{
ModLoader.registerBlock(PlatinumOre);
ModLoader.addName(PlatinumOre, "Platinum Ore");
ModLoader.addSmelting(Block.planks.blockID, new ItemStack(PlatinumOre, 1));
}
public void generateSurface(World world, Random rand, int chunkx, int chunkz)
{
//Platinum Ore
for(int l = 0; l<45; l++)
{
int i1 = chunkx +rand.nextInt(16);
int j1 = rand.nextInt(64);
int k1 = chunkz + rand.nextInt(16);
(new WorldGenMinable(PlatinumOre.blockID, 20)).generate(world, rand, i1, j1, k1);
}
//end Platinum Ore
}
public void load()
{
}
public String getVersion()
{
return "Minecraft 1.2.3 Moreore mod";
}
}
block
package net.minecraft.src;
import java.util.Random;
public class BlockPlatinumOre extends BlockStone
{
public BlockPlatinumOre(int i, int j)
{
super(i, j);
}
public int quantityDropped(Random random)
{
return 1;
}
public int idDropped(int i, Random random, int j)
{
return Mod_Moreore.PlatinumOre.blockID;
}
}
OK. I would really appreciate some help here because this error has been bothering me. Eclipse says there are no errors but when i try running it the error appears. Here it is. (Im making a practice mod that i will reference to when making a bigger mod.)
java.lang.NullPointerException
at net.minecraft.src.ModLoader.addName(ModLoader.java:341)
at net.minecraft.src.ModLoader.addName(ModLoader.java:304)
at net.minecraft.src.mod_Practice.<init>(mod_Practice.java:88)
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:284)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1290)
at net.minecraft.src.ModLoader.init(ModLoader.java:846)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:154)
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:423)
at net.minecraft.client.Minecraft.run(Minecraft.java:784)
at java.lang.Thread.run(Unknown Source)
I have a slight problem. I followed the custom armor tutorial and everything, however when I test my armor just looks like a Diamond chestplate (like at the end of the tutorial when you tested it). How do I fix this? Here's my code:
package net.minecraft.src;
import net.minecraft.src.Block;
import net.minecraft.src.EnumArmorMaterial;
import net.minecraft.src.EnumCreatureType;
import java.util.Map;
public class mod_undiscovered extends BaseMod
{
public static Item Quiver;
public static Block Sponge;
public static final Block CryingObsidian;
static
{
Block.blocksList[Block.sponge.blockID] = null;
Item.itemsList[Block.sponge.blockID] = null;
Sponge = (new BlockAbsorb(Block.sponge.blockID)).setHardness(0.6F).setRequiresSelfNotify().setBlockName("sponge");
CryingObsidian = (new BlockCryingObsidian(126, ModLoader.addOverride("/terrain.png", "/mods/CryingObsidianBlock.png"))).setHardness(50F).setResistance(2000F).setStepSound(Block.soundStoneFootstep).setBlockName("CryingObsidian");
Quiver = (new ItemArmor(130, EnumArmorMaterial.CLOTH, 3, 1)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/Quiver.png")).setItemName("Quiver");
}
public mod_undiscovered()
{
ModLoader.addArmor("Quiver");
ModLoader.registerEntityID(EntityGiantZombie.class, "Giant", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityGiantZombie.class, 20, 20, 20, EnumCreatureType.monster);
ModLoader.addName(Quiver, "Quiver");
ModLoader.addRecipe(new ItemStack(mod_undiscovered.Quiver, 1), new Object[]
{
"LL", "LL", "LL", Character.valueOf('L'), Item.leather
});
ModLoader.addName(CryingObsidian, "Crying Obsidian");
ModLoader.registerBlock(CryingObsidian);
ModLoader.addRecipe(new ItemStack(mod_undiscovered.CryingObsidian, 1), new Object[]
{
"L", "O", "L", Character.valueOf('L'), Block.blockLapis, Character.valueOf('O'), Block.obsidian
});
}
public void load()
{
ModLoader.registerBlock(Sponge, net.minecraft.src.ItemAbsorb.class);
Sponge.blockIndexInTexture = Block.sponge.blockIndexInTexture;
Item.itemsList[Sponge.blockID] = null;
Item.itemsList[Sponge.blockID] = (new ItemAbsorb(Sponge.blockID - 256)).setItemName("loComp");
}
public String getVersion()
{
return "Minecraft 1.2.3 Undiscovered Mod";
}
}
P.S. The armor is the quiver. Also, I only want it to be a chestplate armor. No others
Yo Stormister the part of your code right here.
Quiver = (new ItemArmor(130, EnumArmorMaterial.CLOTH, 3, 1)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/Quiver.png")).setItemName("Quiver");
}
The 3 is whats causing your armor to look like diamond. just add your own texture to the armor folder (make sure you have both the Quiver_1 and Quiver_2 in there.) and then do the ModLoader.addArmor("Quiver") and replace the 3 with a 5.
Yo Stormister the part of your code right here.
Quiver = (new ItemArmor(130, EnumArmorMaterial.CLOTH, 3, 1)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/Quiver.png")).setItemName("Quiver");
}
The 3 is whats causing your armor to look like diamond. just add your own texture to the armor folder (make sure you have both the Quiver_1 and Quiver_2 in there.) and then do the ModLoader.addArmor("Quiver") and replace the 3 with a 5.
How can I make my block drop itself? Like Gold ore does?
java.lang.ExceptionInInitializerError
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:284)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1290)
at net.minecraft.src.ModLoader.init(ModLoader.java:846)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:154)
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:423)
at net.minecraft.client.Minecraft.run(Minecraft.java:784)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Slot 124 is already occupied by net.minecraft.src.BlockRedstoneLight@1a2bf865 when adding net.minecraft.src.BlockHellStone@3cc0bc4f
at net.minecraft.src.Block.<init>(Block.java:273)
at net.minecraft.src.Block.<init>(Block.java:308)
at net.minecraft.src.BlockStone.<init>(BlockStone.java:9)
at net.minecraft.src.BlockHellStone.<init>(BlockHellStone.java:9)
at net.minecraft.src.mod_HellStone.<clinit>(mod_HellStone.java:12)
... 15 more
By the way thats the error im getting when starting up. HellStone is my block name
How can I make my block drop itself? Like Gold ore does?
java.lang.ExceptionInInitializerError
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:284)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1290)
at net.minecraft.src.ModLoader.init(ModLoader.java:846)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:154)
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:423)
at net.minecraft.client.Minecraft.run(Minecraft.java:784)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Slot 124 is already occupied by net.minecraft.src.BlockRedstoneLight@1a2bf865 when adding net.minecraft.src.BlockHellStone@3cc0bc4f
at net.minecraft.src.Block.<init>(Block.java:273)
at net.minecraft.src.Block.<init>(Block.java:308)
at net.minecraft.src.BlockStone.<init>(BlockStone.java:9)
at net.minecraft.src.BlockHellStone.<init>(BlockHellStone.java:9)
at net.minecraft.src.mod_HellStone.<clinit>(mod_HellStone.java:12)
... 15 more
By the way thats the error im getting when starting up. HellStone is my block name
Okay, I try it when i get home from school.
Thanks for the reply
If your gunna be doing it later on thing that i also did (on another computer that was having an error) was convert from
into something like this
so the whole static section other than that was gone but i would consult mrsal about that because i dont know if that would have some negative affects to it.
I did exactly what you did in the smelting tutorial, i got none errors and stille my block won't smelt.
Please tell me what wrong. Here is my code
When i posted the error that was an error i had but sometime between when you replied and i posted that i fixed it. when i said i dont care for it i didn't mean it to be jerk i meant it by it had already been dealt with. Now I've stumbled upon another error where the thing says there is no errors in my coding but when i load it the game doesn't crash but the block doesn't spawn or smelt. here is the code:
the base file
and the block
EDIT: Just realised guy above me already asked.
I got the same problem
If you find out how to fix it, PLEASEEEE help me
and the mod
You could do that. Just take out the minecraft.net.src part between public static final and you need Block BlockPlantinum. Geeze that was confusing ill post the code I mean.
Now is this what you were trying to do?
Yup
That guy that makes the wheels turn.. Y'know...
base file
block
java.lang.NullPointerException
at net.minecraft.src.ModLoader.addName(ModLoader.java:341)
at net.minecraft.src.ModLoader.addName(ModLoader.java:304)
at net.minecraft.src.mod_Practice.<init>(mod_Practice.java:88)
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:284)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1290)
at net.minecraft.src.ModLoader.init(ModLoader.java:846)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:154)
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:423)
at net.minecraft.client.Minecraft.run(Minecraft.java:784)
at java.lang.Thread.run(Unknown Source)
Thx for the help!
P.S. The armor is the quiver. Also, I only want it to be a chestplate armor. No others
Quiver = (new ItemArmor(130, EnumArmorMaterial.CLOTH, 3, 1)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/Quiver.png")).setItemName("Quiver");
}
The 3 is whats causing your armor to look like diamond. just add your own texture to the armor folder (make sure you have both the Quiver_1 and Quiver_2 in there.) and then do the ModLoader.addArmor("Quiver") and replace the 3 with a 5.
Thank you so much! Really appreciate it!
You're welcome Now if only i could figure out my problem.
java.lang.ExceptionInInitializerError
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:284)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1290)
at net.minecraft.src.ModLoader.init(ModLoader.java:846)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:154)
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:423)
at net.minecraft.client.Minecraft.run(Minecraft.java:784)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Slot 124 is already occupied by net.minecraft.src.BlockRedstoneLight@1a2bf865 when adding net.minecraft.src.BlockHellStone@3cc0bc4f
at net.minecraft.src.Block.<init>(Block.java:273)
at net.minecraft.src.Block.<init>(Block.java:308)
at net.minecraft.src.BlockStone.<init>(BlockStone.java:9)
at net.minecraft.src.BlockHellStone.<init>(BlockHellStone.java:9)
at net.minecraft.src.mod_HellStone.<clinit>(mod_HellStone.java:12)
... 15 more
By the way thats the error im getting when starting up. HellStone is my block name
package net.minecraft.src;
import java.util.Random;
public class mod_HellStone extends BaseMod
{
public static final Block HellStone;
static
{
HellStone = (new BlockHellStone(124, ModLoader.addOverride("/terrain.png", "/mods/HellStone.png"))).setHardness(3F).setResistance(4F).setStepSound(Block.soundMetalFootstep).setBlockName("HellStone Block");
}
public mod_HellStone()
{
}
public void GenerateSurface(World world, Random rand, int chunkx, int chunkz)
{
//HellStone
for (int l = 0; l<45; l++);
{
int i1 = chunkx +rand.nextInt(16);
int j1 = rand.nextInt (64);
int k1 = chunkz +rand.nextInt (16);
(new WorldGenMinable(HellStone.blockID, 20)).generate(world, rand, i1 ,j1 ,k1 );
}
//end HellStone
}
public void load()
{
}
public String getVersion()
{
return "HellStone 2.1.3";
}
}
Theres my code for mod_HellStone.java
Yo dude do you have a HellStone.class File?