package net.minecraft.src;
import java.util.Random;
public class mod_Ore extends BaseMod
{
//This declares a new block called ________, which is a block of type "_______", has a data value of ____,
//a hardness of 0.1, a resistance to TNT of 0, and will give off light
public static final Block Uranium =
new Uranium(201, 0).setHardness(7.0F).setResistance(5.0F).setLightValue(4.0F).setBlockName("a453");
public static final Block Crystalite =
new Crystalite(202, 0).setHardness(6.0F).setResistance(5.0F).setLightValue(4.0F).setBlockName("a123");
public mod_Ore()
{
//This registers our new block
ModLoader.registerBlock(Uranium);
ModLoader.registerBlock(Crystalite);
//This overrides the texture pack and sets the block's texture to ________.png
Uranium.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Uranium.png");
Crystalite.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Crystalite.PNG");
//This adds the in game name to our block
ModLoader.addName(Uranium, "Uranium Ore");
ModLoader.addName(Crystalite, "Crystal");
//This adds the smelting recipe to the block, so that you can smelt it in a furnace
}
public String Version()
{
return "1.0.0";
}
public void generateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 40; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(60);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Ore.Uranium.blockID, 16)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
@Override
public String getVersion() {
// TODO Auto-generated method stub
return null;
}
@Override
public void load() {
// TODO Auto-generated method stub
}
}
If you use the class files in the startclient.bat it will say it misses images.
And i mean you have to put your image (.png) in the folder /gui/
Oh yes alright, don't forget Capitals if you said that in the code.
I have to guit the image in /gui? I didn't have to before when I did just PumpkinSpice. But alright, I'll give that a try when I get home from work tonight... And I never forget capitals haha. Hmm, there was an update for mcp yesterday I got. I just kinda thought "hmm I wonder if it needs an update" and It did. I haven't tried anything since I updated, but hopefully Things will work now.
Hmmm..... Everything was going smoothly until I hit the crafting tutorial. I copied everything you had, but it kept running into error. Finally I deleted that crafting from my code, and did the recompile.bat and reobfuscate.bat. I didn't get any error, but when I placed it my my .jar, minecraft crashed..... I'm very confused, because I followed everything you did.
EDIT: Right before minecraft crashed, an error message appeared. It flashed for only an instant, and Prt Scr wouldn't take a screen shot of it. I did see the words Too Many Items, so maybe that's the problem, since I have the mod installed. I'll remove it and try again.
EDIT2: Nope. Didn't change anything. Still crashes.
EDIT3: *facepalm* I had the ID set for 123 like the tutorial said, but with the new 1.2 update, the ID for 123 is now being used. I switched my ID to 200 and it works great! Thank you so much for the tutorials! (The Crafting still isn't working, though.)
EDIT4: Your crafting code doesn't work, but by some experimentation, I figured out that the code we need is this:
ModLoader.addRecipe(new ItemStack(Block.###, 1), new Object[]
{
" A ", "ABA", " A ", 'A', Item.AAA, 'B', Block.BBB
});
I have to guit the image in /gui? I didn't have to before when I did just PumpkinSpice. But alright, I'll give that a try when I get home from work tonight... And I never forget capitals haha. Hmm, there was an update for mcp yesterday I got. I just kinda thought "hmm I wonder if it needs an update" and It did. I haven't tried anything since I updated, but hopefully Things will work now.
Still nothing. I don't know what is going wrong -.- put the images in gui, still freezes...
found out how to fix it make it 5 then if you have created your own armor texture like cloth if its like say for example my armor is Swaginite but you notice how cloth_1 is like that u have to do it like Swaginite_1 and Swaginite_2 then you goto the ModLoader.addArmor("Swaginite") and put if your armors starting letter is lowercase then u put it as lowercase so it would look like ModLoader.addArmor("swaginite") and you have working armor textures if you need help just message me
all i have modloader error
i watched block tutorial and smelting tutorial and it's don't work
whats error:
Mods loaded: 1
ModLoader 1.2.3
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT bf8dd11a --------
Generated 3/9/12 2:35 PM
Minecraft: Minecraft 1.2.3
OS: Windows 7 (x86) version 6.1
Java: 1.7.0_02, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 5570 version 4.2.11399 Compatibility Profile Context, ATI Technologies Inc.
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.ArrayIndexOutOfBoundsException: 10005
at net.minecraft.src.Block.<init>(Block.java:271)
at net.minecraft.src.Block.<init>(Block.java:308)
at net.minecraft.src.BlockStone.<init>(BlockStone.java:9)
at net.minecraft.src.BlockTutorialBlock.<init>(BlockTutorialBlock.java:11)
at net.minecraft.src.mod_tutorial.<clinit>(mod_tutorial.java:11)
... 15 more
--- END ERROR REPORT d5e23614 ----------
all i have modloader error
i watched block tutorial and smelting tutorial and it's don't work
whats error:
Mods loaded: 1
ModLoader 1.2.3
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT bf8dd11a --------
Generated 3/9/12 2:35 PM
Minecraft: Minecraft 1.2.3
OS: Windows 7 (x86) version 6.1
Java: 1.7.0_02, Oracle Corporation
VM: Java HotSpot™ Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 5570 version 4.2.11399 Compatibility Profile Context, ATI Technologies Inc.
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.ArrayIndexOutOfBoundsException: 10005
at net.minecraft.src.Block.<init>(Block.java:271)
at net.minecraft.src.Block.<init>(Block.java:308)
at net.minecraft.src.BlockStone.<init>(BlockStone.java:9)
at net.minecraft.src.BlockTutorialBlock.<init>(BlockTutorialBlock.java:11)
at net.minecraft.src.mod_tutorial.<clinit>(mod_tutorial.java:11)
... 15 more
--- END ERROR REPORT d5e23614 ----------
package net.minecraft.src;
public class mod_tutorial extends BaseMod
{
public static final Block TutorialBlock;
static
{
TutorialBlock = (new BlockTutorialBlock(10005, ModLoader.addOverride("/terrain.png", "/mods/TutorialBlock.png"))).setHardness(3F).setResistance(5F).setStepSound(Block.soundWoodFootstep).setBlockName("TutorialBlock");
}
public mod_tutorial()
{
ModLoader.registerBlock(TutorialBlock);
ModLoader.addName(TutorialBlock, "Tutorial Block Ore");
ModLoader.addSmelting(Block.planks.blockID, new ItemStack(TutorialBlock, 1));
}
public void load()
{
}
public String getVersion()
{
return "minecraft 1.2 and above tutorial mod";
}
}
BlockTutorialBlock:
package net.minecraft.src;
import java.util.Random;
public class BlockTutorialBlock extends BlockStone {
public BlockTutorialBlock(int i, int j)
{
super(i, j);
}
public int quantityDropped (Random random)
{
return 1;
}
public int idDropped(int i, Random random, int j)
{
return Item.coal.shiftedIndex;
}
}
Mods loaded: 2
ModLoader 1.2.3
mod_tutorial minecraft 1.2 and above tutorial mod
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT fc46d6f4 --------
Generated 3/9/12 6:05 PM
Minecraft: Minecraft 1.2.3
OS: Windows 7 (x86) version 6.1
Java: 1.7.0_02, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 5570 version 4.2.11399 Compatibility Profile Context, ATI Technologies Inc.
java.lang.ArrayIndexOutOfBoundsException: 379
at net.minecraft.src.ModLoader.initStats(ModLoader.java:902)
at net.minecraft.src.ModLoader.init(ModLoader.java:875)
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)
--- END ERROR REPORT 1b647d05 ----------
Mods loaded: 2
ModLoader 1.2.3
mod_tutorial minecraft 1.2 and above tutorial mod
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT fc46d6f4 --------
Generated 3/9/12 6:05 PM
Minecraft: Minecraft 1.2.3
OS: Windows 7 (x86) version 6.1
Java: 1.7.0_02, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 5570 version 4.2.11399 Compatibility Profile Context, ATI Technologies Inc.
java.lang.ArrayIndexOutOfBoundsException: 379
at net.minecraft.src.ModLoader.initStats(ModLoader.java:902)
at net.minecraft.src.ModLoader.init(ModLoader.java:875)
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)
--- END ERROR REPORT 1b647d05 ----------
i Solved It
But my mod Do not work
where is no Tutorial Blocks and also not crafting
just see code
mod_tutorial.java:
package net.minecraft.src;
import java.util.Random;
public class mod_tutorial extends BaseMod
{
public static Item TutorialIngot;
public static final Block TutorialBlock;
static
{
TutorialBlock = (new BlockTutorialBlock(125, ModLoader.addOverride("/terrain.png", "/mods/TutorialBlock.png"))).setHardness(3F).setResistance(5F).setStepSound(Block.soundWoodFootstep).setBlockName("TutorialBlock");
TutorialIngot = (new Item(126)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/TutorialIngot.png")).setItemName("TutorialIngot");
}
public mod_tutorial()
{
ModLoader.addName(TutorialIngot, "Tutorial Ingot");
ModLoader.registerBlock(TutorialBlock);
ModLoader.addName(TutorialBlock, "Tutorial Block Ore");
ModLoader.addSmelting(Block.planks.blockID, new ItemStack(TutorialBlock, 1));
ModLoader.addSmelting(TutorialBlock.blockID, new ItemStack(TutorialIngot, 1));
ModLoader.AddRecipe(new ItemStack(mod_tutorial.TutorialBlock, 1), new Object[]
{
" G ", " C ", " G ", Character.valueOf('G'), Item.ingotIron, Character.valueOf('C'), Item.coal
});
}
public void load()
{
}
public void GenerateSurface(World world, Random rand, int chunkx, int chunkz)
{
//Tutorial Block
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(TutorialBlock.blockID, 10)).generate(world, rand, i1, j1, k1);
}
//End Tutorial Block
}
public String getVersion()
{
return "TuTorialMod";
}
}
and
BlockTutorialBlock.java:
package net.minecraft.src;
import java.util.Random;
public class BlockTutorialBlock extends BlockStone {
public BlockTutorialBlock(int i, int j)
{
super(i, j);
}
public int quantityDropped (Random random)
{
return 1;
}
public int idDropped(int i, Random random, int j)
{
return Item.coal.shiftedIndex;
}
}
PLEASE give text write ups of how to make these. Videos just don't work. I like to have text write ups of how to make a mod with the [code]
brackets. Thanks if you can
My error is that when I updated my mod for 1.2.3, the creature I made wasn't a custom creature. It became a biped and the texture became messed up. Does anyone know how to fix it?
Rollback Post to RevisionRollBack
It's easy to build your reputation up, but once you destroy it, it's hard to get it back up.
~Jaren_117
I love your videos! They are extremely helpful and easy to understand. Thank you so much! I only have one question. When I make a block recipe, how do I make it so that lapiz dye is one of the ingredients? I cant find any identification for it that would work in the recipe coding. Thanks
Sorry for the few tutorials lately. As promised the tool/Sword tutorial is all ready to be filmed. I have it prepared and ready. I could film it at this moment except My family has some people over and their could be potential background noise. I will try to find a good time to film it. Thanks everyone for the positive feedback!
Thanks, also I'm not sure if you still need it but I will have the tool tutorial coming out. After that, I will talk about generating structures. All kinds of fun stuff!Also, I'm not sure if you guys wan't this, but I could possibly go through start to finish how to make a simple mod. I already made a quick attempt at that!
it does not add the block or generate
Art by me: MrPancakeWolfie@DeviantArt
I have to guit the image in /gui? I didn't have to before when I did just PumpkinSpice. But alright, I'll give that a try when I get home from work tonight... And I never forget capitals haha. Hmm, there was an update for mcp yesterday I got. I just kinda thought "hmm I wonder if it needs an update" and It did. I haven't tried anything since I updated, but hopefully Things will work now.
EDIT: Right before minecraft crashed, an error message appeared. It flashed for only an instant, and Prt Scr wouldn't take a screen shot of it. I did see the words Too Many Items, so maybe that's the problem, since I have the mod installed. I'll remove it and try again.
EDIT2: Nope. Didn't change anything. Still crashes.
EDIT3: *facepalm* I had the ID set for 123 like the tutorial said, but with the new 1.2 update, the ID for 123 is now being used. I switched my ID to 200 and it works great! Thank you so much for the tutorials! (The Crafting still isn't working, though.)
EDIT4: Your crafting code doesn't work, but by some experimentation, I figured out that the code we need is this:
ModLoader.addRecipe(new ItemStack(Block.###, 1), new Object[]
{
" A ", "ABA", " A ", 'A', Item.AAA, 'B', Block.BBB
});
Still nothing. I don't know what is going wrong -.- put the images in gui, still freezes...
i watched block tutorial and smelting tutorial and it's don't work
whats error:
Mods loaded: 1
ModLoader 1.2.3
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT bf8dd11a --------
Generated 3/9/12 2:35 PM
Minecraft: Minecraft 1.2.3
OS: Windows 7 (x86) version 6.1
Java: 1.7.0_02, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 5570 version 4.2.11399 Compatibility Profile Context, ATI Technologies Inc.
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.ArrayIndexOutOfBoundsException: 10005
at net.minecraft.src.Block.<init>(Block.java:271)
at net.minecraft.src.Block.<init>(Block.java:308)
at net.minecraft.src.BlockStone.<init>(BlockStone.java:9)
at net.minecraft.src.BlockTutorialBlock.<init>(BlockTutorialBlock.java:11)
at net.minecraft.src.mod_tutorial.<clinit>(mod_tutorial.java:11)
... 15 more
--- END ERROR REPORT d5e23614 ----------
code please
Mod_tutorial:
BlockTutorialBlock:
The block ID for this is too large. Minecraft cant have a block with the ID of 10005 as you put there.
i Solved It
But my mod Do not work
where is no Tutorial Blocks and also not crafting
just see code
mod_tutorial.java:
and
BlockTutorialBlock.java:
Only Tutorial Ingots Works In Game
brackets. Thanks if you can
I don't follow.... What are you trying to say?
~Jaren_117
Thanks, also I'm not sure if you still need it but I will have the tool tutorial coming out. After that, I will talk about generating structures. All kinds of fun stuff!Also, I'm not sure if you guys wan't this, but I could possibly go through start to finish how to make a simple mod. I already made a quick attempt at that!
That guy that makes the wheels turn.. Y'know...