(new WorldGenMinable(BronzeOre.blockID, 156)).generate(world, random, randPosX, randPosY, randPosZ);
Do you mean this? I thought where it was BronzeOre.blockID, <number> that where the number was, was actually the ID, or is it the maximum height the ore can spawn at?
Yes, I mean the 156 in the line you posted. That is the number of blocks in the vein.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I tried to make some tools, but i got an crash. Yes, i know that its not from tech guys tutorial, but i made some tools before, then i copied them and changed names, i got crash. Then i noticed i was missing constructor for pickaxe, but then i added it, i got 17 errors. So if someone could help i would appriciate that.
Here is my crash report:
Mods loaded: 3
ModLoader 1.2.5
mod_ModLoaderMp 1.2.5v1
mod_Mystic 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 30d978f4 --------
Generated 29.5.2012 16:28
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.6.0_26, Sun Microsystems Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce GT 420/PCI/SSE2 version 4.0.0, NVIDIA Corporation
java.lang.StringIndexOutOfBoundsException: String index out of range: 8
at java.lang.String.charAt(String.java:686)
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:394)
at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:412)
at net.minecraft.src.mod_Mystic.load(mod_Mystic.java:95)
at net.minecraft.src.ModLoader.init(ModLoader.java:856)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:662)
--- END ERROR REPORT 3c96cd7a ----------
And here is my code:
package net.minecraft.src;
import java.util.Random;
import java.util.Map;
public class mod_Mystic extends BaseMod
{
//Ores
public static final Block mysticore = new BlockMysticOre(200, 0).setBlockName("Mysticore").setHardness(3F).setResistance(10F);
public static final Block mysticorered = new BlockMysticOreRed(127, 0).setBlockName("MysticRedOre").setHardness(3F).setResistance(10F);
public static final Block mysticoregreen = new BlockMysticOreGreen(125, 0).setBlockName("Mysticoregreen").setHardness(3F).setResistance(10F);
//Items
public static final Item mysticgem = new ItemMysticGem(5000).setItemName("Mysticgem");
public static final Item mysticgemred = new ItemMysticGemRed(5001).setItemName("Mysticgemred");
//Others
public static final Block mysticgrass = new BlockMysticGrass(126, 0).setBlockName("Mysticgrass").setHardness(0.5F).setResistance(2F).setStepSound(Block.soundGrassFootstep);
public static final BiomeGenBase mysticbiome = (new BiomeGenMysticBiome(25)).setColor(0xfa9418).setBiomeName("Mystic Biome");
public static final Block mystictorch = new BlockTorch(201, 0).setBlockName("Mystictorch").setHardness(0.01F).setResistance(0.1F).setLightValue(2.0F);public static final Item mysticgemgreen = new ItemMysticGemGreen(5002).setItemName("Mysticgemgreen");
public static final Block mysticflower = new BlockMysticFlower(202, 0).setBlockName("mysticflaua");
//green tools
public static final Item mysticpickaxegreen = new ItemPickaxe(5003, EnumToolMaterial.MYSTICGREEN).setItemName("Mysticpickaxegreen");
public static final Item mysticswordgreen = new ItemSword(5004, EnumToolMaterial.MYSTICGREEN).setItemName("Mysticswordgreen");
public static final Item mysticshovelgreen = new ItemSpade(5005, EnumToolMaterial.MYSTICGREEN).setItemName("Mysticshovelgreen");
public static final Item mysticaxegreen = new ItemAxe(5006, EnumToolMaterial.MYSTICGREEN).setItemName("Mysticaxegreen");
public static final Item mystichoegreen = new ItemHoe(5007, EnumToolMaterial.MYSTICGREEN).setItemName("Mystichoegreen");
//blue tools
public static final Item mysticpickaxeblue = new ItemPickaxe(5008, EnumToolMaterial.MYSTICBLUE).setItemName("Mysticpickaxeblue");
public static final Item mysticswordblue = new ItemSword(5009, EnumToolMaterial.MYSTICBLUE).setItemName("Mysticswordblue");
public static final Item mysticshovelblue = new ItemSpade(5010, EnumToolMaterial.MYSTICBLUE).setItemName("Mysticshovelblue");
public static final Item mysticaxeblue = new ItemAxe(5011, EnumToolMaterial.MYSTICBLUE).setItemName("Mysticaxeblue");
public static final Item mystichoeblue = new ItemHoe(5012, EnumToolMaterial.MYSTICBLUE).setItemName("Mystichoeblue");
public void load()
{
//Mystic Ore Blue
mysticore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Mystic/MysticOre.png");
ModLoader.registerBlock(mysticore);
ModLoader.addName(mysticore, "Mystic Ore");
//Mystical Gem blue
mysticgem.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mystic/MysticGem.png");
ModLoader.addName(mysticgem, "Mystical Gem");
//Mystic Grass
mysticgrass.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Mystic/MysticGrass.png");
ModLoader.registerBlock(mysticgrass);
ModLoader.addName(mysticgrass, "Mystical Grass");
//Mystic biome
ModLoader.addBiome(mysticbiome);
//Mystic Red ore
mysticorered.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Mystic/MysticOreRed.png");
ModLoader.registerBlock(mysticorered);
ModLoader.addName(mysticorered, "Red Mystic Ore");
//Mystic Red Gem
mysticgemred.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mystic/MysticGemRed.png");
ModLoader.addName(mysticgemred, "Mystical Gem");
//Mystic Torch
mystictorch.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Mystic/MysticTorch.png");
ModLoader.registerBlock(mystictorch);
ModLoader.addName(mystictorch, "Mystic Torch");
ModLoader.addRecipe(new ItemStack(mystictorch, 16), new Object [] {
"X", "S", Character.valueOf('S'), Item.stick, Character.valueOf('X'), mysticgemred
});
//Green mystic Gem
mysticgemgreen.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mystic/MysticGemGreen.png");
ModLoader.addName(mysticgemgreen, "Mystical Gem");
//Green mystic ore
mysticoregreen.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Mystic/MysticOreGreen.png");
ModLoader.registerBlock(mysticoregreen);
ModLoader.addName(mysticoregreen, "Green Mystic Ore");
//Mystic tool
mysticpickaxegreen.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mystic/MysticPickaxeGreen.png");
ModLoader.addName(mysticpickaxegreen, "Mystical Pickaxe");
ModLoader.addRecipe(new ItemStack(mysticpickaxegreen, 1), new Object [] {
"XXX", " S ", " S ", Character.valueOf('S'), Item.stick, Character.valueOf('X'), mysticgemgreen
});
//Mystic tool
mysticswordgreen.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mystic/MysticSwordGreen.png");
ModLoader.addName(mysticswordgreen, "Mystical Sword");
ModLoader.addRecipe(new ItemStack(mysticswordgreen, 1), new Object [] {
" X ", " X ", " S ", Character.valueOf('S'), Item.stick, Character.valueOf('X'), mysticgemgreen
});
//Mystic tool
mysticshovelgreen.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mystic/MysticShovelGreen.png");
ModLoader.addName(mysticshovelgreen, "Mystical Shovel");
ModLoader.addRecipe(new ItemStack(mysticshovelgreen, 1), new Object [] {
" X ", " S ", " S ", Character.valueOf('S'), Item.stick, Character.valueOf('X'), mysticgemgreen
});
//Mystic tool
mysticaxegreen.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mystic/MysticAxeGreen.png");
ModLoader.addName(mysticaxegreen, "Mystical Axe");
ModLoader.addRecipe(new ItemStack(mysticaxegreen, 1), new Object [] {
"XX ", "XS ", " S ", Character.valueOf('S'), Item.stick, Character.valueOf('X'), mysticgemgreen
});
//Mystic tool
mystichoegreen.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mystic/MysticHoeGreen.png");
ModLoader.addName(mystichoegreen, "Mystical Hoe");
ModLoader.addRecipe(new ItemStack(mystichoegreen, 1), new Object [] {
"XX", " S ", " S ", Character.valueOf('S'), Item.stick, Character.valueOf('X'), mysticgemgreen
});
//Mystic Flower
mysticflower.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Mystic/MysticFlower.png");
ModLoader.registerBlock(mysticflower);
ModLoader.addName(mysticflower, "Mystical Flower");
//Mystic tool
mysticswordblue.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mystic/MysticSwordBlue.png");
ModLoader.addName(mysticswordblue, "Mystical Sword");
ModLoader.addRecipe(new ItemStack(mysticswordblue, 1), new Object [] {
" X ", " X ", " S ", Character.valueOf('S'), Item.stick, Character.valueOf('X'), mysticgem
});
//Mystic tool
mysticshovelblue.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mystic/MysticShovelBlue.png");
ModLoader.addName(mysticshovelblue, "Mystical Shovel");
ModLoader.addRecipe(new ItemStack(mysticshovelblue, 1), new Object [] {
" X ", " S ", " S ", Character.valueOf('S'), Item.stick, Character.valueOf('X'), mysticgem
});
//Mystic tool
mysticaxeblue.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mystic/MysticAxeBlue.png");
ModLoader.addName(mysticaxeblue, "Mystical Axe");
ModLoader.addRecipe(new ItemStack(mysticaxeblue, 1), new Object [] {
"XX ", "XS ", " S ", Character.valueOf('S'), Item.stick, Character.valueOf('X'), mysticgem
});
//Mystic tool
mystichoeblue.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mystic/MysticHoeBlue.png");
ModLoader.addName(mystichoeblue, "Mystical Hoe");
ModLoader.addRecipe(new ItemStack(mystichoeblue, 1), new Object [] {
"XX", " S ", " S ", Character.valueOf('S'), Item.stick, Character.valueOf('X'), mysticgem
});
}
public int addFuel(int i, int j)
{
if(i == mysticgemred.shiftedIndex)
return 2000;
return 0;
}
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
for(int i = 0; i < 15; i++)
{
int randPosX = chunkX + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenMinable(mysticore.blockID, 15)).generate(world, random, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 15; i++)
{
int randPosX = chunkX + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenMinable(mysticorered.blockID, 15)).generate(world, random, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 15; i++)
{
int randPosX = chunkX + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenMinable(mysticoregreen.blockID, 15)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
public String getVersion()
{
return "1.2.5";
}
}
Also how could i make that flower generate?
for(int i = 0; i < 15; i++)
{
int randPosX = chunkX + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenFlowers(mystiflower.blockID, 15)).generate(world, random, randPosX, randPosY, randPosZ);
}
Thats what i tried but it didnt rly work out, is that completely wrong or is it nearly right? What should i change?
I just use the first download on this page. I have used it with 1.2.5 and it seems to work fine.
For the tools, just follow the tutorial, you'll get no errors then.
For the flower, create a new WorldGenFlowers class and change it to suit your BlockNamehereFlower class. Remember to call the new class in your generateSurface method.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Very awesome tutorals dude, I think im ready to start I can playtest minecraft from inside eclipse. I already had Java SDK installed. I downloaded MCP and copied the folders and decompiled them, However I look at the files and none of the current classes are defined with "mod_" in them. I also didn't understand this entirely "Make sure the minecraft.jar only has ModLoader in it. Any other mod, and it will probably fail decompiling." What does it mean?
So basically imma try to get this to work. without using "mod_" and with using "mod_" and see what happens.
and then just the constructor inside those brackets.
So you cannot set up MCP? You cannot use the mod_*** files if you have not installed modloader. I have not seen the set up tutorial of techguy so i dont know what does it include, but you will need to install the modloader to your /bin/minecraft.jar that you have in your jars folder. Also you will want to have the resources folder there. Then just decompile it, and it is actually supposed to give you error that says like 1 hunk out of 1 failed, and its totally fine, thats supposed to happen.
Hope this helped you.
Yeah I didn't install mod loader properly, I fixed it I should have waited to post. But again very nice tuts dude, Um I think you should add to the first post that ModLoader is required.
Very awesome tutorals dude, I think im ready to start I can playtest minecraft from inside eclipse. I already had Java SDK installed. I downloaded MCP and copied the folders and decompiled them, However I look at the files and none of the current classes are defined with "mod_" in them. I also didn't understand this entirely "Make sure the minecraft.jar only has ModLoader in it. Any other mod, and it will probably fail decompiling." What does it mean?
So basically imma try to get this to work. without using "mod_" and with using "mod_" and see what happens.
The main class of your mod(the one with the load() method) must start with mod_ or it won't be loaded.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I would like to make a suggestion about one of your tutorials, the oreGeneration one. There is a line in your code that I think should be modified. its this line in the mod_OreGeneration class
(new WorldGenMinable(Namehere.blockID, 25)).generate(world, random, randPosX, randPosY, randPosZ);
}
The number 25 is how many blocks get generated at one spot I think you said you weren't sure in your explanation below, so if this is set to 5 your most likely to get 5 blocks of your ore. The higher the number the more you will get. (Also your rarity determines how much they will cluster too) I'm just pointing this out for you if you want to set it to a better number such as 5. This is also for people trying to follow this tutorial to know.
I believe it is actually in the code where the player places the block and not so much the code of the block. I don't know anyway to do it with modded blocks. Try extending BlockStep.
I tried extending BlockStep But it gave me a weird error.
same with doors, trapdoors and stairs
how did you fix this in the stair and slab tutorials?
Okay, I have a problem. Its not an error its more like a bug. I made a PickAxe, followed the tutorial to add the damage to blocks, everything works except efficiencyOnProperMaterial. It still acts if i'm hitting the blocks with my fist, what could be the problem. Here is my code.
ItemRubyPickaxe
package net.minecraft.src;
public class ItemRubyPickaxe extends OreItemTool {
private static Block blocksEffectiveAgainst[];
protected ItemRubyPickaxe(int i, EnumOreToolMaterial enumtoolmaterial){
ackage net.minecraft.src;
public class OreItemTool extends Item {
private Block blocksEffectiveAgainst[];
public float efficiencyOnProperMaterial;
public int damageVsEntity;
protected EnumOreToolMaterial toolMaterial;
public boolean onBlockDestroyed(ItemStack itemstack, int i, int j, int k, int l, EntityLiving entityliving)
{
itemstack.damageItem(1, entityliving);
return true;
}
public int getDamageVsEntity(Entity entity)
{
return damageVsEntity;
}
public boolean isFull3D()
{
return true;
}
public int getItemEnchantability()
{
return toolMaterial.getEnchantability();
}
}
Enum OreTool Material
package net.minecraft.src;
public enum EnumOreToolMaterial
{
RUBY("RUBY", 1, 180, 500, 4.0F, 3, 9);
public final int harvestLevel;
public final int maxUses;
public final float efficiencyOnProperMaterial;
public final int damageVsEntity;
public final int enchantability;
private EnumOreToolMaterial(String s, int i, int j, int k, float f, int l, int i1)
{
harvestLevel = j;
maxUses = k;
efficiencyOnProperMaterial = f;
damageVsEntity = l;
enchantability = i1;
}
public int getMaxUses()
{
return maxUses;
}
public float getEfficiencyOnProperMaterial()
{
return efficiencyOnProperMaterial;
}
public int getDamageVsEntity()
{
return damageVsEntity;
}
public int getHarvestLevel()
{
return harvestLevel;
}
public int getEnchantability()
{
return enchantability;
}
I would like to make a suggestion about one of your tutorials, the oreGeneration one. There is a line in your code that I think should be modified. its this line in the [i]mod_OreGeneration class[/i]
(new WorldGenMinable(Namehere.blockID, 25)).generate(world, random, randPosX, randPosY, randPosZ);
}
The number 25 is how many blocks get generated at one spot I think you said you weren't sure in your explanation below, so if this is set to 5 your most likely to get 5 blocks of your ore. The higher the number the more you will get. (Also your rarity determines how much they will cluster too) I'm just pointing this out for you if you want to set it to a better number such as 5. This is also for people trying to follow this tutorial to know.
Okay, I have a problem. Its not an error its more like a bug. I made a PickAxe, followed the tutorial to add the damage to blocks, everything works except efficiencyOnProperMaterial. It still acts if i'm hitting the blocks with my fist, what could be the problem. Here is my code.
ItemRubyPickaxe
package net.minecraft.src;
public class ItemRubyPickaxe extends OreItemTool {
private static Block blocksEffectiveAgainst[];
protected ItemRubyPickaxe(int i, EnumOreToolMaterial enumtoolmaterial){
ackage net.minecraft.src;
public class OreItemTool extends Item {
private Block blocksEffectiveAgainst[];
public float efficiencyOnProperMaterial;
public int damageVsEntity;
protected EnumOreToolMaterial toolMaterial;
public boolean onBlockDestroyed(ItemStack itemstack, int i, int j, int k, int l, EntityLiving entityliving)
{
itemstack.damageItem(1, entityliving);
return true;
}
public int getDamageVsEntity(Entity entity)
{
return damageVsEntity;
}
public boolean isFull3D()
{
return true;
}
public int getItemEnchantability()
{
return toolMaterial.getEnchantability();
}
}
OreTool Material
package net.minecraft.src;
public enum OreToolMaterial
{
RUBY("RUBY", 1, 180, 500, 4.0F, 3, 9), SAPPHIRE("Sapphire", 5, 300, 300, 7F, 20, 9), DIRT("DIRT", 1, 10, 3, 4F, 1, 9);
public final int harvestLevel;
public final int maxUses;
public final float efficiencyOnProperMaterial;
public final int damageVsEntity;
public final int enchantability;
public static final OreToolMaterial allToolMaterials[];
private OreToolMaterial(String s, int i, int j, int k, float f, int l, int i1)
{
harvestLevel = j;
maxUses = k;
efficiencyOnProperMaterial = f;
damageVsEntity = l;
enchantability = i1;
}
public int getMaxUses()
{
return maxUses;
}
public float getEfficiencyOnProperMaterial()
{
return efficiencyOnProperMaterial;
}
public int getDamageVsEntity()
{
return damageVsEntity;
}
public int getHarvestLevel()
{
return harvestLevel;
}
public int getEnchantability()
{
return enchantability;
}
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
DOUBLE EDIT: If I just want a sword, are the only code sections that I need be mod_Tools and ItemNamehereSword?
Yes, you just take the relevant parts of mod_ code(the public static final line(instantiation) and then the ModLoader methods) and The ItemNamehereSword class.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I Always get this error when i create a biome with my own blocks Can anyone help?
ava.lang.ArrayIndexOutOfBoundsException: -126
at net.minecraft.src.ExtendedBlockStorage.setExtBlockID(ExtendedBlockStorage.java:83)
at net.minecraft.src.Chunk.<init>(Chunk.java:113)
at net.minecraft.src.ChunkProviderGenerate.provideChunk(ChunkProviderGenerate.java:290)
at net.minecraft.src.ChunkProvider.loadChunk(ChunkProvider.java:93)
at net.minecraft.src.ChunkProvider.provideChunk(ChunkProvider.java:119)
at net.minecraft.src.World.getChunkFromChunkCoords(World.java:654)
at net.minecraft.src.World.getBlockId(World.java:547)
at net.minecraft.src.SpawnerAnimals.canCreatureTypeSpawnAtLocation(SpawnerAnimals.java:204)
at net.minecraft.src.SpawnerAnimals.performSpawning(SpawnerAnimals.java:118)
at net.minecraft.src.World.tick(World.java:2851)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1903)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:870)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT a9c7445b ----------
Mod_File
package net.minecraft.src;
public class mod_BigBiomes extends BaseMod
{
public String getVersion()
{
return "1.2.5";
}
//MultiTextured Blocks
public static Block EvilGrass = new EvilGrass(129, 0).setHardness(0.5F).setResistance(0.5F).setStepSound(Block.soundGrassFootstep).setBlockName("Evil Grass");
public static int EvilGrass0 = ModLoader.addOverride("/terrain.png", "/Blocks/EvilGrass0.png");
public static int EvilGrass1 = ModLoader.addOverride("/terrain.png", "/Blocks/EvilGrass1.png");
public static int EvilGrass2 = ModLoader.addOverride("/terrain.png", "/Blocks/EvilGrass2.png");
//Blocks
public static Block UnderEvilGrass = new UnderEvilGrass(130,0).setHardness(0.5F).setResistance(0.5F).setStepSound(Block.soundGrassFootstep).setBlockName("Under Evil Grass");
//Items
//misc
public static final BiomeGenBase EvilForest = (new BiomeGenEvilForest(26).setColor(0xfa9418).setBiomeName("Evil Forest"));
I'm not experiened at this kind of stuff at all. But I really want to make a mod. I don't really know how to make a .class file, and stuff like that, because in the instructions, I didn't see how to add the mod files (the class files I think) or how to open them. Thank you for seeing this.
hi @TechGuy543, i was wondering if you could help ^__^
i have copied your 'tools' tutorial and i have finished it. YEY.
BUT!! It came up with an error. YEY.
May 30, 2012 7:27:51 PM ModLoader init
FINE: ModLoader 1.2.5 Initializing...
May 30, 2012 7:27:51 PM ModLoader readFromClassPath
FINER: Adding mods from C:\Users\Theo\AppData\Roaming\.minecraft\bin\minecraft.jar
May 30, 2012 7:27:51 PM ModLoader readFromClassPath
FINER: Zip found.
May 30, 2012 7:27:51 PM ModLoader addMod
FINE: Failed to load mod from "mod_bonesplinters.class"
May 30, 2012 7:27:51 PM ModLoader addMod
FINER: THROW
java.lang.NoClassDefFoundError: ItemBoneSplinters
at mod_bonesplinters.<clinit>(mod_bonesplinters.java:6)
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 ModLoader.addMod(ModLoader.java:294)
at ModLoader.readFromClassPath(ModLoader.java:1210)
at ModLoader.init(ModLoader.java:886)
at ModLoader.addAllRenderers(ModLoader.java:189)
at ahu.<init>(ahu.java:77)
at ahu.<clinit>(ahu.java:8)
at net.minecraft.client.Minecraft.a(SourceFile:273)
at net.minecraft.client.Minecraft.run(SourceFile:657)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: ItemBoneSplinters
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 16 more
May 30, 2012 7:28:01 PM ModLoader addMod
FINE: Failed to load mod from "mod_BoneSTools.class"
May 30, 2012 7:28:01 PM ModLoader addMod
FINER: THROW
java.lang.NoClassDefFoundError: EnumToolMaterialBS
at mod_BoneSTools.<clinit>(mod_BoneSTools.java:4)
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 ModLoader.addMod(ModLoader.java:294)
at ModLoader.readFromClassPath(ModLoader.java:1210)
at ModLoader.init(ModLoader.java:886)
at ModLoader.addAllRenderers(ModLoader.java:189)
at ahu.<init>(ahu.java:77)
at ahu.<clinit>(ahu.java:8)
at net.minecraft.client.Minecraft.a(SourceFile:273)
at net.minecraft.client.Minecraft.run(SourceFile:657)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: EnumToolMaterialBS
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 16 more
May 30, 2012 7:28:01 PM ModLoader addAllRenderers
FINE: Initialized
not sure what it means but ¯\_(ツ)_/¯ ya kno
please help man!! (or anyone else) please just tell me if i need to post the code in reply for you to analyze it
It can't find your ItemBoneSplinters class. Make sure it has the correct extension (.java) and is declared properly inside.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
To post a comment, please login or register a new account.
Yes, I mean the 156 in the line you posted. That is the number of blocks in the vein.
together they are powerful beyond imagination."
I just use the first download on this page. I have used it with 1.2.5 and it seems to work fine.
For the tools, just follow the tutorial, you'll get no errors then.
For the flower, create a new WorldGenFlowers class and change it to suit your BlockNamehereFlower class. Remember to call the new class in your generateSurface method.
together they are powerful beyond imagination."
So basically imma try to get this to work. without using "mod_" and with using "mod_" and see what happens.
Yeah I didn't install mod loader properly, I fixed it I should have waited to post. But again very nice tuts dude, Um I think you should add to the first post that ModLoader is required.
I do have a tools tutorial. At the bottom of the list of tutorials it says, "More tutorials on the post below". The tools tutorial is on it.
The main class of your mod(the one with the load() method) must start with mod_ or it won't be loaded.
together they are powerful beyond imagination."
The number 25 is how many blocks get generated at one spot I think you said you weren't sure in your explanation below, so if this is set to 5 your most likely to get 5 blocks of your ore. The higher the number the more you will get. (Also your rarity determines how much they will cluster too) I'm just pointing this out for you if you want to set it to a better number such as 5. This is also for people trying to follow this tutorial to know.
I tried extending BlockStep But it gave me a weird error.
same with doors, trapdoors and stairs
how did you fix this in the stair and slab tutorials?
ItemRubyPickaxe
public class ItemRubyPickaxe extends OreItemTool {
private static Block blocksEffectiveAgainst[];
protected ItemRubyPickaxe(int i, EnumOreToolMaterial enumtoolmaterial){
super(i, 2, enumtoolmaterial, blocksEffectiveAgainst);
//maxStackSize = 1;
}
public boolean CanHarvestBlock(Block block){
if(block == block.obsidian){
return toolMaterial.getHarvestLevel() == 3;
}
if(block == Block.blockDiamond || block == Block.oreDiamond){
return toolMaterial.getHarvestLevel() >= 2;
}
if(block == Block.blockGold || block == Block.oreGold){
return toolMaterial.getHarvestLevel() >= 2;
}
if(block == Block.blockSteel || block == Block.oreIron)
{
return toolMaterial.getHarvestLevel() >= 1;
}
if(block == Block.blockLapis || block == Block.oreLapis)
{
return toolMaterial.getHarvestLevel() >= 1;
}
if(block == Block.oreRedstone || block == Block.oreRedstoneGlowing)
{
return toolMaterial.getHarvestLevel() >= 2;
}
if(block.blockMaterial == Material.rock)
{
return true;
}
return block.blockMaterial == Material.iron;
}
public float getStrVsBlock(ItemStack itemstack, Block block)
{
if(block != null && (block.blockMaterial == Material.iron || block.blockMaterial == Material.rock))
{
return efficiencyOnProperMaterial;
} else
{
return super.getStrVsBlock(itemstack, block);
}
}
static
{
blocksEffectiveAgainst = (new Block[] {
Block.cobblestone, Block.stairDouble, Block.stairSingle, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockSteel, Block.oreCoal, Block.blockGold,
Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail,
Block.railDetector, Block.railPowered
});
}
}
OreItemTool
public class OreItemTool extends Item {
private Block blocksEffectiveAgainst[];
public float efficiencyOnProperMaterial;
public int damageVsEntity;
protected EnumOreToolMaterial toolMaterial;
public OreItemTool (int i, int j, EnumOreToolMaterial par3Enumtoolmaterial, Block ablock[])
{
super(i);
efficiencyOnProperMaterial = 4F;
toolMaterial = par3Enumtoolmaterial;
blocksEffectiveAgainst = ablock;
maxStackSize = 1;
setMaxDamage(par3Enumtoolmaterial.getMaxUses());
efficiencyOnProperMaterial = par3Enumtoolmaterial.getEfficiencyOnProperMaterial();
damageVsEntity = j + par3Enumtoolmaterial.getDamageVsEntity();
}
public float getStrVsBlock(ItemStack itemstack, Block block)
{
for(int i = 0; i < blocksEffectiveAgainst.length; i++)
{
if(blocksEffectiveAgainst[i] == block)
{
return efficiencyOnProperMaterial;
}
}
return 1.0F;
}
public boolean hitEntity(ItemStack itemstack, EntityLiving entityliving, EntityLiving entityliving1)
{
itemstack.damageItem(2, entityliving1);
return true;
}
public boolean onBlockDestroyed(ItemStack itemstack, int i, int j, int k, int l, EntityLiving entityliving)
{
itemstack.damageItem(1, entityliving);
return true;
}
public int getDamageVsEntity(Entity entity)
{
return damageVsEntity;
}
public boolean isFull3D()
{
return true;
}
public int getItemEnchantability()
{
return toolMaterial.getEnchantability();
}
}
Enum OreTool Material
public enum EnumOreToolMaterial
{
RUBY("RUBY", 1, 180, 500, 4.0F, 3, 9);
public final int harvestLevel;
public final int maxUses;
public final float efficiencyOnProperMaterial;
public final int damageVsEntity;
public final int enchantability;
private EnumOreToolMaterial(String s, int i, int j, int k, float f, int l, int i1)
{
harvestLevel = j;
maxUses = k;
efficiencyOnProperMaterial = f;
damageVsEntity = l;
enchantability = i1;
}
public int getMaxUses()
{
return maxUses;
}
public float getEfficiencyOnProperMaterial()
{
return efficiencyOnProperMaterial;
}
public int getDamageVsEntity()
{
return damageVsEntity;
}
public int getHarvestLevel()
{
return harvestLevel;
}
public int getEnchantability()
{
return enchantability;
}
}
Yeah, that number is the amount in the vein.
I'm not sure.
This method:
public boolean CanHarvestBlock(Block block){needs to bepublic boolean canHarvestBlock(Block block){together they are powerful beyond imagination."
DOUBLE EDIT: If I just want a sword, are the only code sections that I need be mod_Tools and ItemNamehereSword?
Yes, you just take the relevant parts of mod_ code(the public static final line(instantiation) and then the ModLoader methods) and The ItemNamehereSword class.
together they are powerful beyond imagination."
at net.minecraft.src.ExtendedBlockStorage.setExtBlockID(ExtendedBlockStorage.java:83)
at net.minecraft.src.Chunk.<init>(Chunk.java:113)
at net.minecraft.src.ChunkProviderGenerate.provideChunk(ChunkProviderGenerate.java:290)
at net.minecraft.src.ChunkProvider.loadChunk(ChunkProvider.java:93)
at net.minecraft.src.ChunkProvider.provideChunk(ChunkProvider.java:119)
at net.minecraft.src.World.getChunkFromChunkCoords(World.java:654)
at net.minecraft.src.World.getBlockId(World.java:547)
at net.minecraft.src.SpawnerAnimals.canCreatureTypeSpawnAtLocation(SpawnerAnimals.java:204)
at net.minecraft.src.SpawnerAnimals.performSpawning(SpawnerAnimals.java:118)
at net.minecraft.src.World.tick(World.java:2851)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1903)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:870)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT a9c7445b ----------
package net.minecraft.src;
public class mod_BigBiomes extends BaseMod
{
public String getVersion()
{
return "1.2.5";
}
//MultiTextured Blocks
public static Block EvilGrass = new EvilGrass(129, 0).setHardness(0.5F).setResistance(0.5F).setStepSound(Block.soundGrassFootstep).setBlockName("Evil Grass");
public static int EvilGrass0 = ModLoader.addOverride("/terrain.png", "/Blocks/EvilGrass0.png");
public static int EvilGrass1 = ModLoader.addOverride("/terrain.png", "/Blocks/EvilGrass1.png");
public static int EvilGrass2 = ModLoader.addOverride("/terrain.png", "/Blocks/EvilGrass2.png");
//Blocks
public static Block UnderEvilGrass = new UnderEvilGrass(130,0).setHardness(0.5F).setResistance(0.5F).setStepSound(Block.soundGrassFootstep).setBlockName("Under Evil Grass");
//Items
//misc
public static final BiomeGenBase EvilForest = (new BiomeGenEvilForest(26).setColor(0xfa9418).setBiomeName("Evil Forest"));
public void load()
{
EvilGrass.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Blocks/Evil Grass.png");
ModLoader.registerBlock(EvilGrass);
ModLoader.addName(EvilGrass, "Evil Grass");
ModLoader.addRecipe(new ItemStack(EvilGrass, 1), new Object[]{"xxx", "xxx", "xxx", Character.valueOf('x'), Block.bedrock});
//UnderEvilGrass
UnderEvilGrass.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Blocks/Evil Grass333.png");
ModLoader.registerBlock(UnderEvilGrass);
ModLoader.addName(UnderEvilGrass, "Evil Grass");
ModLoader.addRecipe(new ItemStack(UnderEvilGrass, 1), new Object[]{"xxx", "xxx", "xxx", Character.valueOf('x'), Block.blockDiamond});
//Evil Forest
ModLoader.addBiome(EvilForest);
}
}
BiomeGenbaseFile
import java.util.List;
import java.util.Random;
public class BiomeGenEvilForest extends BiomeGenBase
{
public BiomeGenEvilForest(int par1)
{
super(par1);
spawnableCreatureList.clear();
topBlock = (byte)mod_BigBiomes.EvilGrass.blockID;
fillerBlock = (byte)mod_BigBiomes.UnderEvilGrass.blockID;
biomeDecorator.treesPerChunk = 8;
biomeDecorator.flowersPerChunk = 10;
biomeDecorator.grassPerChunk = 3;
biomeDecorator.sandPerChunk = 6;
}
}
Thank YOU!!!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumJust food, the food tutorial is based on the item tutorial, but it adds a few lines
It can't find your ItemBoneSplinters class. Make sure it has the correct extension (.java) and is declared properly inside.
together they are powerful beyond imagination."