public EnumAction getItemUseAction(ItemStack itemstack)
{
return EnumAction.assassin;
}
And also
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
if(entityplayer.isSneaking())
{
entityplayer.setItemInUse(itemstack, getMaxItemUseDuration(itemstack));
}
return itemstack;
}
I just don't know how to define what EnumAction.assassin is, or if that's even what I should be doing.
//I'm trying to make it so if sneaking, you can right click for a one hit kill
public EnumAction getItemUseAction(ItemStack itemstack)
{
return EnumAction.assassin;
}
And also
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
if(entityplayer.isSneaking())
{
entityplayer.setItemInUse(itemstack, getMaxItemUseDuration(itemstack));
}
return itemstack;
}
I just don't know how to define what EnumAction.assassin is, or if that's even what I should be doing.
//I'm trying to make it so if sneaking, you can right click for a one hit kill
Yeah I have no clue how to do this off the top of my head :/ I'd have to play around with this.
Can you please make a tutorial, on how to add your own sound to Minecraft (with AudioMod). I've searched on the Internet but I can't find it. I even tryied myself but after installed ModLoader and AudioMod and I decompile it gives me 42 errors about the AudioMod classes.
I would really appreciate if you could make only a fast one and just explain the important thing to add sounds
Can you please make a tutorial, on how to add your own sound to Minecraft (with AudioMod). I've searched on the Internet but I can't find it. I even tryied myself but after installed ModLoader and AudioMod and I decompile it gives me 42 errors about the AudioMod classes.
I would really appreciate if you could make only a fast one and just explain the important thing to add sounds
Please answer this post.
Ty in advance.
You can't decompile Audio Mod inside of eclipse, it's something you add after reobfuscating.
Ok I have a problem... in Eclipse, I recieve no errors, BUT after I recompile, I try to use startclient, then minecraft comes up and i get this error: java.lang.StringIndexOutOfBoundsException: String Index out of range: 8
PLZZZZ help! If i must, i will add the coding ive done...
package net.minecraft.src;
import java.util.Random;
public class mod_Vog extends BaseMod
{
public static final Block vogniteore = new BlockVog(130, 0). setHardness(3F). setResistance(5F). setLightValue(0.5F). setBlockName("Vog");
public static final Item VogCrystal = new ItemVogCrystal(400).setItemName("VogCrystal");
public static final Item vogPickaxe = new ItemPickaxe(401, EnumToolMaterial.VOGNITE).setItemName("VogPickaxe");
public static final Item vogSword = new ItemSword(402, EnumToolMaterial.VOGNITE).setItemName("VogSword");
public static final Item vogSpade = new ItemSpade(403, EnumToolMaterial.VOGNITE).setItemName("VogSpade");
public static final Item vogAxe = new ItemAxe(404, EnumToolMaterial.VOGNITE).setItemName("VogAxe");
public static final Item vogHoe = new ItemHoe(405, EnumToolMaterial.VOGNITE).setItemName("VogHoe");
public mod_Vog()
{
ModLoader.RegisterBlock(vogniteore);
ModLoader.AddName(vogniteore, "Vognite Ore");
vogniteore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Vog1.png");
ModLoader.AddName(VogCrystal, "Vognite");
VogCrystal.iconIndex = ModLoader.addOverride("/gui/items.png", "/Vog2.png");
ModLoader.AddSmelting(mod_Vog.vogniteore.blockID, new ItemStack(mod_Vog.VogCrystal, 1));
//Pickaxe
ModLoader.AddName(vogPickaxe, "Vognite Pickaxe");
vogPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Vog4.png");
ModLoader.AddRecipe(new ItemStack(vogPickaxe, 1), new Object[]{
"###", " X ", " X ", Character.valueOf('#'), VogCrystal, Character.valueOf('X'), Item.ingotIron
});
//Sword
ModLoader.AddName(vogSword, "Vognite Sword");
vogPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Vog3.png");
ModLoader.AddRecipe(new ItemStack(vogPickaxe, 1), new Object[]{
" # ", " # ", " X ", Character.valueOf('#'), VogCrystal, Character.valueOf('X'), Item.ingotIron
});
//Shovel
ModLoader.AddName(vogSpade, "Vognite Shovel");
vogPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Vog5.png");
ModLoader.AddRecipe(new ItemStack(vogPickaxe, 1), new Object[]{
" # ", " X ", " X ", Character.valueOf('#'), VogCrystal, Character.valueOf('X'), Item.ingotIron
});
//Axe
ModLoader.AddName(vogAxe, "Vognite Axe");
vogPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Vog6.png");
ModLoader.AddRecipe(new ItemStack(vogPickaxe, 1), new Object[]{
"##", "#X ", " X ", Character.valueOf('#'), VogCrystal, Character.valueOf('X'), Item.ingotIron
});
//Hoe
ModLoader.AddName(vogHoe, "Vognite Hoe");
vogPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Vog7.png");
ModLoader.AddRecipe(new ItemStack(vogPickaxe, 1), new Object[]{
"##", " X ", " X ", Character.valueOf('#'), VogCrystal, Character.valueOf('X'), Item.ingotIron
});
}
public void GenerateSurface(World world, Random rand, int Xc, int Zc)
{
for(int x = 0; x < 10; x++)
{
int Xcoord = Xc + rand.nextInt(3);
int Ycoord = rand.nextInt(60);
int Zcoord = Zc + rand.nextInt(3);
(new WorldGenMinable(vogniteore.blockID, 50)).generate(world, rand, Xcoord, Ycoord, Zcoord);
}
}
public void load() {
}
public String getVersion()
{
return "1.0.1";
}
}
i cant figure out what the problem is... It says i have no errors on eclipse, but this comes up then blah...
Mods loaded: 1
ModLoader 1.0.0
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 141ccf11 --------
Generated 1/5/12 7:46 PM
Minecraft: Minecraft 1.0.0
OS: Windows 7 (x86) version 6.1
Java: 1.6.0_20, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: AMD Radeon(TM) HD 6520G version 4.1.10600 Compatibility Profile Context, ATI Technologies Inc.
java.lang.StringIndexOutOfBoundsException: String index out of range: 8
at java.lang.String.charAt(Unknown Source)
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:300)
at net.minecraft.src.ModLoader.AddRecipe(ModLoader.java:372)
at net.minecraft.src.mod_Vog.<init>(mod_Vog.java:52)
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:265)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1214)
at net.minecraft.src.ModLoader.init(ModLoader.java:733)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:162)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:42)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:314)
at net.minecraft.client.Minecraft.run(Minecraft.java:613)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 76426d1e ----------
package net.minecraft.src;
import java.util.Random;
public class mod_Vog extends BaseMod
{
public static final Block vogniteore = new BlockVog(130, 0). setHardness(3F). setResistance(5F). setLightValue(0.5F). setBlockName("Vog");
public static final Item VogCrystal = new ItemVogCrystal(400).setItemName("VogCrystal");
public static final Item vogPickaxe = new ItemPickaxe(401, EnumToolMaterial.VOGNITE).setItemName("VogPickaxe");
public static final Item vogSword = new ItemSword(402, EnumToolMaterial.VOGNITE).setItemName("VogSword");
public static final Item vogSpade = new ItemSpade(403, EnumToolMaterial.VOGNITE).setItemName("VogSpade");
public static final Item vogAxe = new ItemAxe(404, EnumToolMaterial.VOGNITE).setItemName("VogAxe");
public static final Item vogHoe = new ItemHoe(405, EnumToolMaterial.VOGNITE).setItemName("VogHoe");
public mod_Vog()
{
ModLoader.RegisterBlock(vogniteore);
ModLoader.AddName(vogniteore, "Vognite Ore");
vogniteore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Vog1.png");
ModLoader.AddName(VogCrystal, "Vognite");
VogCrystal.iconIndex = ModLoader.addOverride("/gui/items.png", "/Vog2.png");
ModLoader.AddSmelting(mod_Vog.vogniteore.blockID, new ItemStack(mod_Vog.VogCrystal, 1));
//Pickaxe
ModLoader.AddName(vogPickaxe, "Vognite Pickaxe");
vogPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Vog4.png");
ModLoader.AddRecipe(new ItemStack(vogPickaxe, 1), new Object[]{
"###", " X ", " X ", Character.valueOf('#'), VogCrystal, Character.valueOf('X'), Item.ingotIron
});
//Sword
ModLoader.AddName(vogSword, "Vognite Sword");
vogPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Vog3.png");
ModLoader.AddRecipe(new ItemStack(vogPickaxe, 1), new Object[]{
" # ", " # ", " X ", Character.valueOf('#'), VogCrystal, Character.valueOf('X'), Item.ingotIron
});
//Shovel
ModLoader.AddName(vogSpade, "Vognite Shovel");
vogPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Vog5.png");
ModLoader.AddRecipe(new ItemStack(vogPickaxe, 1), new Object[]{
" # ", " X ", " X ", Character.valueOf('#'), VogCrystal, Character.valueOf('X'), Item.ingotIron
});
//Axe
ModLoader.AddName(vogAxe, "Vognite Axe");
vogPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Vog6.png");
ModLoader.AddRecipe(new ItemStack(vogPickaxe, 1), new Object[]{
"##", "#X ", " X ", Character.valueOf('#'), VogCrystal, Character.valueOf('X'), Item.ingotIron
});
//Hoe
ModLoader.AddName(vogHoe, "Vognite Hoe");
vogPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Vog7.png");
ModLoader.AddRecipe(new ItemStack(vogPickaxe, 1), new Object[]{
"##", " X ", " X ", Character.valueOf('#'), VogCrystal, Character.valueOf('X'), Item.ingotIron
});
}
public void GenerateSurface(World world, Random rand, int Xc, int Zc)
{
for(int x = 0; x < 10; x++)
{
int Xcoord = Xc + rand.nextInt(3);
int Ycoord = rand.nextInt(60);
int Zcoord = Zc + rand.nextInt(3);
(new WorldGenMinable(vogniteore.blockID, 50)).generate(world, rand, Xcoord, Ycoord, Zcoord);
}
}
public void load() {
}
public String getVersion()
{
return "1.0.1";
}
}
i cant figure out what the problem is... It says i have no errors on eclipse, but this comes up then blah...
Mods loaded: 1
ModLoader 1.0.0
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 141ccf11 --------
Generated 1/5/12 7:46 PM
Minecraft: Minecraft 1.0.0
OS: Windows 7 (x86) version 6.1
Java: 1.6.0_20, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: AMD Radeon(TM) HD 6520G version 4.1.10600 Compatibility Profile Context, ATI Technologies Inc.
java.lang.StringIndexOutOfBoundsException: String index out of range: 8
at java.lang.String.charAt(Unknown Source)
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:300)
at net.minecraft.src.ModLoader.AddRecipe(ModLoader.java:372)
at net.minecraft.src.mod_Vog.<init>(mod_Vog.java:52)
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:265)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1214)
at net.minecraft.src.ModLoader.init(ModLoader.java:733)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:162)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:42)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:314)
at net.minecraft.client.Minecraft.run(Minecraft.java:613)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 76426d1e ----------
is the full error report...
Something wrong with your crafting recipes, but I would recommend that you fix
vogPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Vog7.png");
ModLoader.AddRecipe(new ItemStack(vogPickaxe, 1), new Object[]{
For every one of your tools you override the vogPickaxe texture.
Also for every crafting recipe you get back a vogPickaxe.
Hi Robbie,
I've only follow your tutorials earlier today to make ores (the first 2 episode)
I done everything like your's but both when i Recompile or run it in Eclipse (used your custom texture in eclispe trick)
it both have this error:
Mods loaded: 1
ModLoader 1.0.0
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 141ccf11 --------
Generated 1/6/12 3:43 PM
Minecraft: Minecraft 1.0.0
OS: Windows Vista (x86) version 6.0
Java: 1.6.0_29, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce 9300M GS/PCI/SSE2 version 3.3.0, NVIDIA Corporation
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:265)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1214)
at net.minecraft.src.ModLoader.init(ModLoader.java:733)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:162)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:42)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:314)
at net.minecraft.client.Minecraft.run(Minecraft.java:613)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 700
at net.minecraft.src.Block.<init>(Block.java:209)
at net.minecraft.src.Block.<init>(Block.java:238)
at net.minecraft.src.BlockLennium.<init>(BlockLennium.java:9)
at net.minecraft.src.mod_lennium.<clinit>(mod_lennium.java:7)
... 15 more
--- END ERROR REPORT 8b373abd ----------
Please help me. I want to be like you with my mod! And btw I can be your Solar Redstone artist if you need.
Hi Robbie,
I've only follow your tutorials earlier today to make ores (the first 2 episode)
I done everything like your's but both when i Recompile or run it in Eclipse (used your custom texture in eclispe trick)
it both have this error:
Mods loaded: 1
ModLoader 1.0.0
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 141ccf11 --------
Generated 1/6/12 3:43 PM
Minecraft: Minecraft 1.0.0
OS: Windows Vista (x86) version 6.0
Java: 1.6.0_29, Sun Microsystems Inc.
VM: Java HotSpot™ Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce 9300M GS/PCI/SSE2 version 3.3.0, NVIDIA Corporation
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:265)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1214)
at net.minecraft.src.ModLoader.init(ModLoader.java:733)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:162)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:42)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:314)
at net.minecraft.client.Minecraft.run(Minecraft.java:613)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 700
at net.minecraft.src.Block.<init>(Block.java:209)
at net.minecraft.src.Block.<init>(Block.java:238)
at net.minecraft.src.BlockLennium.<init>(BlockLennium.java:9)
at net.minecraft.src.mod_lennium.<clinit>(mod_lennium.java:7)
... 15 more
--- END ERROR REPORT 8b373abd ----------
Please help me. I want to be like you with my mod! And btw I can be your Solar Redstone artist if you need.
Code please? Even if you have followed exactly, you may have missed something in your code. Also, spoiler tags pls.
public void GenerateSurface(World world, Random random, int baseX, int baseZ)
{
for(int x = 0; x < 7; x++)
{
int Xcoord = baseX + random.nextInt(14);
int Ycoord = random.nextInt(35);
int Zcoord = baseZ + random.nextInt(18);
(new WorldGenMinable(Blocksilver.blockID, 8)).generate(world, random, Xcoord, Ycoord, Zcoord);
}
}
Error
== MCP v5.0 ==
> Recompiling client...
javac.exe -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.j
ar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath s
rc/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/mine
craft\net\minecraft\src\*.java conf/patches/*.java failed.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_paints.java:208: non-static variable blockID
cannot be referenced from a static context
(new WorldGenMinable(Blocksilver.blockID, 8)).generate(world, random, Xcoord, Yc
oord, Zcoord);
^
1 error
==================
> Done in 26.10 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
public void GenerateSurface(World world, Random random, int baseX, int baseZ)
{
for(int x = 0; x < 7; x++)
{
int Xcoord = baseX + random.nextInt(14);
int Ycoord = random.nextInt(35);
int Zcoord = baseZ + random.nextInt(18);
(new WorldGenMinable(Blocksilver.blockID, 8)).generate(world, random, Xcoord, Ycoord, Zcoord);
}
}
Error
== MCP v5.0 ==
> Recompiling client...
javac.exe -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.j
ar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath s
rc/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/mine
craft\net\minecraft\src\*.java conf/patches/*.java failed.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_paints.java:208: non-static variable blockID
cannot be referenced from a static context
(new WorldGenMinable(Blocksilver.blockID, 8)).generate(world, random, Xcoord, Yc
oord, Zcoord);
^
1 error
==================
> Done in 26.10 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
1) Please put in spoiler tags
2) do you have this line:
public static final Block Blocksilver = new XXX(ID, 0).setBlockName(XXX)
where XXX is your class, and your ID is below 255?
Hey robbie! I know you are an amazing modder so i wanted to ask you this question. Ok so im making a hand held teleporter that teleports you to your spawn( for now atleast) when you right click, now ive been fiddling around with some different code like "OnItemRightClick" and ".getSpawnX();" and for Y and Z, but i can't seem to get it to work :sad.gif:. if you could tell me the code for it or what .java file to look in to get somthing for this to work i would be really happy! :smile.gif:
P.S Love the tuts, keep em up! Diamonds for you!
EDIT: also what do you type to use the spoiler in a post, just wanted to know incase i ever need it with error reports and such .
public void GenerateSurface(World world, Random random, int baseX, int baseZ)
{
for(int x = 0; x < 7; x++)
{
int Xcoord = baseX + random.nextInt(14);
int Ycoord = random.nextInt(35);
int Zcoord = baseZ + random.nextInt(18);
(new WorldGenMinable(Blocksilver.blockID, 8)).generate(world, random, Xcoord, Ycoord, Zcoord);
}
}
Error
== MCP v5.0 ==
> Recompiling client...
javac.exe -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.j
ar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath s
rc/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/mine
craft\net\minecraft\src\*.java conf/patches/*.java failed.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_paints.java:208: non-static variable blockID
cannot be referenced from a static context
(new WorldGenMinable(Blocksilver.blockID, 8)).generate(world, random, Xcoord, Yc
oord, Zcoord);
^
1 error
==================
> Done in 26.10 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
Make sure to put the "public static final" modifiers on your declaration.
Next, make sure that the 14 and 18 you have in that code is 16, since chunks are 16x16, you don't want ores spawning only on one side of the chunk, or if it does hit 18, it'll probably give you an error.
Hey robbie! I know you are an amazing modder so i wanted to ask you this question. Ok so im making a hand held teleporter that teleports you to your spawn( for now atleast) when you right click, now ive been fiddling around with some different code like "OnItemRightClick" and ".getSpawnX();" and for Y and Z, but i can't seem to get it to work :sad.gif:. if you could tell me the code for it or what .java file to look in to get somthing for this to work i would be really happy! :smile.gif:
P.S Love the tuts, keep em up! Diamonds for you!
EDIT: also what do you type to use the spoiler in a post, just wanted to know incase i ever need it with error reports and such .
package net.minecraft.src;
import java.util.Map;
import java.util.Random;
public class mod_paints extends BaseMod{
public static final Block silverore = new Blocksilver(247,0).setHardness(3F).setBlockName("Silver Ore");
public mod_paints(){
ModLoader.RegisterBlock(silverore);
ModLoader.AddName(silverore, "Silver Ore");
silverore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/WW2/SilverOreBlock.png");
}
public void GenerateSurface(World world, Random random, int baseX, int baseZ)
{
for(int x = 0; x < 7; x++)
{
int Xcoord = baseX + random.nextInt(16);
int Ycoord = random.nextInt(36);
int Zcoord = baseZ + random.nextInt(16);
(new WorldGenMinable(Blocksilver.blockID, 8)).generate(world, random, Xcoord, Ycoord, Zcoord);
}
}
public void load(){}
public String getVersion()
{
return "1.0.1";
}
}
I just don't know how to define what EnumAction.assassin is, or if that's even what I should be doing.
//I'm trying to make it so if sneaking, you can right click for a one hit kill
Yeah I have no clue how to do this off the top of my head :/ I'd have to play around with this.
Ok, thanks anyways. I just keep messing around with it and see if I can figure something out.
Can you please make a tutorial, on how to add your own sound to Minecraft (with AudioMod). I've searched on the Internet but I can't find it. I even tryied myself but after installed ModLoader and AudioMod and I decompile it gives me 42 errors about the AudioMod classes.
I would really appreciate if you could make only a fast one and just explain the important thing to add sounds
Please answer this post.
Ty in advance.
//samlancashire.com/quiz/creeper" target="" data-ensure-absolute>" width="" height="" alt="" />
You can't decompile Audio Mod inside of eclipse, it's something you add after reobfuscating.
how do i make a block that will be something like the web so u can walk through itgot it to work
PLZZZZ help! If i must, i will add the coding ive done...
Ok ty, good to know :biggrin.gif:
But could you still make a tutorial on how to add your own sounds?
Ty in advance
Oh and thank you for the reply :smile.gif:
i cant figure out what the problem is... It says i have no errors on eclipse, but this comes up then blah...
ModLoader 1.0.0
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 141ccf11 --------
Generated 1/5/12 7:46 PM
Minecraft: Minecraft 1.0.0
OS: Windows 7 (x86) version 6.1
Java: 1.6.0_20, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: AMD Radeon(TM) HD 6520G version 4.1.10600 Compatibility Profile Context, ATI Technologies Inc.
java.lang.StringIndexOutOfBoundsException: String index out of range: 8
at java.lang.String.charAt(Unknown Source)
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:300)
at net.minecraft.src.ModLoader.AddRecipe(ModLoader.java:372)
at net.minecraft.src.mod_Vog.<init>(mod_Vog.java:52)
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:265)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1214)
at net.minecraft.src.ModLoader.init(ModLoader.java:733)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:162)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:42)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:314)
at net.minecraft.client.Minecraft.run(Minecraft.java:613)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 76426d1e ----------
Something wrong with your crafting recipes, but I would recommend that you fix
For every one of your tools you override the vogPickaxe texture.
Also for every crafting recipe you get back a vogPickaxe.
I've only follow your tutorials earlier today to make ores (the first 2 episode)
I done everything like your's but both when i Recompile or run it in Eclipse (used your custom texture in eclispe trick)
it both have this error:
Mods loaded: 1
ModLoader 1.0.0
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 141ccf11 --------
Generated 1/6/12 3:43 PM
Minecraft: Minecraft 1.0.0
OS: Windows Vista (x86) version 6.0
Java: 1.6.0_29, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce 9300M GS/PCI/SSE2 version 3.3.0, NVIDIA Corporation
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:265)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1214)
at net.minecraft.src.ModLoader.init(ModLoader.java:733)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:162)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:42)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:314)
at net.minecraft.client.Minecraft.run(Minecraft.java:613)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 700
at net.minecraft.src.Block.<init>(Block.java:209)
at net.minecraft.src.Block.<init>(Block.java:238)
at net.minecraft.src.BlockLennium.<init>(BlockLennium.java:9)
at net.minecraft.src.mod_lennium.<clinit>(mod_lennium.java:7)
... 15 more
--- END ERROR REPORT 8b373abd ----------
Please help me. I want to be like you with my mod! And btw I can be your Solar Redstone artist if you need.
Code please? Even if you have followed exactly, you may have missed something in your code. Also, spoiler tags pls.
Error
1) Please put in spoiler tags
2) do you have this line:
where XXX is your class, and your ID is below 255?
P.S Love the tuts, keep em up! Diamonds for you!
EDIT: also what do you type to use the spoiler in a post, just wanted to know incase i ever need it with error reports and such .
Make sure to put the "public static final" modifiers on your declaration.
Next, make sure that the 14 and 18 you have in that code is 16, since chunks are 16x16, you don't want ores spawning only on one side of the chunk, or if it does hit 18, it'll probably give you an error.
*major facepalm* omg >.< thank you for pointing that out, i was being a total idiot
and now it works, so thank you again!
i do have the public static part and my block id is 247