Earlier Versions
Name | Size | Uploaded | Game Version | Downloads | |
meals-0.12-1.6.4.jar beta | 13.31 KB | May 30, 2014 | 1.6.4 | 607 | Download |
meals-0.12.jar beta | 13.74 KB | May 30, 2014 | 1.7.2 | 381 | Download |
meals-0.11.jar beta | 12.35 KB | May 30, 2014 | 1.7.2 | 183 | Download |
meals-0.1.jar beta | 11.92 KB | May 29, 2014 | 1.7.2 | 154 | Download |
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.
Add a comment