diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/compat/patchouli/BrewingKegProcessor.java b/src/main/java/com/megatrex4/ukrainian_dlight/compat/patchouli/BrewingKegProcessor.java deleted file mode 100644 index cb5c08f..0000000 --- a/src/main/java/com/megatrex4/ukrainian_dlight/compat/patchouli/BrewingKegProcessor.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.megatrex4.ukrainian_dlight.compat.patchouli; - -import com.megatrex4.ukrainian_dlight.UkrainianDelight; -import com.megatrex4.ukrainian_dlight.recipe.BrewingRecipe; -import net.minecraft.util.Identifier; -import net.minecraft.world.World; -import vazkii.patchouli.api.IComponentProcessor; -import vazkii.patchouli.api.IVariable; -import vazkii.patchouli.api.IVariableProvider; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class BrewingKegProcessor implements IComponentProcessor { - - public static final Logger LOGGER = LoggerFactory.getLogger(UkrainianDelight.MOD_ID); - private BrewingRecipe recipe; - - @Override - public void setup(World world, IVariableProvider variables) { - String recipeId = variables.get("recipe").asString(); - LOGGER.info("Ukrainian Delight: Recipe ID " + recipeId); - this.recipe = (BrewingRecipe) world.getRecipeManager().get(new Identifier(recipeId)) - .orElseThrow(() -> new IllegalArgumentException("Recipe not found: " + recipeId)); - } - - @Override - public IVariable process(World world, String key) { - switch (key) { - case "waterAmount": - return IVariable.wrap(recipe.getWaterAmount()); - case "input0": - case "input1": - case "input2": - case "input3": - case "input4": - case "input5": - int index = Integer.parseInt(key.substring(5)) - 1; - return IVariable.from(recipe.getIngredients().get(index).getMatchingStacks()[0]); - case "container": - return IVariable.from(recipe.getContainer()); - case "output": - return IVariable.from(recipe.getOutput(world.getRegistryManager())); - case "water": - // Assuming `waterAmount` represents the amount of water - return IVariable.wrap(recipe.getWaterAmount()); - case "brewingTime": - return IVariable.wrap(recipe.getBrewingTime()); - case "text": - return IVariable.wrap("This is how you use the BrewingKeg to create various beverages. $(br) The input items and container are required for the process, and the result will be displayed as the output item."); - default: - return null; - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/ukrainian_delight/patchouli_books/ukrainian_guide/en_us/entries/brewing_keg_entry.json b/src/main/resources/assets/ukrainian_delight/patchouli_books/ukrainian_guide/en_us/entries/brewing_keg_entry.json index c4a1d30..7e444e5 100644 --- a/src/main/resources/assets/ukrainian_delight/patchouli_books/ukrainian_guide/en_us/entries/brewing_keg_entry.json +++ b/src/main/resources/assets/ukrainian_delight/patchouli_books/ukrainian_guide/en_us/entries/brewing_keg_entry.json @@ -16,8 +16,6 @@ "input5": "minecraft:wheat", "container": "minecraft:glass_bottle", "output": "ukrainian_delight:wine_bottle", - "waterAmount": 500, - "brewingTime": 200, "text": "This is how you use the BrewingKeg to create various beverages. $(br) The input items and container are required for the process, and the result will be displayed as the output item." } ] diff --git a/src/main/resources/assets/ukrainian_delight/patchouli_books/ukrainian_guide/en_us/templates/brewing_keg.json b/src/main/resources/assets/ukrainian_delight/patchouli_books/ukrainian_guide/en_us/templates/brewing_keg.json index 2d4f6b1..bfa3ef2 100644 --- a/src/main/resources/assets/ukrainian_delight/patchouli_books/ukrainian_guide/en_us/templates/brewing_keg.json +++ b/src/main/resources/assets/ukrainian_delight/patchouli_books/ukrainian_guide/en_us/templates/brewing_keg.json @@ -1,36 +1,13 @@ { - "processor": "com.megatrex4.ukrainian_dlight.compat.patchouli.BrewingKegProcessor", - "include": [ - { - "template": "ukrainian_delight:brewing_keg", - "as": "brew", - "using": { - "input0": "#input0", - "input1": "#input1", - "input2": "#input2", - "input3": "#input3", - "input4": "#input4", - "input5": "#input5", - "container": "#container", - "output": "#output", - "water": "#water", - "waterAmount": "#waterAmount", - "brewingTime": "#brewingTime", - "text": "#text" - }, - "x": 20, - "y": 20 - } - ], "components": [ { "type": "patchouli:image", "image": "ukrainian_delight:textures/gui/patchouli/brewing_keg.png", "width": 256, "height": 64, - "texture_height": 16, + "texture_height": 64, "scale": 0.65, - "u": 20 + "u": 40 }, { "type": "patchouli:item", @@ -80,22 +57,6 @@ "x": 180, "y": 60 }, - { - "type": "patchouli:item", - "item": "#water", - "x": 220, - "y": 60 - }, - { - "type": "patchouli:tooltip", - "tooltip": [ - "Water Amount: #waterAmount mB" - ], - "width": 100, - "height": 20, - "x": 140, - "y": 20 - }, { "type": "patchouli:separator", "y": 100 diff --git a/src/main/resources/data/ukrainian_delight/recipes/brewing/brewpoop.json b/src/main/resources/data/ukrainian_delight/recipes/brewing/brewpoop.json index b9bb0f4..9821947 100644 --- a/src/main/resources/data/ukrainian_delight/recipes/brewing/brewpoop.json +++ b/src/main/resources/data/ukrainian_delight/recipes/brewing/brewpoop.json @@ -1,4 +1,5 @@ { + "type": "ukrainian_delight:brewing", "container": { "item": "minecraft:glass_bottle" }, diff --git a/src/main/resources/data/ukrainian_delight/recipes/brewing/brewpotion.json b/src/main/resources/data/ukrainian_delight/recipes/brewing/brewpotion.json index 7bacb9b..43dd68f 100644 --- a/src/main/resources/data/ukrainian_delight/recipes/brewing/brewpotion.json +++ b/src/main/resources/data/ukrainian_delight/recipes/brewing/brewpotion.json @@ -1,4 +1,5 @@ { + "type": "ukrainian_delight:brewing", "container": { "item": "ukrainian_delight:wine_bottle" }, @@ -9,6 +10,18 @@ { "item": "minecraft:nether_wart" }, + { + "item": "minecraft:carrot" + }, + { + "item": "minecraft:carrot" + }, + { + "item": "minecraft:carrot" + }, + { + "item": "minecraft:carrot" + }, { "item": "minecraft:carrot" }