If possible someone could make a modloader basic file class(only with the block information) and a block class, and post it here for download so I could check what I am doing wrong. Can someone do it ?
package net.minecraft.src;
import java.util.Random;
public class BlockTestBlock extends Block
{
public BlockTestBlock(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_Block.TestBlock.blockID;
}
public int quantityDropped(Random random)
{
return 3;
}}
''class BlockTestBlock is public, should be declared in a file named BlockTestBlock.java public class BlockTestBlock extends Block''
What does it mean ?
And one more doubt: How should I save the modloader basic file and the block file ? ''mod_test.class, BlockTestblock.class" or ''mod_test.java, BlockTestblock.java" ?
, On the 5th line, write "public static final Block testblock" and not "public static final Block TestBlock" capitals are important too, if it still doesn't work I'll try something different ^^
Well, I tried this and.. nothing. So I tried to rewrite the code, and... nothing. The same problem, I can't craft the item, and probably the item doesn't even exist.
The mod_test class:
package net.minecraft.src;
public class mod_test extends BaseMod
{
public static final Block testblock = new testblock(225, 0).setBlockName("Test Block").setHardness(3F).setResistance(20F).setLightValue(20F);
public void load()
{
testblock.blockIndexInTexture = ModLoader.addOverride("terrain.png", "/russo/testblock.png");
ModLoader.registerBlock(testblock);
ModLoader.addName(testblock, "Test Block");
ModLoader.addRecipe(new ItemStack(testblock, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
}
public String getVersion()
{
return "1.2.5"
}
}
0
0
This is the error: http://imgur.com/ATlTv
0
0
If possible someone could make a modloader basic file class(only with the block information) and a block class, and post it here for download so I could check what I am doing wrong. Can someone do it ?
0
0
0
It is saying that it cannot find the variable ''testblock'', but am I using it as variable ? I didn't understand...
0
But I am having problems with this block code:
0
This link is for JDK 7, but the best one is the JDK 6, isn't it ?
0
''Failed to load the JNI shared library ''C:\Program Files(x86)\Java\jdk(1.6.0)\bin\...\jre\bin\client\jvm.dll"
0
What should I do ?
0
When I try to recompile I get this error:
''class BlockTestBlock is public, should be declared in a file named BlockTestBlock.java public class BlockTestBlock extends Block''
What does it mean ?
And one more doubt: How should I save the modloader basic file and the block file ? ''mod_test.class, BlockTestblock.class" or ''mod_test.java, BlockTestblock.java" ?
0
EDIT:
And in this code, can you explain me how can I decide how many items/blocks will drop ? Like I want my block to drop 3 dirts. Can I do it ?
0
Well, I tried this and.. nothing. So I tried to rewrite the code, and... nothing. The same problem, I can't craft the item, and probably the item doesn't even exist.
The mod_test class:
0
What should I do about that ?