Also how do u make the block drop its self instead of coal cause i want to do it so i dont get coal but i get the ore
The Block itself as in an ingot of the block? Or drop the block itself?
If you want to drop the ingot, in the Block#### where #### = name of your block, change the item drop id. If it's your own custom item make it - "return mod_####.$$$$.shiftedIndex;" where #### is the name of your mod file and $$$$ is the name of the item you want it to drop. If it's not a custom item then just put "return Item.$$$$.shiftedIndex;" where $$$$ is the name of the premade item you want it to drop.
If you want it to drop a block everythings the same except instead of shiftedIndex you put blockID and if it's not a custom block you would put "return Block.$$$$.blockID" where $$$$ is the name of the premade block.
If that makes any sense? I'm better with visuals. But, ask if you have more questions.
The Block itself as in an ingot of the block? Or drop the block itself?
If you want to drop the ingot, in the Block#### where #### = name of your block, change the item drop id. If it's your own custom item make it - "return mod_####.$$$$.shiftedIndex;" where #### is the name of your mod file and $$$$ is the name of the item you want it to drop. If it's not a custom item then just put "return Item.$$$$.shiftedIndex;" where $$$$ is the name of the premade item you want it to drop.
If you want it to drop a block everythings the same except instead of shiftedIndex you put blockID and if it's not a custom block you would put "return Block.$$$$.blockID" where $$$$ is the name of the premade block.
If that makes any sense? I'm better with visuals. But, ask if you have more questions.
i want it to drop the block its self so then i can smelt it
i want it to drop the block its self so then i can smelt it
In that case if it's your own custom block, you would want to put in this code - "return mod_####.$$$$.blockID" #### = mod file name and $$$$ = block name.
I keep getting errors where ever i put Amethystblock....What have i done wrong?
package net.minecraft.src;
public class mod_Tut extends BaseMod
{
public static Block Block Amethystblock;
static
{
Amethystblock = (new BlockAmethystblock(988, ModLoader.addOverride("/terrain.ong", "/tutorial/Amethyst.png"))).setHardness(1.5F).setResistance(10F).setStepSound(Block.soundStoneFootstep).setBlockName("Amethyst");
}
public void load()
{
}
public String getVersion()
{
return "Minecraft 1.1 and Above tutorial Mod";
}
}
I think i'm doing something wrong? I'm getting an error with some of the lines, for some reason it just doesn't like Amethystblock.
When you wrote:
public static Block Block Amethystblock;
You added an extra "Block" It should look like this:
public static Block Amethystblock;
Also When you call your override it's terrain.png not terrain.ong. Lastly I'm not sure if this is giving you an error, but I'm pretty sure block ID's have to be under 255, yours is 988. Sorry I didn't mention that last one in the video. I should have.
The only thing I would recommend is somehow telling us how to create a GUI. I want to create a new type of crafting table, and I haven't gotten any answers yet.
The only thing I would recommend is somehow telling us how to create a GUI. I want to create a new type of crafting table, and I haven't gotten any answers yet.
Could you help me out a bit? I seem to not be able to start the client, getting an error that says :
Mods loaded: 1
ModLoader 1.1
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 9c4f49b2 --------
Generated 28/02/12 10:40
Minecraft: Minecraft 1.1
OS: Windows Vista (x86) version 6.0
Java: 1.7.0-ea, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Intel Cantiga version 2.0.0 - Build 7.15.10.1554, Intel
java.lang.Exception: No registry for this texture: terrain.png
at net.minecraft.src.ModLoader.getUniqueSpriteIndex(ModLoader.java:551)
at net.minecraft.src.ModLoader.addOverride(ModLoader.java:301)
at net.minecraft.src.mod_Surishine.<init>(mod_Surishine.java:27)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:234)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1217)
at net.minecraft.src.ModLoader.init(ModLoader.java:708)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:150)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:78)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:9)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:316)
at net.minecraft.client.Minecraft.run(Minecraft.java:620)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 9ba02f38 ----------
I'm judging by the looks of it that the main problem is with the terrain.png file and ModLoader not being able to override it(idk :S)
Anyway here are my codes(forgive me if i did some stuff wrong as I am completely new to this >.<):
The mod_BlockName.java(in my case I named it Surishine) class code:
package net.minecraft.src;
public class mod_Surishine extends BaseMod
{
public static final Block Surishine;
public static int testificatetop;
public static int testificateunder;
public static int testificateright;
public static int testificateleft;
public static int testificateback;
static
{
Surishine = (new BlockSurishine(123, ModLoader.addOverride("terrain.png", "/mods/testificate1.png"))).setHardness(1.5F).setResistance(2F).setLightValue(5F).setStepSound(Block.soundStoneFootstep).setBlockName("Surishine");
}
public mod_Surishine()
{
testificatetop = ModLoader.addOverride("terrain.png", "/mods/testificatetop.png");
testificateunder = ModLoader.addOverride("terrain.png", "/mods/testificateunder.png");
testificateright = ModLoader.addOverride("terrain.png", "/mods/testificateright.png");
testificateleft = ModLoader.addOverride("terrain.png", "/mods/testificateleft.png");
testificateback = ModLoader.addOverride("terrain.png", "/mods/testificateback.png");
ModLoader.AddName(Surishine, "Surishine");
ModLoader.RegisterBlock(Surishine);
ModLoader.AddRecipe(new ItemStack(mod_Surishine.Surishine, 16), new Object []
{
"G", Character.valueOf('G'), Block.glowStone
});
}
public void load()
{
}
public String getVersion()
{
return "Surishine Block";
}
}
and this is the BlockBlockName.java class(again, Surishine):
package net.minecraft.src;
import java.util.Random;
public class BlockSurishine extends BlockStone
{
public BlockSurishine(int i, int j)
{
super(i, j);
j = blockIndexInTexture;
}
public int quantityDropped(Random random)
{
return 1;
}
public int idDropped(int i, Random random, int j)
{
return Item.diamond.shiftedIndex;
}
public int getBlockTextureFromSide(int i)
{
if(i==1)
{
return mod_Surishine.testificatetop;
}
if(i==0)
{
return mod_Surishine.testificateunder;
}
if(i==2)
{
return mod_Surishine.testificateright;
}
if(i==3)
{
return mod_Surishine.testificateleft;
}
if(i==4)
{
return mod_Surishine.testificateback;
}else
{
return blockIndexInTexture;
}
}}
I'm trying to get all the sides to have different textures. Halp q_q
Rollback Post to RevisionRollBack
I just wanna help. And possibly make mods for the future, who knows? XD
I also like thus support :
BACON, a mod that I think has great potential if given a good amount of effort.
Could you help me out a bit? I seem to not be able to start the client, getting an error that says :
Mods loaded: 1
ModLoader 1.1
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 9c4f49b2 --------
Generated 28/02/12 10:40
Minecraft: Minecraft 1.1
OS: Windows Vista (x86) version 6.0
Java: 1.7.0-ea, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Intel Cantiga version 2.0.0 - Build 7.15.10.1554, Intel
java.lang.Exception: No registry for this texture: terrain.png
at net.minecraft.src.ModLoader.getUniqueSpriteIndex(ModLoader.java:551)
at net.minecraft.src.ModLoader.addOverride(ModLoader.java:301)
at net.minecraft.src.mod_Surishine.<init>(mod_Surishine.java:27)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:234)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1217)
at net.minecraft.src.ModLoader.init(ModLoader.java:708)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:150)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:78)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:9)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:316)
at net.minecraft.client.Minecraft.run(Minecraft.java:620)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 9ba02f38 ----------
I'm judging by the looks of it that the main problem is with the terrain.png file and ModLoader not being able to override it(idk :S)
Anyway here are my codes(forgive me if i did some stuff wrong as I am completely new to this >.<):
The mod_BlockName.java(in my case I named it Surishine) class code:
package net.minecraft.src;
public class mod_Surishine extends BaseMod
{
public static final Block Surishine;
public static int testificatetop;
public static int testificateunder;
public static int testificateright;
public static int testificateleft;
public static int testificateback;
static
{
Surishine = (new BlockSurishine(123, ModLoader.addOverride("terrain.png", "/mods/testificate1.png"))).setHardness(1.5F).setResistance(2F).setLightValue(5F).setStepSound(Block.soundStoneFootstep).setBlockName("Surishine");
}
public mod_Surishine()
{
testificatetop = ModLoader.addOverride("terrain.png", "/mods/testificatetop.png");
testificateunder = ModLoader.addOverride("terrain.png", "/mods/testificateunder.png");
testificateright = ModLoader.addOverride("terrain.png", "/mods/testificateright.png");
testificateleft = ModLoader.addOverride("terrain.png", "/mods/testificateleft.png");
testificateback = ModLoader.addOverride("terrain.png", "/mods/testificateback.png");
ModLoader.AddName(Surishine, "Surishine");
ModLoader.RegisterBlock(Surishine);
ModLoader.AddRecipe(new ItemStack(mod_Surishine.Surishine, 16), new Object []
{
"G", Character.valueOf('G'), Block.glowStone
});
}
public void load()
{
}
public String getVersion()
{
return "Surishine Block";
}
}
and this is the BlockBlockName.java class(again, Surishine):
package net.minecraft.src;
import java.util.Random;
public class BlockSurishine extends BlockStone
{
public BlockSurishine(int i, int j)
{
super(i, j);
j = blockIndexInTexture;
}
public int quantityDropped(Random random)
{
return 1;
}
public int idDropped(int i, Random random, int j)
{
return Item.diamond.shiftedIndex;
}
public int getBlockTextureFromSide(int i)
{
if(i==1)
{
return mod_Surishine.testificatetop;
}
if(i==0)
{
return mod_Surishine.testificateunder;
}
if(i==2)
{
return mod_Surishine.testificateright;
}
if(i==3)
{
return mod_Surishine.testificateleft;
}
if(i==4)
{
return mod_Surishine.testificateback;
}else
{
return blockIndexInTexture;
}
}}
I'm trying to get all the sides to have different textures. Halp q_q
just look at the vid again and see if u can find wat u have done wrong cause im no expert yet but mrsal511 is helping me be one :biggrin.gif:
Could you help me out a bit? I seem to not be able to start the client, getting an error that says :
Mods loaded: 1
ModLoader 1.1
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 9c4f49b2 --------
Generated 28/02/12 10:40
Minecraft: Minecraft 1.1
OS: Windows Vista (x86) version 6.0
Java: 1.7.0-ea, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Intel Cantiga version 2.0.0 - Build 7.15.10.1554, Intel
java.lang.Exception: No registry for this texture: terrain.png
at net.minecraft.src.ModLoader.getUniqueSpriteIndex(ModLoader.java:551)
at net.minecraft.src.ModLoader.addOverride(ModLoader.java:301)
at net.minecraft.src.mod_Surishine.<init>(mod_Surishine.java:27)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:234)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1217)
at net.minecraft.src.ModLoader.init(ModLoader.java:708)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:150)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:78)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:9)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:316)
at net.minecraft.client.Minecraft.run(Minecraft.java:620)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 9ba02f38 ----------
I'm judging by the looks of it that the main problem is with the terrain.png file and ModLoader not being able to override it(idk :S)
Anyway here are my codes(forgive me if i did some stuff wrong as I am completely new to this >.<):
The mod_BlockName.java(in my case I named it Surishine) class code:
package net.minecraft.src;
public class mod_Surishine extends BaseMod
{
public static final Block Surishine;
public static int testificatetop;
public static int testificateunder;
public static int testificateright;
public static int testificateleft;
public static int testificateback;
static
{
Surishine = (new BlockSurishine(123, ModLoader.addOverride("terrain.png", "/mods/testificate1.png"))).setHardness(1.5F).setResistance(2F).setLightValue(5F).setStepSound(Block.soundStoneFootstep).setBlockName("Surishine");
}
public mod_Surishine()
{
testificatetop = ModLoader.addOverride("terrain.png", "/mods/testificatetop.png");
testificateunder = ModLoader.addOverride("terrain.png", "/mods/testificateunder.png");
testificateright = ModLoader.addOverride("terrain.png", "/mods/testificateright.png");
testificateleft = ModLoader.addOverride("terrain.png", "/mods/testificateleft.png");
testificateback = ModLoader.addOverride("terrain.png", "/mods/testificateback.png");
ModLoader.AddName(Surishine, "Surishine");
ModLoader.RegisterBlock(Surishine);
ModLoader.AddRecipe(new ItemStack(mod_Surishine.Surishine, 16), new Object []
{
"G", Character.valueOf('G'), Block.glowStone
});
}
public void load()
{
}
public String getVersion()
{
return "Surishine Block";
}
}
and this is the BlockBlockName.java class(again, Surishine):
package net.minecraft.src;
import java.util.Random;
public class BlockSurishine extends BlockStone
{
public BlockSurishine(int i, int j)
{
super(i, j);
j = blockIndexInTexture;
}
public int quantityDropped(Random random)
{
return 1;
}
public int idDropped(int i, Random random, int j)
{
return Item.diamond.shiftedIndex;
}
public int getBlockTextureFromSide(int i)
{
if(i==1)
{
return mod_Surishine.testificatetop;
}
if(i==0)
{
return mod_Surishine.testificateunder;
}
if(i==2)
{
return mod_Surishine.testificateright;
}
if(i==3)
{
return mod_Surishine.testificateleft;
}
if(i==4)
{
return mod_Surishine.testificateback;
}else
{
return blockIndexInTexture;
}
}}
I'm trying to get all the sides to have different textures. Halp q_q
Make sure when you override terrain.png it's like this "/terrain.png" notice the slash at the beginning. You don't have the slash. Hope that helps! :smile.gif:
Suggestion for basic & advanced tutorial:
Adding and/or Changing game "physics" or mechanics.
Example of basic:
Lumber - Drops the tree's wood aside and above the cut-point (targeted block) instead of just the targeted block block.
Example of advanced:
Somnia - Changes sleep mechanics from vanilla's "just set time to dawn" to an actual fast-paced simulation of the world. Useful, for example, because of overnight crop-growth and/or overnight furnacing of items.
Hope you make this kind of tutorial soon!
Rollback Post to RevisionRollBack
Digging straight down while forgetting I have no Ladders at all...
The Block itself as in an ingot of the block? Or drop the block itself?
If you want to drop the ingot, in the Block#### where #### = name of your block, change the item drop id. If it's your own custom item make it - "return mod_####.$$$$.shiftedIndex;" where #### is the name of your mod file and $$$$ is the name of the item you want it to drop. If it's not a custom item then just put "return Item.$$$$.shiftedIndex;" where $$$$ is the name of the premade item you want it to drop.
If you want it to drop a block everythings the same except instead of shiftedIndex you put blockID and if it's not a custom block you would put "return Block.$$$$.blockID" where $$$$ is the name of the premade block.
If that makes any sense? I'm better with visuals. But, ask if you have more questions.
That guy that makes the wheels turn.. Y'know...
i want it to drop the block its self so then i can smelt it
In that case if it's your own custom block, you would want to put in this code - "return mod_####.$$$$.blockID" #### = mod file name and $$$$ = block name.
That guy that makes the wheels turn.. Y'know...
When you wrote:
You added an extra "Block" It should look like this:
Also When you call your override it's terrain.png not terrain.ong. Lastly I'm not sure if this is giving you an error, but I'm pretty sure block ID's have to be under 255, yours is 988. Sorry I didn't mention that last one in the video. I should have.
That should be everything.
That guy that makes the wheels turn.. Y'know...
Your Welcome. :smile.gif:
That guy that makes the wheels turn.. Y'know...
BTW This is The Best Tutorial Ever. All the other ones make no sense.
:biggrin.gif:
Alright, I'll make a quick tutorial on how to install your mods. I can do that right now. Thanks for your comments :smile.gif:
Yup, I'll put that onto my to-do list of videos.
That guy that makes the wheels turn.. Y'know...
The install tutorial was just uploaded to my channel you can check it out. I'll edit the forum post as well now!
That guy that makes the wheels turn.. Y'know...
I'm judging by the looks of it that the main problem is with the terrain.png file and ModLoader not being able to override it(idk :S)
Anyway here are my codes(forgive me if i did some stuff wrong as I am completely new to this >.<):
The mod_BlockName.java(in my case I named it Surishine) class code:
and this is the BlockBlockName.java class(again, Surishine):
I'm trying to get all the sides to have different textures. Halp q_q
I also like thus support :
just look at the vid again and see if u can find wat u have done wrong cause im no expert yet but mrsal511 is helping me be one :biggrin.gif:
I've watched it several times...I know there is a problem, I just can't see it >.< EYES! Y U NO WORK!?!?
I also like thus support :
lol
Make sure when you override terrain.png it's like this "/terrain.png" notice the slash at the beginning. You don't have the slash. Hope that helps! :smile.gif:
That guy that makes the wheels turn.. Y'know...
what to do?????
Adding and/or Changing game "physics" or mechanics.
Example of basic:
Lumber - Drops the tree's wood aside and above the cut-point (targeted block) instead of just the targeted block block.
Example of advanced:
Somnia - Changes sleep mechanics from vanilla's "just set time to dawn" to an actual fast-paced simulation of the world. Useful, for example, because of overnight crop-growth and/or overnight furnacing of items.
Hope you make this kind of tutorial soon!