Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions ItemsAdder/tfmc_cooking/contents/categories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,23 @@ categories:
- tfmc_cooking:popcorn_buttered
- tfmc_cooking:popcorn_machine
- tfmc_cooking:rice
- tfmc_cooking:rice_rotten
- tfmc_cooking:rice_grains
- tfmc_cooking:boiled_rice
- tfmc_cooking:boiled_rice_burnt
- tfmc_cooking:boiled_rice_rotten
- tfmc_cooking:boiled_rice_heap
- tfmc_cooking:boiled_rice_heap_burnt
- tfmc_cooking:boiled_rice_heap_rotten
- tfmc_cooking:fried_rice
- tfmc_cooking:fried_rice_burnt
- tfmc_cooking:fried_rice_rotten
- tfmc_cooking:fried_rice_heap
- tfmc_cooking:fried_rice_heap_burnt
- tfmc_cooking:rice_pudding
- tfmc_cooking:rice_pudding_rotten
- tfmc_cooking:sushi
- tfmc_cooking:sushi_rotten
- tfmc_cooking:stock
- tfmc_cooking:sunflower_seeds
- tfmc_cooking:strawberry_jam
Expand Down
119 changes: 119 additions & 0 deletions ItemsAdder/tfmc_cooking/contents/intermediates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,125 @@ items:
generate: false
model_path: item/intermediate/rice

rice_rotten:
display_name: "Rice Rotten"
resource:
material: PAPER
generate: false
model_path: item/intermediate/rice_rotten

rice_grains:
display_name: "Rice Grains"
resource:
material: PAPER
generate: false
model_path: item/intermediate/rice_grains

boiled_rice:
display_name: "Boiled Rice"
resource:
material: APPLE
generate: false
model_path: item/intermediate/boiled_rice

boiled_rice_burnt:
display_name: "Boiled Rice Burnt"
resource:
material: APPLE
generate: false
model_path: item/intermediate/boiled_rice_burnt

boiled_rice_rotten:
display_name: "Boiled Rice Rotten"
resource:
material: APPLE
generate: false
model_path: item/intermediate/boiled_rice_rotten

boiled_rice_heap:
display_name: "Boiled Rice Heap"
resource:
material: PAPER
generate: false
model_path: item/intermediate/boiled_rice_heap

boiled_rice_heap_burnt:
display_name: "Boiled Rice Heap Burnt"
resource:
material: PAPER
generate: false
model_path: item/intermediate/boiled_rice_heap_burnt

boiled_rice_heap_rotten:
display_name: "Boiled Rice Heap Rotten"
resource:
material: PAPER
generate: false
model_path: item/intermediate/boiled_rice_heap_rotten

fried_rice:
display_name: "Fried Rice"
resource:
material: APPLE
generate: false
model_path: item/intermediate/fried_rice

fried_rice_burnt:
display_name: "Fried Rice Burnt"
resource:
material: APPLE
generate: false
model_path: item/intermediate/fried_rice_burnt

fried_rice_rotten:
display_name: "Fried Rice Rotten"
resource:
material: APPLE
generate: false
model_path: item/intermediate/fried_rice_rotten

fried_rice_heap:
display_name: "Fried Rice Heap"
resource:
material: PAPER
generate: false
model_path: item/intermediate/fried_rice_heap

fried_rice_heap_burnt:
display_name: "Fried Rice Heap Burnt"
resource:
material: PAPER
generate: false
model_path: item/intermediate/fried_rice_heap_burnt

rice_pudding:
display_name: "Rice Pudding"
resource:
material: PAPER
generate: false
model_path: item/intermediate/rice_pudding

rice_pudding_rotten:
display_name: "Rice Pudding Rotten"
resource:
material: PAPER
generate: false
model_path: item/intermediate/rice_pudding_rotten

sushi:
display_name: "Sushi"
resource:
material: APPLE
generate: false
model_path: item/intermediate/sushi

sushi_rotten:
display_name: "Sushi Rotten"
resource:
material: APPLE
generate: false
model_path: item/intermediate/sushi_rotten

stock:
display_name: "Stock"
resource:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/boiled_rice"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/boiled_rice_burnt"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/boiled_rice_heap"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/boiled_rice_heap_burnt"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/boiled_rice_heap_rotten"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/boiled_rice_rotten"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/fried_rice"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/fried_rice_burnt"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/fried_rice_heap"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/fried_rice_heap_burnt"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/fried_rice_rotten"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/rice_grains"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/rice_pudding"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/rice_pudding_rotten"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/rice_rotten"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/sushi"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tfmc_cooking:item/intermediate/sushi_rotten"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Cooking makes food an interactive part of everyday life. Players grow and gather
- **Pies** — line a pie tin with dough, fill it with fruit, meat, mashed potato, vegetables or cheese, and bake it in the oven like the bread tray. The whole pie comes out of the tin with an empty hand and is cut into four slices on the cutting board. Its fillings make its kind (Apple, Key Lime, Mixed Berry, Pumpkin, Meat, Shepherd's) and name, and its food, quality and freshness come from its dough and fillings (`pies.yml`).
- **Sweet berries, sugar cane and beetroot** — sweet berries become Cooking fruit on pickup (`conversions.yml`), so they go into salads, pies (Mixed Berry) and jam sandwiches (Sweet Berry Jam). The milling stone holds several recipes (`milling-recipes.yml`): 8 wheat grind into flour, and 8 sugar cane into 8 sugar, the same sweetener vanilla sugar becomes on pickup; each recipe sets its result's category, origin and amount, what the stone shows, and what a broken stone gives back. A soup that is at least half beetroot is ladled as Borscht: `pot.yml` `kinds` name a soup from its boiled pieces, as `pies.yml` kinds name pies.
- **Pumpkin** — a pie of nothing but cut or chopped pumpkin bakes into a Pumpkin Pie (`pies.yml` kinds), and a soup that is at least half pumpkin is ladled as Pumpkin Soup (`pot.yml` kinds).
- **Rice** — harvested rice boils in the soup pot into boiled rice (a pot option can name an `output` too, as the pan's can). Boiled rice fries into fried rice in the frying pan, and taken out it stirs in the other fried pieces beside it: a fried egg, cut vegetables, mushrooms, meat or fish, which name it (Egg Fried Rice) and add their food (`frying-pan.yml` stir-ins). Two boiled rice, a cup of milk and a sweetener make rice pudding in an empty pot (`pot.yml`), and a boiled rice and a raw fish filet roll into two pieces of sushi named for the fish on the cutting board (Salmon Sushi): a `combine` recipe takes one of each input whatever their origins (`crafting-stations.yml`).
- **Mushrooms and hidden poison** — grilled mushrooms go into sandwiches and salads, raw or grilled ones onto pizzas and into pies, and raw ones boil into soup; in a dish both kinds are just "Mushroom". Each red mushroom poisons the dish a step further (Tainted, Poisoned, Deadly: less and less nutrition, the same food, and nausea, then poison, then weakness for whoever eats it). In a dish of 3 stars or more with its red mushrooms grilled (or its own bake cooked, its soup boiled) the poison is hidden: the lore shows no tag and the Food and Nutrition it would have without it, but eating applies it. Any dish bonus can count an origin and hide its tag this way (`count: origin`, `hide-at-stars`, `hide-tags`, `hide-dish-tags` in the dishes' `bonuses`; `tags.yml` poison). Any tag step can make the eater ill with `effects` (`"poison 10 1"`: effect, seconds, level), hidden or not.
- **Serving and sharing** — plate dishes, ladle soup into bowls, and carve foods into portions for the table.
- **Quality and freshness** — ingredient quality and composition influence finished dishes, while aging and food tags carry preparation history through the kitchen.
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/net/tfminecraft/cooking/Cooking.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
import net.tfminecraft.cooking.pie.PieHandler;
import net.tfminecraft.cooking.salad.SaladConfig;
import net.tfminecraft.cooking.pot.PotConfig;
import net.tfminecraft.cooking.pan.PanConfig;
import net.tfminecraft.cooking.salad.SaladHandler;
import net.tfminecraft.cooking.sandwich.SandwichConfig;
import net.tfminecraft.cooking.sandwich.SandwichHandler;
Expand Down Expand Up @@ -151,6 +152,7 @@ public class Cooking extends JavaPlugin {
private final PizzaHandler pizzaHandler = new PizzaHandler();
private final SaladConfig saladConfig = new SaladConfig();
private final PotConfig potConfig = new PotConfig();
private final PanConfig panConfig = new PanConfig();
private final SaladHandler saladHandler = new SaladHandler();
private final PieConfig pieConfig = new PieConfig();
private final PieHandler pieHandler = new PieHandler();
Expand Down Expand Up @@ -283,6 +285,7 @@ public void loadConfigs() {
condimentConfig.load(new File(getDataFolder(), "condiments.yml"));
saladConfig.load(new File(getDataFolder(), "salads.yml"));
potConfig.load(new File(getDataFolder(), "pot.yml"));
panConfig.load(new File(getDataFolder(), "frying-pan.yml"));
pieConfig.load(new File(getDataFolder(), "pies.yml"));
popcornMachineConfig.load(new File(getDataFolder(), "popcorn-machines.yml"));
millingRecipeLoader.load(new File(getDataFolder(), "milling-recipes.yml"));
Expand Down Expand Up @@ -452,6 +455,7 @@ public void createConfigs() {
"condiments.yml",
"salads.yml",
"pot.yml",
"frying-pan.yml",
"pies.yml",
"popcorn-machines.yml",
"milling-recipes.yml",
Expand Down
23 changes: 16 additions & 7 deletions src/main/java/net/tfminecraft/cooking/cooking/CookingOutput.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/**
* A cooking option that names an output (types.yml cooking-options.<method>.output) turns the piece into that
* food once it's done: chopped corn in the frying pan pops into popcorn. The piece cooks raw, then becomes the output,
* food once it's done: chopped corn in the frying pan pops into popcorn, and rice boils into boiled rice in the pot. The piece cooks raw, then becomes the output,
* cooked (or burnt, if it burnt first), and keeps cooking by the same clock, so popcorn left too long burns as popcorn.
*/
public final class CookingOutput {
Expand All @@ -36,17 +36,26 @@ static void startRaw(FoodItem piece, Method method) {
}

/**
* A piece taken off before it turned is still what went in: drops the raw track {@link #startRaw} gave it.
* True when the piece is such an unturned input.
* A piece already cooked another way still goes into cookware whose option turns it into its output (boiled rice
* into the frying pan, where it fries into fried rice); burnt, it doesn't.
*/
static boolean turnsHere(FoodItem piece, Method method) {
return output(piece, method) != null && !piece.hasTag(Tag.BURNT);
}

/**
* A piece taken off before it turned is still what went in: drops the raw track {@link #startRaw} gave it, and a
* piece that came in cooked (boiled rice) keeps its step. True when the piece is such an unturned input.
*/
static boolean restoreInput(FoodItem piece, Method method) {
if (output(piece, method) == null || piece.getCookData().cooksInPlace()) {
CookParameter parameter = piece.getCookData().getParameters().get(method);
if (parameter == null || parameter.getOutput() == null || piece.getCookData().cooksInPlace()
|| piece.getCookData().getCurrentTime() >= parameter.getTime()) {
return false;
}
if (piece.hasTagTrack(COOKED_TRACK) && !piece.hasTag(Tag.RAW)) {
return false;
if (piece.hasTag(Tag.RAW)) {
piece.removeTrack(COOKED_TRACK);
}
piece.removeTrack(COOKED_TRACK);
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public void rebuildFromFurniture() {
if (fi == null || !fi.canBeCooked() || !fi.getCookData().hasMethod(method)) {
return;
}
if (!fi.hasTag(Tag.RAW)) {
if (!fi.hasTag(Tag.RAW) && !CookingOutput.turnsHere(fi, method)) {
return;
}
if (!fi.getCookData().isBeingCooked()) {
Expand All @@ -210,7 +210,7 @@ public void slotAdd(FurnitureSlotItemAddEvent e) {
return;
}
CookingOutput.startRaw(fi, method);
if(!fi.hasTag(Tag.RAW)) {
if(!fi.hasTag(Tag.RAW) && !CookingOutput.turnsHere(fi, method)) {
e.setCancelled(true);
return;
}
Expand Down
Loading
Loading