How do I have X allocated to Block.air (Which doesn't exist as a block)? With Y allocated to block.wool, is it possible to have woolCyan or something? It doesn't show up in the auto-complete directory and I really need to know how to do this for my totem blocks. Maybe it has something to do with damage values?
You can get your blocks in the creative inventory much easier!
Just open up the ContainerCreative.java and put a comma next to the last block, then type mod_YourMod.BlockNameHere
and it's added!
That is stupid! That ruins the whole point of not editing base classes. Not editing base classes makes mods a lot more compatible with others. Oh, and don't think I don't know that you have stolen several of my tutorials, because I do, and am in talks with admins about it at the current time.
How do I have X allocated to Block.air (Which doesn't exist as a block)? With Y allocated to block.wool, is it possible to have woolCyan or something? It doesn't show up in the auto-complete directory and I really need to know how to do this for my totem blocks. Maybe it has something to do with damage values?
You just leave those spaces empty(put a space there), or if you want a whole row empty then just leave that line out completely. Then the item can be crafted in more then one spot of the grid. You are better off just leaving all the spaces out unless they're required(Look at the recipe tutorial for more information).
The tutorial for dyes in the recipe section also covers wool, the damage value numbering is just opposite. Also, watch out when using single or double quotation marks. Doubles represent Strings, singles represent Characters.
ModLoader.addRecipe(new ItemStack(mod_Tribes.CyanTotem, 2), new Object[]
{
"Y", "Z", 'Y', new ItemStack(Block.cloth, 1, 9), 'Z', Block.wood
});
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
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.
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.
The tutorial for dyes in the recipe section also covers wool, the damage value numbering is just opposite. Also, watch out when using single or double quotation marks. Doubles represent Strings, singles represent Characters.
ModLoader.addRecipe(new ItemStack(mod_Tribes.CyanTotem, 2), new Object[]
{
"Y", "Z", 'Y', new ItemStack(Block.cloth, 1, 9), 'Z', Block.wood
});
You've literally made my night and my life! Thanks to you, I made my first block (Which I'm quite proud of, since I was surprised I succeeded in modding as excellent as my artistic side) and here is a picture of the final result:
I am not here just to write code and give it to people. The whole reason I am making these tutorials is to explain to people how to code stuff from scratch themselves.
You've literally made my night and my life! Thanks to you, I made my first block (Which I'm quite proud of, since I was surprised I succeeded in modding as excellent as my artistic side) and here is a picture of the final result:
Nice Love the texture!
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
If you want you can go here: http://www.minecraft...ource-yogscast/ and download the source code, then you can get an idea of how to make a furnace-like block, then you can expand that to use any of the other containers (e.g. Chest, Dispenser) by just copying the code from the game.
I am not here just to write code and give it to people. The whole reason I am making these tutorials is to explain to people how to code stuff from scratch themselves.
Nice Love the texture!
I dont want to use the code i want to look at it and learn from it
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
You can't remove the original recipe without editing the base-class, which isn't a good idea as it will make your mod highly incompatible with other mods.
Alright, I'm getting exetremely annoyed. I've posted a thread, and asked twice on this thread, how do I remove the existing torch recipe. Everytime I get a "well dont do that" lecture. This will sound a bit rude but, obviously if I cared I wouldn't keep asking. I'm not new to modding (to give you an idea, I have 5-albeit outdated-mods that have over 80 diamonds on planetminecraft). I simply want to know HOW to remove the existing torch recipe in favor of a new one. Please if you do not know then don't preach to me why I shouldn't edit base classes. I know that it hinders compatibility by quite a large degree, but I don't care. Again, I know it's not the nicest way to explain this, but I'm utterly tired of people acting like I don't know a single thing about what I want/am doing.
Anyways, if I can get some help thank you in advance.
Alright, I'm getting exetremely annoyed. I've posted a thread, and asked twice on this thread, how do I remove the existing torch recipe. Everytime I get a "well dont do that" lecture. This will sound a bit rude but, obviously if I cared I wouldn't keep asking. I'm not new to modding (to give you an idea, I have 5-albeit outdated-mods that have over 80 diamonds on planetminecraft). I simply want to know HOW to remove the existing torch recipe in favor of a new one. Please if you do not know then don't preach to me why I shouldn't edit base classes. I know that it hinders compatibility by quite a large degree, but I don't care. Again, I know it's not the nicest way to explain this, but I'm utterly tired of people acting like I don't know a single thing about what I want/am doing.
Anyways, if I can get some help thank you in advance.
OK...I'll help you.
go to CraftingManager.java and delete lines 129, 130 and 131 and then make the custom recipe in your mod_class or edit the line 130 to what you want.
OK...I'll help you.
go to CraftingManager.java and delete lines 129, 130 and 131 and then make the custom recipe in your mod_class or edit the line 130 to what you want.
Many thanks coldblade, again, sorry for being a bit obnoxious earlier, but yea...anyways, thank you.
Applying a potion effect to a food. This is very easy to do. You simply make a food(follow the tutorial above), and add this bit of code to it:
.setPotionEffect(Potion.hunger.id, 30, 0, 0.8F)
so it would fit in like this:
public static final Item Namehere = new ItemFood(5001, 4, 1F, false).setPotionEffect(Potion.hunger.id, 30, 0, 1F).setItemName("anynamehere");
Note that .setPotionEffect MUST go before .setItemName otherwise you will get recompilation errors. I use the hunger potion in this example, which is what is used in rotten flesh. You can use any potion effect when doing this. They are all listed in Potion.java. I'm not sure what the 0 means, but the 30 is the time the effect lasts for. An int of 1 here lasts for a second, 15 lasts for 15 seconds, etc. The float(1F) is the chance of the potion being successful. Rotten flesh has 0.8F here, and it has an 80% chance of giving you food poisoning. Having 1F in this position should be a 100% success rate.
Potion.hunger.id, 30, 0, 1F
The first value is measured in ticks I believe (tick = 1/20 of a second), at least that's how it is for addPotionEffect. The second value is the 'amplifier' (at least that's how it's documented). Not 100% sure but I believe it amplifies the effect of said potion. 0 = no amplifier.
ModLoader.addRecipe(new ItemStack(mod_Tribes.CyanTotem, 2), new Object[] { "XXX", "XYX", "XZX", "Y", Block.cloth, "Z", Block.wood });How do I have X allocated to Block.air (Which doesn't exist as a block)? With Y allocated to block.wool, is it possible to have woolCyan or something? It doesn't show up in the auto-complete directory and I really need to know how to do this for my totem blocks. Maybe it has something to do with damage values?
That is stupid! That ruins the whole point of not editing base classes. Not editing base classes makes mods a lot more compatible with others. Oh, and don't think I don't know that you have stolen several of my tutorials, because I do, and am in talks with admins about it at the current time.
You just leave those spaces empty(put a space there), or if you want a whole row empty then just leave that line out completely. Then the item can be crafted in more then one spot of the grid. You are better off just leaving all the spaces out unless they're required(Look at the recipe tutorial for more information).
The tutorial for dyes in the recipe section also covers wool, the damage value numbering is just opposite. Also, watch out when using single or double quotation marks. Doubles represent Strings, singles represent Characters.
ModLoader.addRecipe(new ItemStack(mod_Tribes.CyanTotem, 2), new Object[] { "Y", "Z", 'Y', new ItemStack(Block.cloth, 1, 9), 'Z', Block.wood });together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIf you want you can go here: http://www.minecraftforum.net/topic/353866-125-uraniummod-125a-250000-downloads-open-source-yogscast/ and download the source code, then you can get an idea of how to make a furnace-like block, then you can expand that to use any of the other containers (e.g. Chest, Dispenser) by just copying the code from the game.
You've literally made my night and my life! Thanks to you, I made my first block (Which I'm quite proud of, since I was surprised I succeeded in modding as excellent as my artistic side) and here is a picture of the final result:
I am not here just to write code and give it to people. The whole reason I am making these tutorials is to explain to people how to code stuff from scratch themselves.
Nice
together they are powerful beyond imagination."
I dont WANT the existing recipe. I need it replaced. How would I go about doing this?
Their funeral
together they are powerful beyond imagination."
Alright, I'm getting exetremely annoyed. I've posted a thread, and asked twice on this thread, how do I remove the existing torch recipe. Everytime I get a "well dont do that" lecture. This will sound a bit rude but, obviously if I cared I wouldn't keep asking. I'm not new to modding (to give you an idea, I have 5-albeit outdated-mods that have over 80 diamonds on planetminecraft). I simply want to know HOW to remove the existing torch recipe in favor of a new one. Please if you do not know then don't preach to me why I shouldn't edit base classes. I know that it hinders compatibility by quite a large degree, but I don't care. Again, I know it's not the nicest way to explain this, but I'm utterly tired of people acting like I don't know a single thing about what I want/am doing.
Anyways, if I can get some help thank you in advance.
OK...I'll help you.
go to CraftingManager.java and delete lines 129, 130 and 131 and then make the custom recipe in your mod_class or edit the line 130 to what you want.
Many thanks coldblade, again, sorry for being a bit obnoxious earlier, but yea...anyways, thank you.
The first value is measured in ticks I believe (tick = 1/20 of a second), at least that's how it is for addPotionEffect. The second value is the 'amplifier' (at least that's how it's documented). Not 100% sure but I believe it amplifies the effect of said potion. 0 = no amplifier.
Click the picture!
-Derek Shunia
No, ask in another tutorial or in Mod Development.
Well, you could make the item class extend item throwable and study the snowball code.