No MCP error report, no help.
Hello there. I am here to teach you how to mod using, ModLoader, and Maybe in some other tutorials later on I'll teach you how to code things with ModOptionsAPI and GUIAPI, or Audiomod, or ModLoaderMp, or TurboModelThingy, or ShockAhPI, or ItemSpriteAPI, or ScotTools.
Adding New Recipes And Smelting For The Furnace
Doing this with ModLoader is EASY PEASY!
Things Needed:
the ability to decompile ModLoader (see above tutorial in OP, but just add ModLoader into your minecraft.jar in your jars folder. DO NOT DELETE THE META-INF
MCP (Minecraft Coder Pack)
Eclipse or Notepad++ (I suggest Notepad++)
To start, Open Eclipse or Notepad++ (FOR THESE TUTORIALS I WILL BE USING NOTEPAD++)
and add this to the start of your code:
package net.minecraft.src;
public class mod_YOURMODSNAMEHERE extends BaseMod
{
If something extends BaseMod, that means ModLoader will count it as a mod (or something like that)
Next, under what you just put, add:
public mod_YOURMODSNAMEHERE()
{
This is where you put what your mod does. Under that, add this to make a crafting recipe:
ModLoader.AddRecipe(new ItemStack(Block.stone, 64), new Object[]{
"X", Character.valueOf('X'), Block.dirt
});
what this crafting recipe does, is when you put dirt on a crafting table, you get stone.
simple huh? Here is how the table works:
that would mean that you would put dirt all around the crafting table and sand in the middle, and it will give you 64 stone. The first "XXX" is the TOP row of the crafting table. the "XAX" is the middle row, and the last "XXX" is the bottom row of the crafting table.
Now, to add a Smelting Recipe, do this:
ModLoader.AddSmelting(Block.dirt, new ItemStack(Block.stone, 1));
this means that if you smelt dirt, you get 1 stone.
FINALLY ADD THIS TO THE BOTTOM OR YOU WILL GET ERRORS:
}
public String Version()
{
return "1.7.3 V1";
}
}
the public String Version. you can put whatever where it says 1.7.3 V1. That is what will show up on crash reports.
Next, just save this in MCP/src/minecraft/net/minecraft/src
and go to your MCP folder and click recompile.bat IF YOU GET ERRORS THAN POST THEM HERE. If you don't than click Reobfustocate.bat and look in your reobf folder for your class files to put in your minecraft.jar!
Hope this helps, and good day!
Rollback Post to RevisionRollBack
Sometimes I dress up as Slender Man and sneak up on people at night.
Adding New Items Using ModLoader
this is pretty easy.
what you need:
MCP
Eclipse or Notepad++
To have completed my last tutorial
OK so you want to add an item. COOL! But to add a new item, you gotta think: whats its use? For now we are going to make a mod that makes a new item to craft stuff with.
If you are not creating a new mod to this, and are just adding to the mod_YOURMODSNAMEHERE from the last tutorial, skip this part. If you are creating a new mod for this, add this to the top of your code:
package net.minecraft.src;
public class mod_YOURMODSNAMEHERE extends BaseMod
{
and under it, add this:
public static final Item YOURITEMNAMEHERE = new Item(116).setItemName("YOURITEMNAMEHERE");
this just makes the item, an item. now the (116) is the Item ID. change it to whatever.
add this under that:
public mod_YOURMODSNAMEHERE()
{
very good. now INSIDE THAT ADD THIS:
ModLoader.AddName(YOURITEMNAMEHERE, "Your In-game Item Name Here");
replace the Your In-game Item Name Here with what you want the name of the item to be when you hover over it.
replace yourusernamehere with what your username is. replace YOURITEMNAMEHERE with what you name the texture for your item.
Now, most people say you have to make an ItemYOURITEMNAMEHERE, but you don't unless you are having a stack size that is not 64.
now add this to the bottom:
}
public String Version()
{
return "1.7.3 V1";
}
}
than save it where I told you to save it in the last tutorial. Then, run the recompile.bat and reobfustocate.bat and get your class files form the reobf folder!
Rollback Post to RevisionRollBack
Sometimes I dress up as Slender Man and sneak up on people at night.
How to add new tools and Armor
Want to make new tools and armor but don't know how?
That sucks. Unless you read this tutorial, your screwed.
So you need:
MCP
Eclipse or Notepad++
To have completed the tutorials above
Lets go ahead and look at our code that we have so far (all the tutorials combined)
package net.minecraft.src;
public class mod_YOURMODSNAMEHERE extends BaseMod
{
public static final Item YOURITEMNAMEHERE = new Item(116).setItemName("YOURITEMNAMEHERE");
public mod_YOURMODSNAMEHERE()
{
ModLoader.AddName(YOURITEMNAMEHERE, "Your In-game Item Name Here");
//there is a // on the next line so that it counts as text, not a part of the code. The mod //will not work if you don't have a texture. so if you don't have a texture, than you need to //have this on
//YOURITEMNAMEHERE.iconIndex = ModLoader.addOverride("/gui/items.png", "/yourusernamehere/YOURITEMNAMEHERE.png");
ModLoader.AddRecipe(new ItemStack(Block.stone, 64), new Object[]{
"X", Character.valueOf('X'), Block.dirt
});
ModLoader.AddRecipe(new ItemStack Block.stone, 64), new Object[]{
"XXX", "XAX", "XXX", Character.valueOf('X'), Block.dirt, Character.valueOf('A'), Block.sand
ModLoader.AddSmelting(dirt.blockID, new ItemStack(stone.BlockID, 1));
}
public String Version()
{
return "1.7.3 V1";
}
}
Its not that cool. How about we add Lapis Lazuli armor and tools?
Yeah. great idea.
I know right?
back on topic.
Make a new file. Lets call it mod_YOURARMORSETNAMEHERE
add this to the top:
package net.minecraft.src;
import java.util.Random;
//ALSO, YOU MUST PUT THE ARMOR SKINS IN THE FOLDER "armor" IN MINECRAFT.JAR!
public class mod_YOURARMORSETNAMEHERE extends BaseMod
{
public mod_YOURARMORSETNAMEHERE()
{
Good. Now under it, add this:
//REGISTERING THE ARMOR
ModLoader.AddArmor("YOURARMORSETNAMEHERE");
//NAMES OF THE ARMOR
ModLoader.AddName(YOURARMORNAMEHEREHelmet, "Your Armor NameHere Helmet");
ModLoader.AddName(YOURARMORNAMEHEREPlate, "Your Armor NameHere Chestplate");
ModLoader.AddName(YOURARMORNAMEHERELeggings, "Your armor name here Leggings");
ModLoader.AddName(YOURARMORNAMEHEREBoots, "Your armor name here Boots");
//THIS IS THE INVENTORY ICONS OF THE ARMOR, NOT THE ACTUAL ARMOR ON YOUR CHAR
//YOURARMORNAMEHEREHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/yourusernamehere/YOURARMORNAMEHEREhelmet.png");
//YOURARMORNAMEHEREPlate.iconIndex = ModLoader.addOverride("/gui/items.png", "/yourusernamehere/YOURARMORNAMEHEREbody.png");
//YOURARMORNAMEHERELeggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/yourusernamehere/YOURARMORNAMEHERElegs.png");
//YOURARMORNAMEHEREBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/yourusernamehere/YOURARMORNAMEHEREboots.png");
NOW REMEMBER: YOU NEED TO AHVE TEXTURES FOR THE STUFF OR ELSE IT WILL CRASH YOUR GAME. Once you made textures, take out the // from the .iconIndex stuff.
got that done? good. now add:
//RECIPES, CHANGE Item.dyePowder TO WHAT THE ARMOR IS CRAFTED WITH
ModLoader.AddRecipe(new ItemStack(YOURARMORNAMEHEREHelmet, 1), new Object[]{
"XXX", "X X", Character.valueOf('X'), Item.dyePowder
});
ModLoader.AddRecipe(new ItemStack(YOURARMORNAMEHEREPlate, 1), new Object[]{
"XXX", "XXX", "X X", Character.valueOf('X'), Item.dyePowder
});
ModLoader.AddRecipe(new ItemStack(YOURARMORNAMEHERELeggings, 1), new Object[]{
"XXX", "X X", "X X", Character.valueOf('X'), Item.dyePowder
});
ModLoader.AddRecipe(new ItemStack(YOURARMORNAMEHEREBoots, 1), new Object[]{
"X X", "X X", Character.valueOf('X'), Item.dyePowder
});
}
YOUR DOING GREAT! Now add this:
public String Version()
{
return "1.7.3";
}
//REMEMBER TO CHANGE THESE NUMBER VALUES
public static final Item YOURARMORNAMEHEREHelmet = (new ItemArmor(2612, 5, 5, 0)).setItemName("YOURARMORNAMEHERE Helmet");
public static final Item YOURARMORNAMEHEREPlate = (new ItemArmor(2613, 5, 5, 1)).setItemName("YOURARMORNAMEHERE Plate");
public static final Item YOURARMORNAMEHERELeggings = (new ItemArmor(2614, 5, 5, 2)).setItemName("YOURARMORNAMEHERE Leggings");
public static final Item YOURARMORNAMEHEREBoots = (new ItemArmor(2615, 5, 5, 3)).setItemName("YOURARMORNAMEHERE Boots");
Well I'll be! You just made your own armor set. But... WHAT ABOUT TOOLS? Lapis Lazuli tools!
well if you wanna do that, just make a whole new file and then add this:
package net.minecraft.src;
public enum mod_NightmareToolMaterial
{
WOOD("WOOD", 0, 0, 59, 2.0F, 0),
STONE("STONE", 1, 1, 131, 4F, 1),
IRON("IRON", 2, 2, 250, 6F, 2),
EMERALD("EMERALD", 3, 3, 1561, 8F, 3),
GOLD("GOLD", 4, 0, 32, 12F, 0),
//ADD YOUR TOOL TYPE HERE (ex: LAPIS can go here));
/*
public static EnumToolMaterial[] values()
{
return (EnumToolMaterial[])field_21209_j.clone();
}
public static EnumToolMaterial valueOf(String s)
{
return (EnumToolMaterial)Enum.valueOf(net.minecraft.src.EnumToolMaterial.class, s);
}
*/
private mod_NightmareToolMaterial(String s, int i, int j, int k, float f, int l)
{
// super(s, i);
harvestLevel = j;
maxUses = k;
efficiencyOnProperMaterial = f;
damageVsEntity = l;
}
public int getMaxUses()
{
return maxUses;
}
public float getEfficiencyOnProperMaterial()
{
return efficiencyOnProperMaterial;
}
public int getDamageVsEntity()
{
return damageVsEntity;
}
public int getHarvestLevel()
{
return harvestLevel;
}
/*
public static final EnumToolMaterial WOOD;
public static final EnumToolMaterial STONE;
public static final EnumToolMaterial IRON;
public static final EnumToolMaterial EMERALD;
public static final EnumToolMaterial GOLD;
*/
private final int harvestLevel;
private final int maxUses;
private final float efficiencyOnProperMaterial;
private final int damageVsEntity;
static
{
/*
WOOD = new EnumToolMaterial("WOOD", 0, 0, 59, 2.0F, 0);
STONE = new EnumToolMaterial("STONE", 1, 1, 131, 4F, 1);
IRON = new EnumToolMaterial("IRON", 2, 2, 250, 6F, 2);
EMERALD = new EnumToolMaterial("EMERALD", 3, 3, 1561, 8F, 3);
GOLD = new EnumToolMaterial("GOLD", 4, 0, 32, 12F, 0);
*/
}
}
That was a snippet for a mod my team and I are making. Now to add your own tool material, just add this in where it says //add your tool type here
LAPIS("LAPIS", 4, 4, 2672, 9F, 4);
DON'T FORGET THE ; OR IT WONT WORK.
Now we have created our own tool material WITHOUT editing EnumToolMaterial!
You want me to get on with the tutorial instead of blathering on?
AHAHAHAHAHAHAHAHAHAHAHAHAHA
OK FINE! LETS FINISH THIS!
go into your mod_YOURMODNAMEHERE
and add these in where the other public Static final stuff is:
public static final Item HopePickaxe = (new mod_HopePickaxe(ModLoader.getUniqueEntityId(), mod_NightmareToolMaterial.HOPE)).setItemName("HopePickaxe");
public static final Item HopeShovel = (new mod_NightmareSpade(ModLoader.getUniqueEntityId(), mod_NightmareToolMaterial.HOPE)).setItemName("HopeShovel");
public static final Item HopeAxe = (new mod_NightmareAxe(ModLoader.getUniqueEntityId(), mod_NightmareToolMaterial.HOPE)).setItemName("HopeAxe");
public static final Item HopeHoe = (new mod_NightmareHoe(ModLoader.getUniqueEntityId(), mod_NightmareToolMaterial.HOPE)).setItemName("HopeHoe");
public static final Item HopeSword = (new mod_NightmareSword(ModLoader.getUniqueEntityId(), mod_NightmareToolMaterial.HOPE)).setItemName("HopeSword");
replace the mod_NightmareToolMaterial.HOPE with mod_WHATEVERYOUNAMEDTHETOOLMATERIALTHING.LAPIS
replace everything that says Hope with Lapis, and now here are some other files you need to make to get this thing rolling:
In the code above, you see the mod_NightmareAxe, mod_NightmareHoe, mod_NightmareSword etc?
here are those files:
mod_NightmareAxe:
package net.minecraft.src;
public class mod_NightmareAxe extends mod_NightmareTool
{
protected mod_NightmareAxe(int i, mod_NightmareToolMaterial mod_nightmaretoolmaterial)
{
super(i, 3, mod_nightmaretoolmaterial, blocksEffectiveAgainst);
}
private static Block blocksEffectiveAgainst[];
static
{
blocksEffectiveAgainst = (new Block[] {
Block.planks, Block.bookShelf, Block.wood, Block.chest, mod_Nightmare.dispairLog, mod_Nightmare.prideLog
});
}
}
mod_NightmareHoe:
package net.minecraft.src;
public class mod_NightmareHoe extends Item
{
public mod_NightmareHoe(int i, mod_NightmareToolMaterial mod_nightmaretoolmaterial)
{
super(i);
maxStackSize = 1;
setMaxDamage(mod_nightmaretoolmaterial.getMaxUses());
}
public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l)
{
int i1 = world.getBlockId(i, j, k);
int j1 = world.getBlockId(i, j + 1, k);
if(l != 0 && j1 == 0 && i1 == Block.grass.blockID || i1 == Block.dirt.blockID)
{
Block block = Block.tilledField;
world.playSoundEffect((float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, block.stepSound.func_1145_d(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
if(world.multiplayerWorld)
{
return true;
} else
{
world.setBlockWithNotify(i, j, k, block.blockID);
itemstack.damageItem(1, entityplayer);
return true;
}
} else
{
return false;
}
}
public boolean isFull3D()
{
return true;
}
}
mod_NigthmareSword:
package net.minecraft.src;
public class mod_NightmareSword extends Item
{
public mod_NightmareSword(int i, mod_NightmareToolMaterial mod_nightmaretoolmaterial)
{
super(i);
maxStackSize = 1;
setMaxDamage(mod_nightmaretoolmaterial.getMaxUses());
weaponDamage = 4 + mod_nightmaretoolmaterial.getDamageVsEntity() * 2;
}
public float getStrVsBlock(ItemStack itemstack, Block block)
{
return block.blockID != Block.web.blockID ? 1.5F : 15F;
}
public boolean hitEntity(ItemStack itemstack, EntityLiving entityliving, EntityLiving entityliving1)
{
itemstack.damageItem(1, entityliving1);
return true;
}
public boolean onBlockDestroyed(ItemStack itemstack, int i, int j, int k, int l, EntityLiving entityliving)
{
itemstack.damageItem(2, entityliving);
return true;
}
public int getDamageVsEntity(Entity entity)
{
return weaponDamage;
}
public boolean isFull3D()
{
return true;
}
public boolean canHarvestBlock(Block block)
{
return block.blockID == Block.web.blockID;
}
private int weaponDamage;
}
mod_NigthmareSpade:
package net.minecraft.src;
public class mod_NightmareSpade extends mod_NightmareTool
{
public mod_NightmareSpade(int i, mod_NightmareToolMaterial mod_nightmaretoolmaterial)
{
super(i, 1, mod_nightmaretoolmaterial, blocksEffectiveAgainst);
}
public boolean canHarvestBlock(Block block)
{
if(block == Block.snow)
{
return true;
}
return block == Block.blockSnow;
}
private static Block blocksEffectiveAgainst[];
static
{
blocksEffectiveAgainst = (new Block[] {
Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, mod_Nightmare.soulDirt
});
}
}
ive tried many times but im having issues with recompiling think you could explain that a bit better like do i have to save the txt file as something with a diff extenstion or what? and i keep getting an illegal chracters error the character # even though other recipies use it
Rollback Post to RevisionRollBack
Tanki1 if you see this PLEASE PLEASE send me a message saying that you did i need to tell you something important
src\minecraft\net\minecrafsrTestMod.java:3: class mod_Test is public, should be declared in a file named mod_Test.java
public class mod_Test extends BaseMod
^
----------------------------------------------------------------------
src\minecraft\net\minecraft\src\TestMod.java:3: cannot find symbol
symbol: class BaseMod
public Class mod_Test extends BaseMod
^
---------------------------------------------------------------------------
src\minecraft\net\minecraft\src\TestMod.java:7: cannot find symbol
symbol : variable dirt
location: class net.minecraft.src.mod_Test
Modoader.AddSmelting(dirt.blockID, new ItemStack(stone.blockID, 1));
^
----------------------------------------------------------------------------
src\minecraft\net\minecraft\src\TestMod.java:7: cannot find symbol
symbol : variable stone
Location: class net.minecraft.src.mod_Test
ModLoader.AddSmelting(dirt.blockID, new ItemStack(stone.blockID, 1));
^
------------------------------------------------------------------------------
src\minecraft\neminecraft\src\TestMod.java:7: cannot find symbol
symbol : variable ModLoader
Location: class net.minecraft.src.mod_Test
ModLoader.AddSmelting(dirt.blockID, new ItemStack(stone.blockID, 1));
^
src\minecraft\net\minecraft\src\mod_Test.java:7: cannot find symbol
symbol : variable Dirt
Location: class net.minecraft.src.mod_Test
ModLoader.AddSmelting(Dirt.blockID, new ItemStack(Stone.blockID, 1));
^
---------------------------------------------------------------------------
src\minecraft\net\minecraft\src\mod_Test.java:7: cannot find symbol
symbol : variable Stone
Location: class net.minecraft.src.mod_Test
ModLoader.AddSmelting(Dirt.blockID, new ItemStack(Stone.blockID, 1));
^
After I found this page, I didn't think to make my own ToolMaterials file so I wouldn't be editing a base class.
Well, after I did, in the fashion you did it, I got 10 errors (10 tools, 2 different materials I added)
That was easy to fix. I hadn't changed the tool code from EnumToolMaterial.WHATEVER to mod_ToolMaterial.WHATEVER.
After fixing that, I got 10 more errors. I'm not sure what to do about these :tongue.gif:
It's pretty much saying I can't use the ItemSword or ItemSpade if I'm going to have my own ToolMaterial class. Do I have to make item files for all the tools?
EDIT: Nevermind. Didn't read what was below that. Guess I do then :tongue.gif:
Ignore all the crossed out stuff. Is there a way to throw the different mod_ModPick and mod_ModSpade and the others in with the mod_ModTool file? All these separate class files are getting annoying :tongue.gif:
Hello there. I am here to teach you how to mod using, ModLoader, and Maybe in some other tutorials later on I'll teach you how to code things with ModOptionsAPI and GUIAPI, or Audiomod, or ModLoaderMp, or TurboModelThingy, or ShockAhPI, or ItemSpriteAPI, or ScotTools.
For now, lets....
Set up MCP
1) download MCP from: http://mcp.ocean-labs.de/index.php/MCP_Releases and BE SURE TO GET THE LATEST VERSION!
2) extract the contents of the File you just downloaded into a folder called MCP.
3)go into the 'jars' folder of your MCP folder
4) Press windows button+r (this opens up the run.exe)
5) type in %AppData% press enter, and double click your .minecraft folder
6) COPY PASTE YOUR BIN FOLDER FORM .minecraft INTO YOUR MCP FOLDERS jars FOLDER
7) Make sure that IN YOUR BIN YOU ONLY HAVE:
natives (folder)
jinput
lwjgl
lwjgl_util
minecraft
8) go out of the jars folder and click Decompile.bat (or for macs use Decompile.sh
9) navigate your way to:
MCP/src/minecraft/net/minecraft/src
10) Note the fact that this is where you save all your Java files for a mod.
Doing this with ModLoader is EASY PEASY!
Things Needed:
the ability to decompile ModLoader (see above tutorial in OP, but just add ModLoader into your minecraft.jar in your jars folder. DO NOT DELETE THE META-INF
MCP (Minecraft Coder Pack)
Eclipse or Notepad++ (I suggest Notepad++)
To start, Open Eclipse or Notepad++ (FOR THESE TUTORIALS I WILL BE USING NOTEPAD++)
and add this to the start of your code:
If something extends BaseMod, that means ModLoader will count it as a mod (or something like that)
Next, under what you just put, add:
This is where you put what your mod does. Under that, add this to make a crafting recipe:
what this crafting recipe does, is when you put dirt on a crafting table, you get stone.
simple huh? Here is how the table works:
if you go:
that would mean that you would put dirt all around the crafting table and sand in the middle, and it will give you 64 stone. The first "XXX" is the TOP row of the crafting table. the "XAX" is the middle row, and the last "XXX" is the bottom row of the crafting table.
Now, to add a Smelting Recipe, do this:
this means that if you smelt dirt, you get 1 stone.
FINALLY ADD THIS TO THE BOTTOM OR YOU WILL GET ERRORS:
the public String Version. you can put whatever where it says 1.7.3 V1. That is what will show up on crash reports.
Next, just save this in MCP/src/minecraft/net/minecraft/src
and go to your MCP folder and click recompile.bat IF YOU GET ERRORS THAN POST THEM HERE. If you don't than click Reobfustocate.bat and look in your reobf folder for your class files to put in your minecraft.jar!
Hope this helps, and good day!
this is pretty easy.
what you need:
MCP
Eclipse or Notepad++
To have completed my last tutorial
OK so you want to add an item. COOL! But to add a new item, you gotta think: whats its use? For now we are going to make a mod that makes a new item to craft stuff with.
If you are not creating a new mod to this, and are just adding to the mod_YOURMODSNAMEHERE from the last tutorial, skip this part. If you are creating a new mod for this, add this to the top of your code:
and under it, add this:
this just makes the item, an item. now the (116) is the Item ID. change it to whatever.
add this under that:
very good. now INSIDE THAT ADD THIS:
replace the Your In-game Item Name Here with what you want the name of the item to be when you hover over it.
Now add this:
replace yourusernamehere with what your username is. replace YOURITEMNAMEHERE with what you name the texture for your item.
Now, most people say you have to make an ItemYOURITEMNAMEHERE, but you don't unless you are having a stack size that is not 64.
now add this to the bottom:
than save it where I told you to save it in the last tutorial. Then, run the recompile.bat and reobfustocate.bat and get your class files form the reobf folder!
Want to make new tools and armor but don't know how?
That sucks. Unless you read this tutorial, your screwed.
So you need:
MCP
Eclipse or Notepad++
To have completed the tutorials above
Lets go ahead and look at our code that we have so far (all the tutorials combined)
Its not that cool. How about we add Lapis Lazuli armor and tools?
Yeah. great idea.
I know right?
back on topic.
Make a new file. Lets call it mod_YOURARMORSETNAMEHERE
add this to the top:
Good. Now under it, add this:
NOW REMEMBER: YOU NEED TO AHVE TEXTURES FOR THE STUFF OR ELSE IT WILL CRASH YOUR GAME. Once you made textures, take out the // from the .iconIndex stuff.
got that done? good. now add:
YOUR DOING GREAT! Now add this:
Well I'll be! You just made your own armor set. But... WHAT ABOUT TOOLS? Lapis Lazuli tools!
well if you wanna do that, just make a whole new file and then add this:
That was a snippet for a mod my team and I are making. Now to add your own tool material, just add this in where it says //add your tool type here
DON'T FORGET THE ; OR IT WONT WORK.
Now we have created our own tool material WITHOUT editing EnumToolMaterial!
You want me to get on with the tutorial instead of blathering on?
AHAHAHAHAHAHAHAHAHAHAHAHAHA
OK FINE! LETS FINISH THIS!
go into your mod_YOURMODNAMEHERE
and add these in where the other public Static final stuff is:
replace the mod_NightmareToolMaterial.HOPE with mod_WHATEVERYOUNAMEDTHETOOLMATERIALTHING.LAPIS
replace everything that says Hope with Lapis, and now here are some other files you need to make to get this thing rolling:
In the code above, you see the mod_NightmareAxe, mod_NightmareHoe, mod_NightmareSword etc?
here are those files:
mod_NightmareAxe:
mod_NightmareHoe:
mod_NigthmareSword:
mod_NigthmareSpade:
and finally, the mod_NightmarePickaxe:
Now IN ALL OF THOSE files Replace Nigthmare with Lapis. Notice how all of these things extend to the mod_NightmareTool? Lets look at that shall we?
change anything that says Nightmare into Lapis.
Notice how the files use a blocksEffectiveAgainst?
that shows what it can break. If it is not there, you won't get items back or it will break slower.
Oh I almost forgot. Add this to the mod_YOURMODSNAMEHERE under the public mod_YOURMODSNAMEHERE:
change whatever says Hope into Lapis.
than add recipes (see the other tuts on this page)
and then...
CELEBRATE!
YOU MADE TOOLS!
F*CK YEAH!
[/end tutorial]
reserve for tuts.
XD I was juwst looking at your tutorials :tongue.gif:
I replied to your thread aswell.
Tanki1 if you see this PLEASE PLEASE send me a message saying that you did i need to tell you something important
Tanki1 if you see this PLEASE PLEASE send me a message saying that you did i need to tell you something important
src\minecraft\net\minecraft\src\TestMod.java:5: invalid method declaration; return type required
public mod_Test()
^
end
heres my code
start
package net.minecraft.src;
public class mod_Testt extends BaseMod
{
public mod_Test()
{
ModLoader.AddSmelting(dirt.blockID, new ItemStack(stone.blockID, 1));
}
public String Version()
{
return "1.7.3 V1";
}
}
end
Tanki1 if you see this PLEASE PLEASE send me a message saying that you did i need to tell you something important
Tanki1 if you see this PLEASE PLEASE send me a message saying that you did i need to tell you something important
src\minecraft\net\minecrafsrTestMod.java:3: class mod_Test is public, should be declared in a file named mod_Test.java
public class mod_Test extends BaseMod
^
----------------------------------------------------------------------
src\minecraft\net\minecraft\src\TestMod.java:3: cannot find symbol
symbol: class BaseMod
public Class mod_Test extends BaseMod
^
---------------------------------------------------------------------------
src\minecraft\net\minecraft\src\TestMod.java:7: cannot find symbol
symbol : variable dirt
location: class net.minecraft.src.mod_Test
Modoader.AddSmelting(dirt.blockID, new ItemStack(stone.blockID, 1));
^
----------------------------------------------------------------------------
src\minecraft\net\minecraft\src\TestMod.java:7: cannot find symbol
symbol : variable stone
Location: class net.minecraft.src.mod_Test
ModLoader.AddSmelting(dirt.blockID, new ItemStack(stone.blockID, 1));
^
------------------------------------------------------------------------------
src\minecraft\neminecraft\src\TestMod.java:7: cannot find symbol
symbol : variable ModLoader
Location: class net.minecraft.src.mod_Test
ModLoader.AddSmelting(dirt.blockID, new ItemStack(stone.blockID, 1));
^
-----------------------------------------------------------------------------
is it cause i dont have mod loader installed and it needs caps?
Tanki1 if you see this PLEASE PLEASE send me a message saying that you did i need to tell you something important
src\minecraft\net\minecraft\src\TestMod.java:5: invalid method declaration; return rtpe required
public mod_Test()
^
--------------------------------------------------------------------------------------------------
last error please reply ASAP
Tanki1 if you see this PLEASE PLEASE send me a message saying that you did i need to tell you something important
src\minecraft\net\minecraft\src\mod_Test.java:7: cannot find symbol
symbol : variable Dirt
Location: class net.minecraft.src.mod_Test
ModLoader.AddSmelting(Dirt.blockID, new ItemStack(Stone.blockID, 1));
^
---------------------------------------------------------------------------
src\minecraft\net\minecraft\src\mod_Test.java:7: cannot find symbol
symbol : variable Stone
Location: class net.minecraft.src.mod_Test
ModLoader.AddSmelting(Dirt.blockID, new ItemStack(Stone.blockID, 1));
^
---------------------------------------------------------------------------
Tanki1 if you see this PLEASE PLEASE send me a message saying that you did i need to tell you something important
Can I see your mod_Test file?
Also you save as a .java file, not a .txt file.
also to Mr Borris:
Instead of doing dirt.BlockID try Block.dirt and Block.stone.
EDIT:
Do what I told borris to do.
Make sure you have modloader and just modloader in your minecraft.jar
src\minecraft\net\minecraft\src\TestMod.java:3: '{' expected
class mod_Test is public
^
=------------------------------------------------------------------=
src\minecraft\net\minecraft\src\TestMod.java:5: repeated modifier
public class mod Test extends BaseMod
^
=-----------------------------------------------------------------=
src\minecraft\net\minecraft\src\TestMod.java:17: reached end of file while parsing
}->
^
=-----------------------------------------------------------------=
heres my code
---------------------------------------------------------------------
package net.minecraft.src;
public class mod_Testt extends BaseMod
{
public mod_Test()
{
ModLoader.AddSmelting(dirt.blockID, new ItemStack(stone.blockID, 1));
}
public String Version()
{
return "1.7.3 V1";
}
}
---------------------------------------------------------------------------------------
Tanki1 if you see this PLEASE PLEASE send me a message saying that you did i need to tell you something important
After I found this page, I didn't think to make my own ToolMaterials file so I wouldn't be editing a base class.
Well, after I did, in the fashion you did it, I got 10 errors (10 tools, 2 different materials I added)
That was easy to fix. I hadn't changed the tool code from EnumToolMaterial.WHATEVER to mod_ToolMaterial.WHATEVER.
After fixing that, I got 10 more errors. I'm not sure what to do about these :tongue.gif:
It's pretty much saying I can't use the ItemSword or ItemSpade if I'm going to have my own ToolMaterial class. Do I have to make item files for all the tools?
EDIT: Nevermind. Didn't read what was below that. Guess I do then :tongue.gif:
Ignore all the crossed out stuff. Is there a way to throw the different mod_ModPick and mod_ModSpade and the others in with the mod_ModTool file? All these separate class files are getting annoying :tongue.gif: