In the adding you block to creative, I get this error : "creativeInventory cannot be resolved to a variable" In eclipse. Help. I will add the code if you need
Me again, oh joy! So I decided after making my tools to move over to your way of doing things to avoid conflicting with other mods.
I only have errors on my mod_electrolite class.
public static final Item electroPickaxe = new ElectroItemPickaxe(135, EnumToolElectro.ELECTROLITE).setItemName("ElectroPickaxe");
public static final Item electroAxe = new ElectroItemAxe(136, EnumToolElectro.ELECTROLITE).setItemName("ElectroAxe");
public static final Item electroShovel = new ElectroItemShovel(137, EnumToolElectro.ELECTROLITE).setItemName("ElectroShovel");
public static final Item electroSword = new ElectroItemSword(138, EnumToolElectro.ELECTROLITE).setItemName("ElectroSword");
The electroPickaxe, electroAxe, electroShovel, electroSword, ElectroItemPickaxe and setItemName for electroPickaxe are all underlined red. The error is saying something about an illegal modifier. Can you offer any help?
Not too sure, can you post your mod_ class please. Also, use item ids above 256. Ids under 256 should be reserved for blocks.
First, let me say thankyouthankyouthankyou for this amazing tutorial. But because I'm one of those girls who likes to start BIG! I was hoping you could tell me if there was a way to add to an item's already existing right click action? Specifically, I want to add to the bucket to react to a new block that my mod is adding and to fill with the new liquid.
You'll have to create your own bucket, there is no way of doing what you want to do as far as I'm aware.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Me again, oh joy! So I decided after making my tools to move over to your way of doing things to avoid conflicting with other mods.
I only have errors on my mod_electrolite class.
public static final Item electroPickaxe = new ElectroItemPickaxe(135, EnumToolElectro.ELECTROLITE).setItemName("ElectroPickaxe");
public static final Item electroAxe = new ElectroItemAxe(136, EnumToolElectro.ELECTROLITE).setItemName("ElectroAxe");
public static final Item electroShovel = new ElectroItemShovel(137, EnumToolElectro.ELECTROLITE).setItemName("ElectroShovel");
public static final Item electroSword = new ElectroItemSword(138, EnumToolElectro.ELECTROLITE).setItemName("ElectroSword");
The electroPickaxe, electroAxe, electroShovel, electroSword, ElectroItemPickaxe and setItemName for electroPickaxe are all underlined red. The error is saying something about an illegal modifier. Can you offer any help?
Well, you could try adding them again by cutting and pasting the lines again. Sometimes, Eclipse gets late at updating their errors. Or, you could show us the rest of the code, like the enum, or the itemspade, itemsword, etc?
My mod_electrolite class (theres all my blocks and other items in there so heres the bit for the tools):
// *** ELECTRO-TOOLS *** \\-----------------------------------------------------------------------
{
public static final Item electroPickaxe = new ElectroItemPick(135, EnumToolElectro.ELECTROLITE).setItemName("ElectroPickaxe");
public static final Item electroAxe = new ElectroItemAxe(136, EnumToolElectro.ELECTROLITE).setItemName("ElectroAxe");
public static final Item electroShovel = new ElectroItemShovel(137, EnumToolElectro.ELECTROLITE).setItemName("ElectroShovel");
public static final Item electroSword = new ElectroItemSword(138, EnumToolElectro.ELECTROLITE).setItemName("ElectroSword");
{
electroPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "electropickaxe.png");
electroAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "electroaxe.png");
electroShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "electroshovel.png");
electroSword.iconIndex = ModLoader.addOverride("/gui/items.png", "electrosword.png");
ModLoader.addName(electroPickaxe, "Pickaxe");
ModLoader.addName(electroAxe, "Axe");
ModLoader.addName(electroShovel, "Shovel");
ModLoader.addName(electroSword, "Sword");
ModLoader.addRecipe(new ItemStack(electroPickaxe, 1), new Object [] {"###", " % ", " % ", '#', Block.dirt, '%', Item.stick});
ModLoader.addRecipe(new ItemStack(electroAxe, 1), new Object [] {"##", "#%", " %", '#', Block.dirt, '%', Item.stick});
ModLoader.addRecipe(new ItemStack(electroShovel, 1), new Object [] {"#", "%", "%", '#', Block.dirt, '%', Item.stick});
ModLoader.addRecipe(new ItemStack(electroSword, 1), new Object [] {"#", "#", "%", '#', Block.dirt, '%', Item.stick});
} }
And heres my EnumElectroTool class:
package net.minecraft.src;
public enum EnumToolElectro
{
ELECTROLITE(3, 2000, 15.0F, 10, 4);
private final int harvestLevel;
private final int maxUses;
private final float efficiencyOnProperMaterial;
private final int damageVsEntity;
private final int enchantability;
private EnumToolElectro(int par3, int par4, float par5, int par6, int par7)
{
harvestLevel = par3;
maxUses = par4;
efficiencyOnProperMaterial = par5;
damageVsEntity = par6;
enchantability = par7;
}
public int getMaxUses()
{
return maxUses;
}
public float getEfficiencyOnProperMaterial()
{
return efficiencyOnProperMaterial;
}
public int getDamageVsEntity()
{
return damageVsEntity;
}
public int getHarvestLevel()
{
return harvestLevel;
}
public int getEnchantability()
{
return enchantability;
}
}
Hope that's enough info! Cheers
Are the public static final lines outside of the load() method?
I've just done all the setting up and everything for MCP and Eclipse (Which I am running through) and was wondering:
Where DO I save my files that I create and make them, and more importantly, how may I test these files?
(Go Queensland! [Sunshine Coast 'ere])
You save them in mcpfolder/src/net/minecraft/src. The rest of the decompiled classes from the game will be there as well. When you have written and would like to test them, you use the green circle with the white "play" symbol on it in Eclipse. You can also use the Debug run which is the button which looks like a bug next to the run button. Debug mode will make live changes in the game from your code. Note that only some things can change immediately; others require a restart of the Client.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
When adding custom sounds to your mod and using AudioMod, do you have to make like a new class to make it understand where the sound is? I tried just installing AudioMod, putting the sounds in /resources/mod/sound and just putting the sounds in the mod. I decompiled an other mod using AudioMod and looked at the code and there was nothing noticeable about new code, it just said:
Can anyone do a tutorial, link to a tutorial (I have googled, believe me), or just explain in the comments how to use AudioMod? I know the method of "installing" the sound but I want to use AudioMod. Thank y'all! And great tutorials!
I would normally put a link to Mod Development because this isn't related to my tutorials, but I see that you are going to be wasting a lot of time with what you are going to do. Do not use Audiomod! It is a dependancy that isn't needed. Minecraft already has the feature built in for adding sounds. Look at this tutorial here which explains how to do it, without AudioMod.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Thank you!! The other tutorials give you the code but don't explain it like you do. And I need the explanation so I can mod myself and design my own code.Thanks
I know your not taking request but how about basic GUI tutorials?
HELLO peoples! I have a question referring to adding blocks to the creative menu. So I'm a little bit OCD and I like to organize things a little. In the creative menu my OCD would be uber satisfied if all the custom things I added stayed together. Since my mod adds both items and blocks, they do not. Items are somewhere between music disks and dyes and blocks are just smack dab on the end. is there a way that I can organize the blocks I add to the creative menu or maybe stop Minecraft from automatically adding items to the list so I can use this method to add them to the end instead? Thank you to your faces in advance.
The Meaning of Life, the Universe, and Everything.
Join Date:
3/3/2012
Posts:
42
Member Details
I want to edit the crafting recipe of the Torch and remove it in favor of a custom recipe, however, I cannot find the .class where I would do this. Can anybody help?
I want to edit the crafting recipe of the Torch and remove it in favor of a custom recipe, however, I cannot find the .class where I would do this. Can anybody help?
You just make a ModLoader recipe for the torch, so you can use both. Unfortunately it's a bit risky to change the crafting manager.
Ok, so I just tried out my tools ingame and the properties are all messed up now. They all have my desired aspects of the shovel. So mining down dirt really fast, but not being able to mine stone.
My classes are: mod_electrolite ElectroItemShovelElectroItemSwordElectroItemAxeElectroItemPickaxeItemElectroTool and EnumToolElectro
I didn't think that this could be a typo code error so I thought it might be to do with my class setup?
Sorry if this seems like a lot of hassle/work, but I really appreciate it and if you keep helping me out when I get derpy, I'm sure I can repay the favour (if you $ee what I mean).
This looks correct does it?
public static final Item electroPickaxe = new ElectroItemShovel(135, EnumToolElectro.ELECTROLITE).setItemName("ElectroPick"); public static final Item electroAxe = new ElectroItemShovel(136, EnumToolElectro.ELECTROLITE).setItemName("ElectroAxe"); public static final Item electroShovel = new ElectroItemShovel(137, EnumToolElectro.ELECTROLITE).setItemName("ElectroShovel"); public static final Item electroSword = new ElectroItemShovel(139,
Thank you!! The other tutorials give you the code but don't explain it like you do. And I need the explanation so I can mod myself and design my own code.Thanks
I know your not taking request but how about basic GUI tutorials?
I've got some GUI tutorials written but it takes a long time to upload them and explain them. I still have to work on the tool tutorial and fully explaining it.
HELLO peoples! I have a question referring to adding blocks to the creative menu. So I'm a little bit OCD and I like to organize things a little. In the creative menu my OCD would be uber satisfied if all the custom things I added stayed together. Since my mod adds both items and blocks, they do not. Items are somewhere between music disks and dyes and blocks are just smack dab on the end. is there a way that I can organize the blocks I add to the creative menu or maybe stop Minecraft from automatically adding items to the list so I can use this method to add them to the end instead? Thank you to your faces in advance.
You'd have to edit base classes for that. Something I don't like to show how or tell people to do.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Hey again was just going to suggest a fix-up (Well just an expansion to the OP, not a request). Whenever you get the chance to, would you mind creating a section regarding how to publish mods and export them intoa zip file, ready to test?
Hey again was just going to suggest a fix-up (Well just an expansion to the OP, not a request). Whenever you get the chance to, would you mind creating a section regarding how to publish mods and export them intoa zip file, ready to test?
That's very easy. You just run recompile.bat, NOT decompile.bat or else you'll lose everything. After recompile.bat, run reobsfuscate.bat. All of the edited class files will go to reobf folder in your MCP. Make a new zip file, add those .class files from the reobf folder, then your textures as well in the zip. You're done! You can then put the files from the zip to your minecraft like installing other mods.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
To post a comment, please login or register a new account.
http://www.minecraftforum.net/topic/1237692-125-lordofcatss-mods-defenders-of-steve-and-more/page__fromsearch__1
Here's the text:
That isn't all, but it's all that's important.
Am I even supposed to recompile?
And also, how do you add in the IDs of items?
Bok
Well, you have to do it right. I know a tutorial about making mods utilizing MCForge. Here.
Not too sure, can you post your mod_ class please. Also, use item ids above 256. Ids under 256 should be reserved for blocks.
Look at the tutorial again, I updated it. The main lines you need to add are the public static and import of List.
Mod Development - It isn't related to my tutorials.
I'm not supporting Minecraft Forge. There are tons of tutorials on the internet about it.
That error isn't important. Ids of items?
You'll have to create your own bucket, there is no way of doing what you want to do as far as I'm aware.
EDIT: You can use Forge. Tutorial.
together they are powerful beyond imagination."
Well, you could try adding them again by cutting and pasting the lines again. Sometimes, Eclipse gets late at updating their errors. Or, you could show us the rest of the code, like the enum, or the itemspade, itemsword, etc?
Lol, that's the same tutorial I was using.
Where DO I save my files that I create and make them, and more importantly, how may I test these files?
(Go Queensland! [Sunshine Coast 'ere])
Are the public static final lines outside of the load() method?
You save them in mcpfolder/src/net/minecraft/src. The rest of the decompiled classes from the game will be there as well. When you have written and would like to test them, you use the green circle with the white "play" symbol on it in Eclipse. You can also use the Debug run which is the button which looks like a bug next to the run button. Debug mode will make live changes in the game from your code. Note that only some things can change immediately; others require a restart of the Client.
together they are powerful beyond imagination."
I would normally put a link to Mod Development because this isn't related to my tutorials, but I see that you are going to be wasting a lot of time with what you are going to do.
Do not use Audiomod! It is a dependancy that isn't needed. Minecraft already has the feature built in for adding sounds. Look at this tutorial here which explains how to do it, without AudioMod.
together they are powerful beyond imagination."
I know your not taking request but how about basic GUI tutorials?
This looks correct does it?
public static final Item electroPickaxe = new ElectroItemShovel(135, EnumToolElectro.ELECTROLITE).setItemName("ElectroPick"); public static final Item electroAxe = new ElectroItemShovel(136, EnumToolElectro.ELECTROLITE).setItemName("ElectroAxe"); public static final Item electroShovel = new ElectroItemShovel(137, EnumToolElectro.ELECTROLITE).setItemName("ElectroShovel"); public static final Item electroSword = new ElectroItemShovel(139,Everything is ElectroItemShovel?I've got some GUI tutorials written but it takes a long time to upload them and explain them. I still have to work on the tool tutorial and fully explaining it.
You'd have to edit base classes for that. Something I don't like to show how or tell people to do.
together they are powerful beyond imagination."
But that's not a good idea! Because editing base classes are a bad way to go. Incompatibilities are unwanted dude.
That's very easy. You just run recompile.bat, NOT decompile.bat or else you'll lose everything. After recompile.bat, run reobsfuscate.bat. All of the edited class files will go to reobf folder in your MCP. Make a new zip file, add those .class files from the reobf folder, then your textures as well in the zip. You're done! You can then put the files from the zip to your minecraft like installing other mods.
Your ItemPickaxe shouldn't be an enum. Look at the tutorial on OP2 again, I fixed it.
OP2 is the post below the OP, it has the tool tutorial.
together they are powerful beyond imagination."