Tutorials Navigation
[ Minecraft ] How To Make Your Own Food! [ Any Version ]
Tutorial Name: [ Minecraft ] How To Make Your Own Food! [ Any Version ]
Category: PC Tutorials
Submitted By: Console
Date Added:
Comments: 1
Views: 6,726
Related Forum: PC Building Forum
Share:
How to make a new Food:
In this tutorial i will teach you how to make your own food!
Ok first of all create a new file called mod_Whatever... im calling mine mod_Chocolate for this tutorial!
So first off enter this code into your mod_Chocolate file:
So this is pretty easy to understand.... Basically edit the names... and then where it says ID, change that to the item id you want your food to be - 40,000 i think is the max and then the heal amount....
Basically 10 is half of full hearts.... so here is the list:
Then you add overrides etc... So here is my full mod_Chocolate and check how i did it:
Then you need to create an ItemChocolate file:
Basically all you need to do is rename and all you need to know is that, int i will call the id, int j will call the heal amount. And there! You have your own food item!
Thanks Guys!
In this tutorial i will teach you how to make your own food!
Ok first of all create a new file called mod_Whatever... im calling mine mod_Chocolate for this tutorial!
So first off enter this code into your mod_Chocolate file:
package net.minecraft.src;
public class mod_Chocolate extends BaseMod {
public static final Item Chocolate = new ItemFood(ID, HEALAMOUNT, false).setItemName("Chocolate");
public mod_Chocolate() {
//crafting codes, etc
}
public String Version() {
return "yourversion";
}
}
So this is pretty easy to understand.... Basically edit the names... and then where it says ID, change that to the item id you want your food to be - 40,000 i think is the max and then the heal amount....
Basically 10 is half of full hearts.... so here is the list:
- 1 = half heart
- 2 = 1 heart
- 3 = 1 + 1/2 hearts
- 4 = 2 hearts
- 5 = 2 + 1/2 hearts
- 6 = 3 hearts
- 7 = 3 + 1/2 hearts
- 8 = 4 hearts
- 9 = AND SO ON! 20 = full hearts!!!
Then you add overrides etc... So here is my full mod_Chocolate and check how i did it:
package net.minecraft.src;
public class mod_Chocolate extends BaseMod
{
public static final Item Chocolate = new ItemFood(2200, 6, false).setItemName("Chocolate");
public mod_Chocolate()
{
Chocolate.iconIndex = ModLoader.addOverride("/gui/items.png", "chocolate.png");
ModLoader.AddName(Chocolate, "Chocolate");
ModLoader.AddRecipe(new ItemStack(Chocolate, 64), new Object[]
{
"XXX", "XXX", "XXX", Character.valueOf('X'), Item.cocoaBeans, Character.valueOf('A')});
}
public String Version()
{
return "yourversion";
}
}
Then you need to create an ItemChocolate file:
package net.minecraft.src;
public class ItemChocolate extends ItemFood {
public ItemChocolate(int i, int j) {
super(i, j, true);
maxStackSize = (1);
}
}
Basically all you need to do is rename and all you need to know is that, int i will call the id, int j will call the heal amount. And there! You have your own food item!
Thanks Guys!
Ratings
Comments
OdinPosted:
This tutorial does not work with the newer versions of ModLoader!
[code]public String getVersion() {
// TODO Auto-generated method stub
return null;
}
public void load(){
// TODO Auto-generated method stub
}[/code]
is required
[code]public String getVersion() {
// TODO Auto-generated method stub
return null;
}
public void load(){
// TODO Auto-generated method stub
}[/code]
is required
Related Tutorials
- 01. Emulating Xbox 360 on PC for Running COD4 With Mods(3,492)
- 02. How to: Matrix Numbers | Batch File(1,903)
- 03. How to Password Protect Files on Windows(857)
- 04. How to play Socom 2/3/ and Combined Assault on PC(6,715)
- 05. Modern Warfare 2 Vac Ban Bypass Tutorial(6,133)
- 06. How to embed an image on TheTechGame(3,098)
- 07. [PC] NIOH 2 OTHER USER SAVE RESIGN(12,981)
- 08. Host bot lobbies! Full Tutorial!(11,241)
- 09. Unban yourself [Plutonium BO2](14,240)
- 10. Fall Guys - How to Change Your Name Color on Fall Guys(8,385)
- 11. Best Crosshair Settings for Valorant(6,525)
- 12. Othercide The Surgeon Boss Guide(2,539)
- 13. Othercide Remembrances Unlock Guide(4,460)
- 14. Othercide Beginners Tips and Tricks(2,708)
- 15. How to Fix Grounded Crashes, Loading Time, Low FPS and Other(4,845)
"[ Minecraft ] How To Make Your Own Food! [ Any Version ]" :: Login/Create an Account :: 1 comment