Description
This is based on an idea by Jadedcat (http://forum.feed-the-beast.com/threads/mod-ideas-for-maps-packs.46198/).
0.12 adds potion effects!
Now backported to 1.6, make sure you get the right version (versions with "1.6.4" at the end are for 1.6.4, the others are for 1.7.2)
Edit: Looks like this actually exists already: https://github.com/wyldmods/KitchenCraft Go use tterrag's mod instead (as soon as it's released).
For Minecraft 1.7.2
How to install
Just drop this into your mods folder after installing Forge.
How to add food
After you started the game once, there should be a Meals_FoodConfig.json file in your config folder. The default one looks like this:
[
{
"name":"Test Food 1",
"hunger":"5",
"saturation":"0.2",
"useDuration":"20",
"texture":"minecraft:diamond",
"recipe":"ccc,cic,ccc,c,coal,i,iron_ingot",
"recipeAmount":"1"
},
{
"name":"Test Food 2",
"hunger":"1",
"saturation":"1.0",
"useDuration":"100",
"texture":"meals:test",
"recipe":"ccc,cdc,sss,c,coal,d,dye:2,s,stone",
"recipeAmount":"8",
"effects":[
{
"id":"23",
"duration":"1200",
"amplifier":"0"
},
{
"id":"3",
"duration":"200",
"amplifier":"2"
}
]
}
]
You can (and should) change the default foods to your own ones. To add your own food, copy one of the default ones and append it to the end; make sure there's a comma after every closing bracket (except for the last one!).
Properties
There are four basic properties you can set for a type of food:
Name
Pretty self-explanatory.
Hunger value
How many hunger points (half hunger bars) it restores.
Saturation
How long you stay saturated after eating the food. Cookies are 0.1, carrots are 0.6, steak is 0.8 and golden apples are 1.2.
Use duration
How many ticks it takes to eat the food. Default for every vanilla food is 32.
Textures
To use a default Minecraft texture or a texture from another mod, use
modid:texture_name
as the texture name, where modid is the mod's ModID ("minecraft" for vanilla MC) and texture_name is the internal texture name (look into a mod's assets if you want to find it out).
If you want a custom texture, you have to create a new resource pack. To do this, create a new folder in your resourcepacks/ folder called whatever you want (your resource pack's name). In there, create a new file called "pack.mcmeta" that should look like this:
{
"pack": {
"pack_format": 1,
"description": "Resource Pack"
}
}
In the created folder, also create the following folder structure:
assets/meals/textures/items/
In the items folder, put the textures you want to create. Make sure they're PNG files.
Now, assuming you have created a file called strawberry.png, you can now refer to that file as "meals:strawberry". This goes for every file in the items folder. After you're done, you can create a zip file with the resource pack folder in it to distribute to your users. Make sure your users have the resource pack loaded at all times, otherwise the missing textures will appear as purple-black squares (you don't want this, do you?)
Recipes
Recipes are created like this:
bbb,ese,bbb,b,bread,e,egg,s,spicemod:spice:2
The first three groups of characters have to be three characters long and represent the shape of the items on the crafting grid. The first group represents the first layer, the second one the second layer etc., so this recipe would create a recipe with 3x "b" on the top and the bottom, "e" on the sides and "s" in the center.
The other groups define what the characters mean. In the above example, "b" is defined to be bread, "e" is defined to be egg, and "s" is defined to be spicemod:spice:2 ("spice" from the mod with the ID "spicemod" with a metadata of 2). The names of the items have to be the names that were used to register the items (not the names that show up in the game!) To find these names, you can usually look at the language files in a mod's assets. If you're using items from other mods, you HAVE to prefix them with their mod ID. The mod ID can be found in the in-game mod list.
In 1.6, you just use IDs instead of the unlocalized names, no mod IDs necessary:
bbb,ese,bbb,b,297,e,344,s,11024:2
(assuming the ID for "spice" is 11024)
Potion effects
By setting the "effects" tag, you can add potion effects to food.
"effects":[
{
"id":"23",
"duration":"1200",
"amplifier":"0"
},
{
"id":"3",
"duration":"200",
"amplifier":"2"
}
]
As you can see, this adds two effects to a meal. An effect has the following properties:
ID
The internal ID of the potion effect as used in the /effect command, a list of effects with their IDs can be found on http://minecraft.gamepedia.com/Status_effect.
Duration
The duration in ticks (1/20 seconds). A duration of 200 would equal 10 seconds, 1200 = 60 seconds = one minute.
Amplifier
The level of a potion - 1, so for example Saturation II would have an amplifier of 1. 0 = no amplifier.
Other information
If you have any questions, just leave a comment here or ping me on IRC (irc.esper.net #meew0mods). You can freely use this mod in any modpack you want.
The source code is available too (https://github.com/meew0/Meals). Please report any issues and crashes you get to the issue tracker: https://github.com/meew0/Meals/issues.
AD
Become Premium to remove Ads!
What means Verified?
-
Compatibility: The mod should be compatible with the latest version of Minecraft and be clearly labeled with its supported versions.
-
Functionality: The mod should work as advertised and not cause any game-breaking bugs or crashes.
-
Security: The mod should not contain any malicious code or attempts to steal personal information.
-
Performance: The mod should not cause a significant decrease in the game's performance, such as by causing lag or reducing frame rates.
-
Originality: The mod should be original and not a copy of someone else's work.
-
Up-to-date: The mod should be regularly updated to fix bugs, improve performance, and maintain compatibility with the latest version of Minecraft.
-
Support: The mod should have an active developer who provides support and troubleshooting assistance to users.
-
License: The mod should be released under a clear and open source license that allows others to use, modify, and redistribute the code.
-
Documentation: The mod should come with clear and detailed documentation on how to install and use it.
AD
Become Premium to remove Ads!
How to Install
Download Forge & Java
Download Forge from the offical Site or here. If you dont have Java installed then install it now from here. After Downloading Forge you can run the file with Java.
Prepare
Lounch Minecraft and select your Forge istallation as Version this will create a Folder called Mods.
Add Mods
Type Win+R and type %appdata% and open the .minecraft Folder. There will you find your Folder called Mods. Place all Mods you want to play in this Folder
Enjoy
You are now Ready. Re-start your Game and start Playing.