Hi I used scottools and added a tool and everything worked fine till I started minecraft
PLEASE HELP I'M BEGGING YOU
and got an error this is what the error said
Mods loaded: 1
ModLoader Beta 1.7.3
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT e9df3db --------
Generated 11/08/11 10:45 PM
Minecraft: Minecraft Beta 1.7.3
OS: Windows 7 (x86) version 6.1
Java: 1.6.0_26, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 4800 Series version 3.3.10907 Compatibility Profile Context, ATI Technologies Inc.
java.lang.StringIndexOutOfBoundsException: String index out of range: 5
at java.lang.String.charAt(Unknown Source)
at hk.a(SourceFile:459)
at ModLoader.AddRecipe(ModLoader.java:370)
at mod_MinecraftMore.<init>(mod_MinecraftMore.java:150)
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:272)
at ModLoader.readFromClassPath(ModLoader.java:1104)
at ModLoader.init(ModLoader.java:812)
at ModLoader.AddAllRenderers(ModLoader.java:183)
at th.<init>(th.java:60)
at th.<clinit>(th.java:9)
at net.minecraft.client.Minecraft.a(SourceFile:318)
at net.minecraft.client.Minecraft.run(SourceFile:716)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 669d519e ----------
My code sigh
package net.minecraft.src;
import java.util.Random;
public class mod_MinecraftMore extends BaseMod
{
public static final ToolMaterial COPPER = new ToolMaterial(1, 220, 12F, 3);
public static final Block densedirt = new BlockDensedirt(97, 0).setHardness(3F).setResistance(4.0F).setBlockName("densedirt");
public static final Block claydirt = new BlockClaydirt(98, 0).setHardness(2F).setResistance(2.0F).setBlockName("claydirt");
public static final Block lightdirt = new BlockLightdirt(99, 0).setHardness(1F).setBlockName("lightdirt");
public static final Block copperore = new BlockCopperOre(100, 0).setHardness(3F).setResistance(3.0F).setBlockName("copperore");
public static final Block platinumore = new BlockPlatinumOre(101, 0).setHardness(3F).setResistance(3.0F).setBlockName("platinumore");
public static final Block titaniumore = new BlockTitaniumOre(102, 0).setHardness(3F).setResistance(5.0F).setBlockName("titaniumore");
public static final Block tinore = new BlockTinOre(103, 0).setHardness(3F).setResistance(5.0F).setBlockName("tinore");
public static final Block unknownore = new BlockUnknownOre(104, 0).setHardness(3F).setResistance(5.0F).setBlockName("unknownore");
public static final Block graphiteore = new BlockGraphiteOre(105, 0).setHardness(3F).setResistance(5.0F).setBlockName("graphiteore");
public static final Block copperbricks = new BlockCopperBricks(106, 0).setHardness(2F).setResistance(10F).setBlockName("copperbricks");
public static final Block ironbricks = new BlockIronBricks(107, 0).setHardness(2F).setResistance(10F).setBlockName("ironbricks");
public static final Block goldbricks = new BlockGoldBricks(108, 0).setHardness(2F).setResistance(10F).setBlockName("goldbricks");
public static final Block redstonebricks = new BlockRedstoneBricks(109, 0).setHardness(2F).setResistance(10F).setBlockName("redstonebricks");
public static final Block coalbricks = new BlockCoalBricks(110, 0).setHardness(2F).setResistance(10F).setBlockName("coalbricks");
public static final Block copperblock = new BlockCopperBlock(111, 0).setHardness(3F).setResistance(12F).setBlockName("copperblock");
public static final Block coalblock = new BlockCoalBlock(112, 0).setHardness(3F).setResistance(12F).setBlockName("coalblock");
public static final Block redstoneblock = new BlockRedstoneBlock(113, 0).setHardness(3F).setResistance(12F).setBlockName("redstoneblock");
public static final Item platinumball = new Item(10000).setItemName("platinumball");
public static final Item copperbar = new Item(10001).setItemName("copperbar");
public static final Item titaniumbar = new Item(10002).setItemName("titaniumbar");
public static final Item tinbar = new Item(10003).setItemName("tinbar");
public static Item titaniumboots = (new ItemArmor(10004, 3, ModLoader.AddArmor("titanium"), 3).setItemName("titaniumboots"));
public static Item titaniumleggings = (new ItemArmor(10005, 3, ModLoader.AddArmor("titanium"), 2).setItemName("titaniumleggings"));
public static Item titaniumchestplate = (new ItemArmor(10006, 3, ModLoader.AddArmor("titanium"), 1).setItemName("titaniumchestplate"));
public static Item titaniumhelmet = (new ItemArmor(10007, 3, ModLoader.AddArmor("titanium"), 0).setItemName("titaniumhelmet"));
public static final Item pickaxecopper = new ItemCustomPickaxe(603, 2, COPPER).setItemName("pickaxecopper");
public String Version()
{
return "1.7.3";
}
public mod_MinecraftMore ()
{
densedirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png" ,"/MinecraftMore/Densedirt.png");
claydirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/Claydirt.png");
lightdirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/Lightdirt.png");
copperore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/CopperOre.png");
platinumore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/PlatinumOre.png");
titaniumore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/TitaniumOre.png");
tinore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/TinOre.png");
unknownore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/UnknownOre.png");
graphiteore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/GraphiteOre.png");
copperbricks.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/CopperBricks.png");
ironbricks.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/IronBricks.png");
goldbricks.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/GoldBricks.png");
redstonebricks.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/RedstoneBricks.png");
coalbricks.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/CoalBricks.png");
copperblock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/CopperBlock.png");
coalblock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/CoalBlock.png");
redstoneblock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MinecraftMore/RedstoneBlock.png");
platinumball.iconIndex = ModLoader.addOverride("/gui/items.png", "/MinecraftMore/PlatinumBall.png");
copperbar.iconIndex = ModLoader.addOverride("/gui/items.png", "/MinecraftMore/CopperBar.png");
titaniumbar.iconIndex = ModLoader.addOverride("/gui/items.png", "/MinecraftMore/TitaniumBar.png");
tinbar.iconIndex = ModLoader.addOverride("/gui/items.png", "/MinecraftMore/TinBar.png");
titaniumboots.iconIndex = ModLoader.addOverride("/gui/items.png", "/MinecraftMore/TitaniumBoots.png");
titaniumleggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/MinecraftMore/TitaniumLeggings.png");
titaniumchestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/MinecraftMore/TitaniumChestplate.png");
titaniumhelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/MinecraftMore/TitaniumHelmet.png");
pickaxecopper.iconIndex = ModLoader.addOverride("/gui/items.png", "/MinecraftMore/CopperPickaxe.png");
ModLoader.RegisterBlock(densedirt);
ModLoader.RegisterBlock(claydirt);
ModLoader.RegisterBlock(lightdirt);
ModLoader.RegisterBlock(copperore);
ModLoader.RegisterBlock(platinumore);
ModLoader.RegisterBlock(titaniumore);
ModLoader.RegisterBlock(tinore);
ModLoader.RegisterBlock(unknownore);
ModLoader.RegisterBlock(graphiteore);
ModLoader.RegisterBlock(copperbricks);
ModLoader.RegisterBlock(ironbricks);
ModLoader.RegisterBlock(goldbricks);
ModLoader.RegisterBlock(redstonebricks);
ModLoader.RegisterBlock(coalbricks);
ModLoader.RegisterBlock(copperblock);
ModLoader.RegisterBlock(coalblock);
ModLoader.RegisterBlock(redstoneblock);
ModLoader.AddName(densedirt, "Dense Dirt");
ModLoader.AddName(claydirt, "Clay Dirt");
ModLoader.AddName(lightdirt, "Light Dirt");
ModLoader.AddName(copperore, "Copper Ore");
ModLoader.AddName(platinumore, "Platinum Ore");
ModLoader.AddName(titaniumore, "Titanium Ore");
ModLoader.AddName(tinore, "Tin Ore");
ModLoader.AddName(unknownore, "Unknown Ore");
ModLoader.AddName(graphiteore, "Graphite Ore");
ModLoader.AddName(copperbricks, "Copper Bricks");
ModLoader.AddName(ironbricks, "Iron Bricks");
ModLoader.AddName(goldbricks, "Gold Bricks");
ModLoader.AddName(redstonebricks, "Redstone Bricks");
ModLoader.AddName(coalbricks, "Coal Bricks");
ModLoader.AddName(copperblock, "Copper Block");
ModLoader.AddName(coalblock, "Coal Block");
ModLoader.AddName(redstoneblock, "Redstone Block");
ModLoader.AddName(platinumball, "Platinum Ball");
ModLoader.AddName(copperbar, "Copper Bar");
ModLoader.AddName(titaniumbar, "Titanium Bar");
ModLoader.AddName(tinbar, "Tin Bar");
ModLoader.AddName(titaniumboots, "Titanium Boots");
ModLoader.AddName(titaniumleggings, "Titanium Leggings");
ModLoader.AddName(titaniumchestplate, "Titanium Chest Plate");
ModLoader.AddName(titaniumhelmet, "Titanium Helmet");
ModLoader.AddName(pickaxecopper, "Copper Pickaxe");
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.densedirt, 1),
new Object[] {"XX", "XX", Character.valueOf('X'), Block.dirt,});
ModLoader.AddRecipe(new ItemStack(Item.clay, 3),
new Object[] {"X", Character.valueOf('X'), mod_MinecraftMore.claydirt,});
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.lightdirt, 1),
new Object[] {"XXX", "XOX", "XXX", Character.valueOf('X'), Block.dirt, Character.valueOf('O'), Item.lightStoneDust,});
ModLoader.AddRecipe(new ItemStack(Block.dirt, 4),
new Object[] {"X", Character.valueOf('X'), mod_MinecraftMore.densedirt,});
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.titaniumboots, 1),
new Object[] {"X X", "X X", Character.valueOf('X'), mod_MinecraftMore.titaniumbar,});
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.titaniumleggings, 1),
new Object[] {"XXX", "X X", "X X", Character.valueOf('X'), mod_MinecraftMore.titaniumbar,});
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.titaniumchestplate, 1),
new Object[] {"X X", "XXX", "XXX", Character.valueOf('X'), mod_MinecraftMore.titaniumbar,});
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.titaniumhelmet, 1),
new Object[] {"XXX", "X X", Character.valueOf('X'), mod_MinecraftMore.titaniumbar,});
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.copperbricks, 4),
new Object[] {"XX", "XO", Character.valueOf('X'), mod_MinecraftMore.copperbar, Character.valueOf('O'), Item.clay,});
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.ironbricks, 4),
new Object[] {"XX", "XO", Character.valueOf('X'), Item.ingotIron, Character.valueOf('O'), Item.clay,});
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.goldbricks, 8),
new Object[] {"XX", "XO", Character.valueOf('X'), Item.ingotGold, Character.valueOf('O'), Item.clay,});
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.redstonebricks, 4),
new Object[] {"X", "O", "X", Character.valueOf('X'), Item.redstone, Character.valueOf('O'), Block.brick,});
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.coalbricks, 4),
new Object[] {"X", "O", Character.valueOf('X'), Item.coal, Character.valueOf('O'), Block.brick,});
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.copperblock, 1),
new Object[] {"OOO", "OOO", "OOO", Character.valueOf('O'), mod_MinecraftMore.copperbar,});
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.coalblock, 1),
new Object[] {"OOO", "OOO", "OOO", Character.valueOf('O'), Item.coal,});
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.coalblock, 1),
new Object[] {"OOO", "OOO", "OOO", Character.valueOf('O'), Item.coal,});
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.redstoneblock, 1),
new Object[] {"OOO", "OOO", "OOO", Character.valueOf('O'), Item.redstone,});
ModLoader.AddRecipe(new ItemStack(mod_MinecraftMore.pickaxecopper, 1),
new Object[] {"O", "O", "XXX", Character.valueOf('X'), Item.stick, Character.valueOf('O'), mod_MinecraftMore.copperbar,});
ModLoader.AddSmelting(mod_MinecraftMore.copperore.blockID, new ItemStack(mod_MinecraftMore.copperbar, 1));
ModLoader.AddSmelting(mod_MinecraftMore.titaniumore.blockID, new ItemStack(mod_MinecraftMore.titaniumbar, 1));
ModLoader.AddSmelting(mod_MinecraftMore.tinore.blockID, new ItemStack(mod_MinecraftMore.tinbar, 1));
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 15; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(80);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_MinecraftMore.claydirt.blockID, 16)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 6; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(40);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_MinecraftMore.platinumore.blockID, 3)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 3; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(30);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_MinecraftMore.titaniumore.blockID, 8)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 18; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(60);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_MinecraftMore.copperore.blockID, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 17; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(60);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_MinecraftMore.tinore.blockID, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 16; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(80);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_MinecraftMore.unknownore.blockID, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 6; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(40);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(Block.blockGold.blockID, 1)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 7; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(50);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_MinecraftMore.coalblock.blockID, 2)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 8; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(40);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_MinecraftMore.redstoneblock.blockID, 2)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 15; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(80);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_MinecraftMore.unknownore.blockID, 7)).generate(world, rand, randPosX, randPosY, randPosZ);
}
ScotTools.AddBlocks(new Block[] { mod_MinecraftMore.titaniumore }, 3);
ScotTools.AddBlocks(new Block[] { mod_MinecraftMore.platinumore }, 2);
ScotTools.AddBlocks(new Block[] { mod_MinecraftMore.unknownore, mod_MinecraftMore.graphiteore, mod_MinecraftMore.tinore, mod_MinecraftMore.copperore, mod_MinecraftMore.copperblock }, 1);
ScotTools.AddBlocks(new Block[] { mod_MinecraftMore.claydirt, mod_MinecraftMore.densedirt, mod_MinecraftMore.lightdirt }, 1);
}
}
Hi everybody, can anyone tell me how to start to mod with ModLoader? I had installed Mod Loader in minecraft.jar, I had decompiled, but now how can I create a new recipe and block using modloader? Do I have to create a new file? If yes where... please help me
Yes, you have to make the main file for your mod. It needs to be called mod_MODNAME and, as far as I can tell, you put almost all of the code in it. The only other files I have made with modloader are for my blocks and items.
And I have to create a class file or other type of file? (I use eclipse). Because I really don't know how to mod, I had spent about 2 hours modding without ModLoader, but now I wanna start use modloader but I'm "lost".
ModLoader and normal modding are pretty much identical. The only difference is the mod_ class. Block and Item declarations go in the mod_ class and are then registered and overrided and whathaveyou. World generation, texture overrides and pretty much anything else is done in the mod_ class.
If you're unsure of what functions to use you can look in ModLoader.java for the function names and params they require.
Would say a tutorial on getting lighting to update in a small are be out of the question? Currently I have gotten my custom mob to change the light value on the block below them, but I can't seem to get the light to update with the mobs movement, so when it moves it leaves a trail of brighter areas....
Would say a tutorial on getting lighting to update in a small are be out of the question? Currently I have gotten my custom mob to change the light value on the block below them, but I can't seem to get the light to update with the mobs movement, so when it moves it leaves a trail of brighter areas....
I haven't really looked into the lighting engine at all. I would suggest taking your lighting questions to Shockah; he rewrote the entire lighting engine for the Aether mod, if I remember correctly.
I had read the tutorial and I hadn't see where I save the file, anyway I'll try.
But now I have another question: How can I update my mod to a new version of MC (because 1.8 is comming)? Because you have the link in the first page but when I click it nothing happens.
Updating is easy:
1. Save the src from your mod
2. Wait for MCP for 1.8
3. Decompile the 1.8 JAR with MCP
4. Add your source code to the src folder in 1.8 MCP
5. Recompile
If you can't figure this out you have no business in modding. I try to explain everything in black and white as clearly as possible, and if you can't figure it out do some research first.
I need help. I get alot of erros like: cannot find varialble ':' and incompatible : <nulltype>
and also operator + cannot be applied to inc,rand.nextinc. I followed every instruction other than the mob also I only ued the modloader 1's
Here are the stuff:
mod_TestOre.java:
package net.minecraft.src;
public class mod_TestOre extends BaseMod {
public static final Block TestOre = new BlockOre(101, 0).setHardness(5F).setResistance(10F).setBlockName("TestOre");
public static final Item TestChunk = new Item(4000).setItemName("TestChunk");
public mod_TestOre() {
ModLoader.RegisterBlock(TestOre);
ModLoader.AddName(TestChunk, "Test Chunk");
TestOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Test/TestOre.png");
TestChunk.iconIndex = ModLoader.addOverride("/gui/items.png", "/Test/TestChunk.png");
}
public void GenerateSurface(World world, Random random, int randXCoord, int randZCoord) {
for(int oreFrequency = 0; oreFrequency < 12; oreFrequency++) {
int xCoord = randXCoord + rand.nextInt(16);
int yCoord = rand.nextInt(128);
int zCoord = randZCoord + rand.nextInt(16);
new WorldGenMinable(Block.Test.blockID, 10).generate(world, rand, xCoord, yCoord, zCoord);
}
}
public String Version() {
return "1.0 for MC Beta 1.7.3";
}
}
and:
BlockOre.java:
// 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
package net.minecraft.src;
import java.util.Random;
// Referenced classes of package net.minecraft.src:
// Block, Material, Item
public class BlockOre extends Block
{
public BlockOre(int i, int j)
{
super(i, j, Material.rock);
}
Hi, how can I make blocks with damage values? Like the wool, but I want to use ID 200, and be like this:
200:0
200:1
200:2
....
It's just put ":" and the damage value?
No, it has to do with metadata. While damage values are very useful they are somewhat complex to include. If you want, look at ItemCoal or BlockWool to see how it's done. Keep in mind, though, that you can't put damage values in the furnace.
I need help. I get alot of erros like: cannot find varialble ':' and incompatible : <nulltype>
and also operator + cannot be applied to inc,rand.nextinc. I followed every instruction other than the mob also I only ued the modloader 1's
Here are the stuff:
mod_TestOre.java:
package net.minecraft.src;
public class mod_TestOre extends BaseMod {
public static final Block TestOre = new BlockOre(101, 0).setHardness(5F).setResistance(10F).setBlockName("TestOre");
public static final Item TestChunk = new Item(4000).setItemName("TestChunk");
public mod_TestOre() {
ModLoader.RegisterBlock(TestOre);
ModLoader.AddName(TestChunk, "Test Chunk");
TestOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Test/TestOre.png");
TestChunk.iconIndex = ModLoader.addOverride("/gui/items.png", "/Test/TestChunk.png");
}
public void GenerateSurface(World world, Random random, int randXCoord, int randZCoord) {
for(int oreFrequency = 0; oreFrequency < 12; oreFrequency++) {
int xCoord = randXCoord + rand.nextInt(16);
int yCoord = rand.nextInt(128);
int zCoord = randZCoord + rand.nextInt(16);
new WorldGenMinable(Block.Test.blockID, 10).generate(world, rand, xCoord, yCoord, zCoord);
}
}
public String Version() {
return "1.0 for MC Beta 1.7.3";
}
}
and:
BlockOre.java:
// 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
package net.minecraft.src;
import java.util.Random;
// Referenced classes of package net.minecraft.src:
// Block, Material, Item
public class BlockOre extends Block
{
public BlockOre(int i, int j)
{
super(i, j, Material.rock);
}
Thanks again, you are helping me a lot to modding. I will try to make something.
And I just need damage values to some items that are need to make some blocks (with damage value too).
Lucky you... I can't mod because I get errors even if I do it right and I never can get the class files when a reobf.
boy... i wish you could be here to see how i am happy for your tutorial :biggrin.gif: i did it finally after 2 months of search :biggrin.gif: now i can make a big mod with help of 3 friends and YOU will receive the credits for it :biggrin.gif: . u got
can anybody help?..
Yes, you have to make the main file for your mod. It needs to be called mod_MODNAME and, as far as I can tell, you put almost all of the code in it. The only other files I have made with modloader are for my blocks and items.
ModLoader and normal modding are pretty much identical. The only difference is the mod_ class. Block and Item declarations go in the mod_ class and are then registered and overrided and whathaveyou. World generation, texture overrides and pretty much anything else is done in the mod_ class.
If you're unsure of what functions to use you can look in ModLoader.java for the function names and params they require.
Make a new file called mod_<modname>.java and do everything there.
Did you even read the tutorial? It explains everything. I'm not one to repeat myself, even through the Internet.
I haven't really looked into the lighting engine at all. I would suggest taking your lighting questions to Shockah; he rewrote the entire lighting engine for the Aether mod, if I remember correctly.
Updating is easy:
1. Save the src from your mod
If you can't figure this out you have no business in modding. I try to explain everything in black and white as clearly as possible, and if you can't figure it out do some research first.2. Wait for MCP for 1.8
3. Decompile the 1.8 JAR with MCP
4. Add your source code to the src folder in 1.8 MCP
5. Recompile
and also operator + cannot be applied to inc,rand.nextinc. I followed every instruction other than the mob also I only ued the modloader 1's
Here are the stuff:
mod_TestOre.java:
package net.minecraft.src;
public class mod_TestOre extends BaseMod {
public static final Block TestOre = new BlockOre(101, 0).setHardness(5F).setResistance(10F).setBlockName("TestOre");
public static final Item TestChunk = new Item(4000).setItemName("TestChunk");
public mod_TestOre() {
ModLoader.RegisterBlock(TestOre);
ModLoader.AddName(TestChunk, "Test Chunk");
TestOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Test/TestOre.png");
TestChunk.iconIndex = ModLoader.addOverride("/gui/items.png", "/Test/TestChunk.png");
}
public void GenerateSurface(World world, Random random, int randXCoord, int randZCoord) {
for(int oreFrequency = 0; oreFrequency < 12; oreFrequency++) {
int xCoord = randXCoord + rand.nextInt(16);
int yCoord = rand.nextInt(128);
int zCoord = randZCoord + rand.nextInt(16);
new WorldGenMinable(Block.Test.blockID, 10).generate(world, rand, xCoord, yCoord, zCoord);
}
}
public String Version() {
return "1.0 for MC Beta 1.7.3";
}
}
and:
BlockOre.java:
// 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
package net.minecraft.src;
import java.util.Random;
// Referenced classes of package net.minecraft.src:
// Block, Material, Item
public class BlockOre extends Block
{
public BlockOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random)
{
if(blockID == mod_TestOre.oreTest.blockID)
{
return mod_TestOre.TestChunk.shiftedIndex;
}
if(blockID == Block.oreCoal.blockID)
{
return Item.coal.shiftedIndex;
}
if(blockID == Block.oreDiamond.blockID)
{
return Item.diamond.shiftedIndex;
}
if(blockID == Block.oreLapis.blockID)
{
return Item.dyePowder.shiftedIndex;
} else
{
return blockID;
}
}
public int quantityDropped(Random random)
{
if(blockID == Block.oreLapis.blockID)
{
return 4 + random.nextInt(5);
} else
{
return 1;
}
}
protected int damageDropped(int i)
{
return blockID != Block.oreLapis.blockID ? 0 : 4;
}
}
Please help!
Rules posted here: http://rules.mcf.li/ or click signature.
No, it has to do with metadata. While damage values are very useful they are somewhat complex to include. If you want, look at ItemCoal or BlockWool to see how it's done. Keep in mind, though, that you can't put damage values in the furnace.
Also everytime I try to do the same thing as you and it still got the same errors!
Rules posted here: http://rules.mcf.li/ or click signature.
Lucky you... I can't mod because I get errors even if I do it right and I never can get the class files when a reobf.
Rules posted here: http://rules.mcf.li/ or click signature.
Loook for any errors in the file and fix them.
Rules posted here: http://rules.mcf.li/ or click signature.
What does the error say exactly? Can I see the code?
Never mind fixed it. It was just a small typing error >.<