Skip to content

Commit

Permalink
Merge pull request baguchi#23 from YukkuriLaboratory/baguchi#21
Browse files Browse the repository at this point in the history
baguchi#21 豆腐ステーキ、五平餅、赤いスープ
  • Loading branch information
baguchi authored Jul 24, 2022
2 parents 9c19a25 + f5f10aa commit e2f53f6
Show file tree
Hide file tree
Showing 20 changed files with 325 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tofucraft:item/crimson_soup"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tofucraft:item/goheimochi"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tofucraft:item/tofusteak"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_item": {
"conditions": {
"items": [
{
"items": [
"tofucraft:tofuishi"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "tofucraft:campfire_cooking_tofusteak"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_item",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"tofucraft:campfire_cooking_tofusteak"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_item": {
"conditions": {
"items": [
{
"items": [
"tofucraft:seeds_soybeans_nether"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "tofucraft:crimson_soup"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_item",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"tofucraft:crimson_soup"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_item": {
"conditions": {
"items": [
{
"items": [
"tofucraft:miso"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "tofucraft:goheimochi"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_item",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"tofucraft:goheimochi"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_item": {
"conditions": {
"items": [
{
"items": [
"tofucraft:tofuishi"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "tofucraft:smelting_tofusteak"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_item",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"tofucraft:smelting_tofusteak"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_item": {
"conditions": {
"items": [
{
"items": [
"tofucraft:tofuishi"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "tofucraft:smoking_tofusteak"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_item",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"tofucraft:smoking_tofusteak"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "minecraft:campfire_cooking",
"cookingtime": 600,
"experience": 0.1,
"ingredient": {
"item": "tofucraft:tofuishi"
},
"result": "tofucraft:tofusteak"
}
20 changes: 20 additions & 0 deletions src/generated/resources/data/tofucraft/recipes/crimson_soup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "tofucraft:seeds_soybeans_nether"
},
{
"item": "tofucraft:seeds_soybeans_nether"
},
{
"item": "minecraft:crimson_fungus"
},
{
"item": "minecraft:bowl"
}
],
"result": {
"item": "tofucraft:crimson_soup"
}
}
22 changes: 22 additions & 0 deletions src/generated/resources/data/tofucraft/recipes/goheimochi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"key": {
"#": {
"item": "tofucraft:onigiri"
},
"M": {
"item": "tofucraft:miso"
},
"S": {
"item": "minecraft:stick"
}
},
"pattern": [
"#",
"M",
"S"
],
"result": {
"item": "tofucraft:goheimochi"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "minecraft:smelting",
"cookingtime": 200,
"experience": 0.1,
"ingredient": {
"item": "tofucraft:tofuishi"
},
"result": "tofucraft:tofusteak"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "minecraft:smoking",
"cookingtime": 100,
"experience": 0.1,
"ingredient": {
"item": "tofucraft:tofuishi"
},
"result": "tofucraft:tofusteak"
}
17 changes: 17 additions & 0 deletions src/main/java/baguchan/tofucraft/data/CraftingGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ protected void buildCraftingRecipes(Consumer<FinishedRecipe> consumer) {
.requires(Items.BOWL)
.unlockedBy("has_item", has(TofuItems.TOFUFRIED_POUCH.get()))
.save(consumer);
foodCooking(TofuItems.TOFUISHI, TofuItems.TOFU_STEAK, 0.1F, consumer);
ShapelessRecipeBuilder.shapeless(TofuItems.TOFU_MINCED.get(), 1)
.requires(TofuItems.TOFUMOMEN.get())
.requires(TofuItems.ROLLINGPIN.get())
Expand Down Expand Up @@ -507,6 +508,13 @@ protected void buildCraftingRecipes(Consumer<FinishedRecipe> consumer) {
.requires(TofuTags.Items.RICE)
.unlockedBy("has_item", has(TofuItems.KINAKO.get()))
.save(consumer);

ShapelessRecipeBuilder.shapeless(TofuItems.CRIMSON_SOUP.get(), 1)
.requires(TofuItems.SEEDS_SOYBEANS_NETHER.get(), 2)
.requires(Items.CRIMSON_FUNGUS)
.requires(Items.BOWL)
.unlockedBy("has_item", has(TofuItems.SEEDS_SOYBEANS_NETHER.get()))
.save(consumer);
ShapelessRecipeBuilder.shapeless(TofuItems.ZUNDA_MOCHI.get(), 1)
.requires(TofuItems.ZUNDA.get())
.requires(TofuTags.Items.RICE)
Expand Down Expand Up @@ -559,6 +567,15 @@ protected void buildCraftingRecipes(Consumer<FinishedRecipe> consumer) {
.requires(TofuItems.LEEK.get())
.unlockedBy("has_item", has(TofuItems.TOFU_MINCED.get()))
.save(consumer);
ShapedRecipeBuilder.shaped(TofuItems.GOHEIMOCHI.get())
.pattern("#")
.pattern("M")
.pattern("S")
.define('#', TofuItems.ONIGIRI.get())
.define('M', TofuItems.MISO.get())
.define('S', Items.STICK)
.unlockedBy("has_item", has(TofuItems.MISO.get()))
.save(consumer);

ShapelessRecipeBuilder.shapeless(TofuItems.SOY_CHOCOLATE.get(), 6)
.requires(TofuItems.BUCKET_SOYMILK.get())
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/baguchan/tofucraft/data/ItemModelGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ protected void registerModels() {
singleTex(TofuItems.TOFUFRIED.get());
singleTex(TofuItems.TOFUFRIED_POUCH.get());
singleTex(TofuItems.AGEDASHI_TOFU.get());
singleTex(TofuItems.TOFU_STEAK.get());
singleTex(TofuItems.TOFU_MINCED.get());

singleTex(TofuItems.BITTERN_BOTTLE.get());
Expand Down Expand Up @@ -209,6 +210,7 @@ protected void registerModels() {
singleTex(TofuItems.SOUL_MANJU.get());

singleTex(TofuItems.KINAKO_MOCHI.get());
singleTex(TofuItems.CRIMSON_SOUP.get());
singleTex(TofuItems.ZUNDA_MOCHI.get());

singleTex(TofuItems.ONIGIRI.get());
Expand All @@ -220,6 +222,7 @@ protected void registerModels() {
singleTex(TofuItems.RICE_NATTO_LEEK.get());
singleTex(TofuItems.RICE_TOFU.get());
singleTex(TofuItems.RICE_SOBORO_TOFU.get());
singleTex(TofuItems.GOHEIMOCHI.get());

singleTex(TofuItems.SOY_CHOCOLATE.get());
singleTex(TofuItems.TOFUNIAN_SOY_CHOCOLATE.get());
Expand Down
22 changes: 22 additions & 0 deletions src/main/java/baguchan/tofucraft/item/StickFoodItem.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package baguchan.tofucraft.item;

import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.Level;

public class StickFoodItem extends Item {
public StickFoodItem(Item.Properties properties) {
super(properties);
}

@Override
public ItemStack finishUsingItem(ItemStack p_41409_, Level p_41410_, LivingEntity p_41411_) {
if (this.isEdible()) {
p_41411_.eat(p_41410_, p_41409_);
return new ItemStack(Items.STICK);
}
return super.finishUsingItem(p_41409_, p_41410_, p_41411_);
}
}
Loading

0 comments on commit e2f53f6

Please sign in to comment.