2021-05-02 00:51:36 +02:00
|
|
|
package de.ellpeck.actuallyadditions.data;
|
|
|
|
|
2021-11-21 22:38:48 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
2021-10-02 18:49:11 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
2022-12-30 01:02:38 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.config.conditions.BoolConfigCondition;
|
2024-03-04 22:37:11 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.crafting.RecipeKeepDataShaped;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.crafting.TargetNBTIngredient;
|
2021-10-02 18:49:11 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.items.ActuallyItems;
|
2024-03-04 21:50:33 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.NoAdvRecipeOutput;
|
2024-03-04 22:37:11 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.RecipeInjector;
|
2024-03-04 20:21:48 +01:00
|
|
|
import net.minecraft.core.registries.BuiltInRegistries;
|
2024-03-03 01:20:53 +01:00
|
|
|
import net.minecraft.data.PackOutput;
|
2024-03-04 21:50:33 +01:00
|
|
|
import net.minecraft.data.recipes.*;
|
2024-03-02 21:23:08 +01:00
|
|
|
import net.minecraft.resources.ResourceLocation;
|
2021-10-05 01:25:33 +02:00
|
|
|
import net.minecraft.tags.ItemTags;
|
2024-03-02 21:23:08 +01:00
|
|
|
import net.minecraft.world.item.Item;
|
|
|
|
import net.minecraft.world.item.ItemStack;
|
|
|
|
import net.minecraft.world.item.Items;
|
2024-03-04 22:37:11 +01:00
|
|
|
import net.minecraft.world.item.crafting.ShapedRecipe;
|
2024-03-02 21:23:08 +01:00
|
|
|
import net.minecraft.world.item.enchantment.Enchantments;
|
|
|
|
import net.minecraft.world.level.ItemLike;
|
2024-03-04 20:21:48 +01:00
|
|
|
import net.neoforged.neoforge.common.Tags;
|
|
|
|
import net.neoforged.neoforge.common.crafting.NBTIngredient;
|
|
|
|
import net.neoforged.neoforge.registries.DeferredItem;
|
2021-05-02 00:51:36 +02:00
|
|
|
|
2023-01-09 00:35:39 +01:00
|
|
|
import javax.annotation.Nonnull;
|
2021-10-02 18:49:11 +02:00
|
|
|
import java.util.Arrays;
|
2021-05-02 00:51:36 +02:00
|
|
|
|
|
|
|
public class ItemRecipeGenerator extends RecipeProvider {
|
2024-03-03 01:20:53 +01:00
|
|
|
public ItemRecipeGenerator(PackOutput packOutput) {
|
|
|
|
super(packOutput);
|
2021-05-02 00:51:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2024-03-03 01:20:53 +01:00
|
|
|
public String getName() {
|
|
|
|
return "Item " + super.getName();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2024-03-04 22:03:46 +01:00
|
|
|
protected void buildRecipes(@Nonnull RecipeOutput output) {
|
2024-03-04 21:50:33 +01:00
|
|
|
var recipeOutput = new NoAdvRecipeOutput(output);
|
|
|
|
|
|
|
|
generatePaxels(recipeOutput);
|
2021-11-13 20:29:59 +01:00
|
|
|
|
2021-10-02 18:49:11 +02:00
|
|
|
//Goggles
|
2021-11-24 17:57:31 +01:00
|
|
|
Recipe.shaped(ActuallyItems.ENGINEERS_GOGGLES.get())
|
2021-10-02 18:49:11 +02:00
|
|
|
.pattern(" R ")
|
|
|
|
.pattern("IGI")
|
|
|
|
.define('R', ActuallyItems.RESTONIA_CRYSTAL.get())
|
|
|
|
.define('I', Items.IRON_BARS)
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('G', Tags.Items.GLASS).save(recipeOutput);
|
2021-10-02 18:49:11 +02:00
|
|
|
|
|
|
|
//Advanced Goggles
|
2021-11-24 17:57:31 +01:00
|
|
|
Recipe.shaped(ActuallyItems.ENGINEERS_GOGGLES_ADVANCED.get())
|
2021-10-02 18:49:11 +02:00
|
|
|
.pattern(" R ")
|
|
|
|
.pattern("IGI")
|
2021-10-14 21:15:16 +02:00
|
|
|
.define('R', ActuallyItems.EMPOWERED_RESTONIA_CRYSTAL.get())
|
2021-10-02 18:49:11 +02:00
|
|
|
.define('I', Items.IRON_BARS)
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('G', ActuallyItems.ENGINEERS_GOGGLES.get()).save(recipeOutput);
|
2021-10-02 18:49:11 +02:00
|
|
|
|
|
|
|
//Laser Upgrades
|
|
|
|
//Invisibility
|
|
|
|
Recipe.shaped(ActuallyItems.LASER_UPGRADE_INVISIBILITY.get(), 4)
|
|
|
|
.pattern("GGG")
|
|
|
|
.pattern("RCR")
|
|
|
|
.pattern("GGG")
|
|
|
|
.define('G', Tags.Items.GLASS_BLACK)
|
|
|
|
.define('R', ActuallyItems.VOID_CRYSTAL.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('C', ActuallyItems.ADVANCED_COIL.get()).save(recipeOutput);
|
2021-10-02 18:49:11 +02:00
|
|
|
|
|
|
|
//Range
|
|
|
|
Recipe.shaped(ActuallyItems.LASER_UPGRADE_RANGE.get(), 2)
|
|
|
|
.pattern("GGC")
|
|
|
|
.pattern("RCR")
|
|
|
|
.pattern("CGG")
|
|
|
|
.define('R', Items.COMPASS)
|
|
|
|
.define('G', ActuallyItems.RESTONIA_CRYSTAL.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('C', ActuallyItems.ADVANCED_COIL.get()).save(recipeOutput);
|
2021-10-02 18:49:11 +02:00
|
|
|
|
|
|
|
//Filling Wand
|
2021-11-24 17:57:31 +01:00
|
|
|
Recipe.shaped(ActuallyItems.HANDHELD_FILLER.get())
|
2021-10-02 18:49:11 +02:00
|
|
|
.pattern("IPI")
|
|
|
|
.pattern("DCD")
|
|
|
|
.pattern(" B ")
|
2021-10-14 21:15:16 +02:00
|
|
|
.define('I', ActuallyItems.EMPOWERED_ENORI_CRYSTAL.get())
|
2021-10-02 18:49:11 +02:00
|
|
|
.define('P', ActuallyItems.PALIS_CRYSTAL.get())
|
2021-11-24 17:57:31 +01:00
|
|
|
.define('C', ActuallyItems.ADVANCED_COIL.get())
|
2021-10-02 18:49:11 +02:00
|
|
|
.define('D', ActuallyItems.DIAMATINE_CRYSTAL.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('B', ActuallyItems.TRIPLE_BATTERY.get()).save(recipeOutput);
|
2021-10-02 18:49:11 +02:00
|
|
|
|
|
|
|
//Bag
|
2021-11-24 17:57:31 +01:00
|
|
|
Recipe.shaped(ActuallyItems.TRAVELERS_SACK.get())
|
2021-10-02 18:49:11 +02:00
|
|
|
.pattern("SLS")
|
|
|
|
.pattern("SCS")
|
|
|
|
.pattern("LVL")
|
|
|
|
.define('S', Tags.Items.STRING)
|
|
|
|
.define('L', Tags.Items.LEATHER)
|
|
|
|
.define('C', Tags.Items.CHESTS_WOODEN)
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('V', ActuallyBlocks.VOID_CRYSTAL.getItem()).save(recipeOutput);
|
2021-10-02 18:49:11 +02:00
|
|
|
|
|
|
|
//Void Bag
|
2021-11-24 17:57:31 +01:00
|
|
|
Recipe.shapeless(ActuallyItems.VOID_SACK.get())
|
|
|
|
.requires(ActuallyItems.TRAVELERS_SACK.get())
|
2021-10-02 18:49:11 +02:00
|
|
|
.requires(Tags.Items.ENDER_PEARLS)
|
|
|
|
.requires(Tags.Items.OBSIDIAN)
|
|
|
|
.requires(ActuallyBlocks.VOID_CRYSTAL.getItem())
|
2024-03-04 21:50:33 +01:00
|
|
|
.save(recipeOutput);
|
2021-10-02 18:49:11 +02:00
|
|
|
|
2021-10-05 01:25:33 +02:00
|
|
|
//Lens
|
|
|
|
Recipe.shaped(ActuallyItems.LENS.get())
|
|
|
|
.pattern("GGG")
|
|
|
|
.pattern("GBG")
|
|
|
|
.pattern("GGG")
|
|
|
|
.define('G', Tags.Items.GLASS)
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('B', ActuallyItems.BLACK_QUARTZ.get()).save(recipeOutput);
|
2021-10-05 01:25:33 +02:00
|
|
|
|
|
|
|
//Booklet
|
|
|
|
Recipe.shapeless(ActuallyItems.ITEM_BOOKLET.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.ingredients(ActuallyItems.CANOLA_SEEDS.get(), Items.PAPER).save(recipeOutput);
|
2021-10-05 01:25:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
//Clearing NBT Storage
|
2024-03-04 21:50:33 +01:00
|
|
|
Recipe.shapeless(ActuallyItems.LASER_WRENCH.get()).ingredients(ActuallyItems.LASER_WRENCH.get()).name(new ResourceLocation(ActuallyAdditions.MODID, "laser_wrench_nbt")).save(recipeOutput);
|
|
|
|
Recipe.shapeless(ActuallyItems.PHANTOM_CONNECTOR.get()).ingredients(ActuallyItems.PHANTOM_CONNECTOR.get()).name(new ResourceLocation(ActuallyAdditions.MODID, "phantom_clearing")).save(recipeOutput);
|
2021-10-05 01:25:33 +02:00
|
|
|
|
|
|
|
//Disenchanting Lens
|
2021-11-24 17:57:31 +01:00
|
|
|
Recipe.shapeless(ActuallyItems.LENS_OF_DISENCHANTING.get())
|
2021-10-05 01:25:33 +02:00
|
|
|
.requires(ActuallyItems.LENS.get())
|
|
|
|
.requires(Items.ENCHANTING_TABLE)
|
2024-03-04 21:50:33 +01:00
|
|
|
.requires(ActuallyItems.EMPOWERED_DIAMATINE_CRYSTAL.get(), 7).save(recipeOutput);
|
2021-10-05 01:25:33 +02:00
|
|
|
|
|
|
|
//Mining Lens
|
2021-11-24 17:57:31 +01:00
|
|
|
Recipe.shaped(ActuallyItems.LENS_OF_THE_MINER.get())
|
2021-10-05 01:25:33 +02:00
|
|
|
.pattern("DGI")
|
|
|
|
.pattern("CLB")
|
|
|
|
.pattern("QPE")
|
|
|
|
.define('D', Tags.Items.GEMS_DIAMOND)
|
|
|
|
.define('G', Tags.Items.INGOTS_GOLD)
|
|
|
|
.define('I', Tags.Items.INGOTS_IRON)
|
|
|
|
.define('C', ItemTags.COALS)
|
|
|
|
.define('L', ActuallyItems.LENS.get())
|
|
|
|
.define('B', ActuallyItems.BLACK_QUARTZ.get())
|
|
|
|
.define('Q', Tags.Items.GEMS_QUARTZ)
|
|
|
|
.define('P', Tags.Items.GEMS_LAPIS)
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('E', Tags.Items.GEMS_EMERALD).save(recipeOutput);
|
2021-10-05 01:25:33 +02:00
|
|
|
|
|
|
|
//Killer Lens
|
|
|
|
ItemStack enchantedBook = new ItemStack(Items.ENCHANTED_BOOK);
|
|
|
|
enchantedBook.enchant(Enchantments.SHARPNESS, 5);
|
2021-11-24 17:57:31 +01:00
|
|
|
Recipe.shapeless(ActuallyItems.LENS_OF_THE_KILLER.get())
|
2021-10-05 01:25:33 +02:00
|
|
|
.requires(Items.DIAMOND_SWORD)
|
2021-11-24 17:57:31 +01:00
|
|
|
.requires(ActuallyItems.LENS_OF_CERTAIN_DEATH.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.requires(NBTIngredient.of(true, enchantedBook)).save(recipeOutput);
|
2021-10-05 01:25:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
//Filter
|
|
|
|
Recipe.shaped(ActuallyItems.FILTER.get())
|
|
|
|
.pattern("III")
|
|
|
|
.pattern("IQI")
|
|
|
|
.pattern("III")
|
|
|
|
.define('I', Items.IRON_BARS)
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('Q', ActuallyItems.BLACK_QUARTZ.get()).save(recipeOutput);
|
2021-10-05 01:25:33 +02:00
|
|
|
|
|
|
|
//Crate Keeper
|
|
|
|
Recipe.shaped(ActuallyItems.CRATE_KEEPER.get())
|
|
|
|
.pattern("WIW")
|
|
|
|
.pattern("IQI")
|
|
|
|
.pattern("WIW")
|
|
|
|
.define('I', Tags.Items.INGOTS_IRON)
|
|
|
|
.define('W', ItemTags.PLANKS)
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('Q', ActuallyItems.BLACK_QUARTZ.get()).save(recipeOutput);
|
2021-10-05 01:25:33 +02:00
|
|
|
|
|
|
|
//Laser Wrench
|
|
|
|
Recipe.shaped(ActuallyItems.LASER_WRENCH.get())
|
|
|
|
.pattern("C ")
|
|
|
|
.pattern(" S ")
|
|
|
|
.pattern(" S")
|
2021-11-24 17:57:31 +01:00
|
|
|
.define('C', ActuallyItems.ADVANCED_COIL.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('S', ActuallyItems.ENORI_CRYSTAL.get()).save(recipeOutput);
|
2021-10-05 01:25:33 +02:00
|
|
|
|
|
|
|
|
2021-11-14 00:20:29 +01:00
|
|
|
/* //Rice Recipes
|
2021-10-05 01:25:33 +02:00
|
|
|
Recipe.shaped(Items.PAPER, 3)
|
|
|
|
.pattern("R ")
|
|
|
|
.pattern(" R ")
|
|
|
|
.pattern(" R")
|
2021-11-14 00:20:29 +01:00
|
|
|
.define('R', TheFoods.RICE).save(consumer); //TODO foods need worked on still.*/
|
2021-10-05 01:25:33 +02:00
|
|
|
|
2021-11-24 17:57:31 +01:00
|
|
|
Recipe.shaped(ActuallyItems.RICE_SLIMEBALL.get())
|
2021-11-21 22:38:48 +01:00
|
|
|
.requiresBook()
|
2021-10-05 01:25:33 +02:00
|
|
|
.pattern(" R ")
|
|
|
|
.pattern("RBR")
|
|
|
|
.pattern(" R ")
|
|
|
|
.define('R', ActuallyItems.RICE_DOUGH.get())
|
2021-11-21 22:38:48 +01:00
|
|
|
.define('B', Items.WATER_BUCKET)
|
2024-03-04 21:50:33 +01:00
|
|
|
.save(recipeOutput, new ResourceLocation(ActuallyAdditions.MODID, "rice_slime"));
|
2021-10-05 01:25:33 +02:00
|
|
|
|
2021-11-24 17:57:31 +01:00
|
|
|
Recipe.shaped(ActuallyItems.RICE_SLIMEBALL.get())
|
2021-11-21 22:38:48 +01:00
|
|
|
.requiresBook()
|
2021-10-05 01:25:33 +02:00
|
|
|
.pattern(" R ")
|
|
|
|
.pattern("RBR")
|
|
|
|
.pattern(" R ")
|
|
|
|
.define('R', ActuallyItems.RICE_DOUGH.get())
|
2021-11-21 22:38:48 +01:00
|
|
|
.define('B', Items.POTION)
|
2024-03-04 21:50:33 +01:00
|
|
|
.save(recipeOutput, new ResourceLocation(ActuallyAdditions.MODID, "rice_slime_potion"));
|
2021-10-05 01:25:33 +02:00
|
|
|
|
|
|
|
//Leaf Blower
|
|
|
|
Recipe.shaped(ActuallyItems.LEAF_BLOWER.get())
|
|
|
|
.pattern(" F")
|
|
|
|
.pattern("IP")
|
|
|
|
.pattern("IC")
|
|
|
|
.define('I', ActuallyItems.ENORI_CRYSTAL.get())
|
|
|
|
.define('P', Items.PISTON)
|
|
|
|
.define('F', Items.FLINT)
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('C', ActuallyItems.ADVANCED_COIL.get()).save(recipeOutput);
|
2021-10-05 01:25:33 +02:00
|
|
|
|
2022-12-30 23:37:16 +01:00
|
|
|
//Advanced Leaf Blower
|
|
|
|
Recipe.shaped(ActuallyItems.ADVANCED_LEAF_BLOWER.get()).pattern(" F", "DP", "DC")
|
|
|
|
.define('F', Items.FLINT)
|
|
|
|
.define('D', ActuallyItems.DIAMATINE_CRYSTAL.get())
|
|
|
|
.define('P', Items.PISTON)
|
|
|
|
.define('C', ActuallyItems.ADVANCED_COIL.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.save(recipeOutput);
|
2022-12-30 23:37:16 +01:00
|
|
|
|
2021-11-25 21:27:45 +01:00
|
|
|
//Drill //TODO the rest of the coloring recipes
|
|
|
|
Recipe.shaped(ActuallyItems.DRILL_MAIN.get())
|
2021-10-05 01:25:33 +02:00
|
|
|
.pattern("DDD")
|
|
|
|
.pattern("CRC")
|
|
|
|
.pattern("III")
|
|
|
|
.define('D', Tags.Items.GEMS_DIAMOND)
|
2021-11-24 17:57:31 +01:00
|
|
|
.define('C', ActuallyItems.ADVANCED_COIL.get())
|
2021-10-05 01:25:33 +02:00
|
|
|
.define('R', ActuallyItems.DRILL_CORE.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('I', ActuallyItems.ENORI_CRYSTAL.get()).save(recipeOutput);
|
2021-10-05 01:25:33 +02:00
|
|
|
|
|
|
|
//Drill Core
|
|
|
|
Recipe.shaped(ActuallyItems.DRILL_CORE.get())
|
|
|
|
.pattern("ICI")
|
|
|
|
.pattern("CRC")
|
|
|
|
.pattern("ICI")
|
2021-11-24 17:57:31 +01:00
|
|
|
.define('C', ActuallyItems.BASIC_COIL.get())
|
2021-10-05 01:25:33 +02:00
|
|
|
.define('R', ActuallyItems.RESTONIA_CRYSTAL.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('I', ActuallyItems.ENORI_CRYSTAL.get()).save(recipeOutput);
|
2021-10-05 01:25:33 +02:00
|
|
|
|
2021-10-07 00:18:02 +02:00
|
|
|
//Tele Staff
|
2021-11-24 17:57:31 +01:00
|
|
|
Recipe.shaped(ActuallyItems.TELEPORT_STAFF.get())
|
2021-10-07 00:18:02 +02:00
|
|
|
.pattern(" FE")
|
|
|
|
.pattern(" S ")
|
|
|
|
.pattern("SB ")
|
2021-10-14 21:15:16 +02:00
|
|
|
.define('F', ActuallyItems.EMPOWERED_DIAMATINE_CRYSTAL.get())
|
2022-04-23 19:49:25 +02:00
|
|
|
.define('E', Tags.Items.ENDER_PEARLS)
|
2021-10-07 00:18:02 +02:00
|
|
|
.define('S', ActuallyBlocks.ENDER_CASING.getItem())
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('B', ActuallyItems.SINGLE_BATTERY.get()).save(recipeOutput);
|
2021-10-07 00:18:02 +02:00
|
|
|
|
|
|
|
//Drill Speed upgrade
|
|
|
|
Recipe.shaped(ActuallyItems.DRILL_UPGRADE_SPEED.get())
|
|
|
|
.pattern("ISI")
|
|
|
|
.pattern("SRS")
|
|
|
|
.pattern("ISI")
|
|
|
|
.define('I', ActuallyItems.ENORI_CRYSTAL.get())
|
|
|
|
.define('S', Items.SUGAR)
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('R', ActuallyItems.RESTONIA_CRYSTAL.get()).save(recipeOutput);
|
2021-10-07 00:18:02 +02:00
|
|
|
|
|
|
|
//Drill Speed upgrade II
|
|
|
|
Recipe.shaped(ActuallyItems.DRILL_UPGRADE_SPEED_II.get())
|
|
|
|
.pattern("ISI")
|
|
|
|
.pattern("SRS")
|
|
|
|
.pattern("ISI")
|
|
|
|
.define('I', ActuallyItems.ENORI_CRYSTAL.get())
|
|
|
|
.define('S', Items.SUGAR)
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('R', Items.CAKE).save(recipeOutput);
|
2021-10-07 00:18:02 +02:00
|
|
|
|
|
|
|
//Drill Speed upgrade III
|
|
|
|
Recipe.shaped(ActuallyItems.DRILL_UPGRADE_SPEED_III.get())
|
|
|
|
.pattern("ISI")
|
|
|
|
.pattern("SRS")
|
|
|
|
.pattern("ISI")
|
2021-10-14 21:15:16 +02:00
|
|
|
.define('I', ActuallyItems.EMPOWERED_ENORI_CRYSTAL.get())
|
2021-10-07 00:18:02 +02:00
|
|
|
.define('S', Items.SUGAR)
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('R', ActuallyItems.EMPOWERED_DIAMATINE_CRYSTAL.get()).save(recipeOutput);
|
2021-10-07 00:18:02 +02:00
|
|
|
|
|
|
|
//Drill Fortune upgrade
|
|
|
|
Recipe.shaped(ActuallyItems.DRILL_UPGRADE_FORTUNE.get())
|
|
|
|
.pattern("ISI")
|
|
|
|
.pattern("SRS")
|
|
|
|
.pattern("ISI")
|
|
|
|
.define('I', Items.GLOWSTONE)
|
|
|
|
.define('S', Tags.Items.DUSTS_REDSTONE)
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('R', ActuallyBlocks.EMPOWERED_DIAMATINE_CRYSTAL.getItem()).save(recipeOutput);
|
2021-10-07 00:18:02 +02:00
|
|
|
|
|
|
|
//Drill Fortune upgrade II
|
|
|
|
Recipe.shaped(ActuallyItems.DRILL_UPGRADE_FORTUNE_II.get())
|
|
|
|
.pattern("ISI")
|
|
|
|
.pattern("SRS")
|
|
|
|
.pattern("ISI")
|
|
|
|
.define('I', Items.GLOWSTONE)
|
2021-10-14 21:15:16 +02:00
|
|
|
.define('S', ActuallyItems.EMPOWERED_RESTONIA_CRYSTAL.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('R', ActuallyBlocks.ENDER_CASING.getItem()).save(recipeOutput);
|
2021-10-07 00:18:02 +02:00
|
|
|
|
|
|
|
//3x3
|
|
|
|
Recipe.shaped(ActuallyItems.DRILL_UPGRADE_THREE_BY_THREE.get())
|
|
|
|
.pattern("DID")
|
|
|
|
.pattern("ICI")
|
|
|
|
.pattern("DID")
|
|
|
|
.define('I', ActuallyItems.ENORI_CRYSTAL.get())
|
|
|
|
.define('D', ActuallyItems.DIAMATINE_CRYSTAL.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('C', ActuallyItems.BASIC_COIL.get()).save(recipeOutput);
|
2021-10-07 00:18:02 +02:00
|
|
|
|
|
|
|
//5x5
|
|
|
|
Recipe.shaped(ActuallyItems.DRILL_UPGRADE_FIVE_BY_FIVE.get())
|
|
|
|
.pattern("DID")
|
|
|
|
.pattern("ICI")
|
|
|
|
.pattern("DID")
|
2021-10-14 21:15:16 +02:00
|
|
|
.define('I', ActuallyItems.EMPOWERED_ENORI_CRYSTAL.get())
|
2021-10-07 00:18:02 +02:00
|
|
|
.define('D', ActuallyItems.DIAMATINE_CRYSTAL.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('C', ActuallyItems.ADVANCED_COIL.get()).save(recipeOutput);
|
2021-10-07 00:18:02 +02:00
|
|
|
|
|
|
|
//Silk Touch
|
|
|
|
Recipe.shaped(ActuallyItems.DRILL_UPGRADE_SILK_TOUCH.get())
|
|
|
|
.pattern("DSD")
|
|
|
|
.pattern("SCS")
|
|
|
|
.pattern("DSD")
|
|
|
|
.define('D', ActuallyItems.EMERADIC_CRYSTAL.get())
|
|
|
|
.define('S', ActuallyItems.DIAMATINE_CRYSTAL.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('C', ActuallyItems.ADVANCED_COIL.get()).save(recipeOutput);
|
2021-10-07 00:18:02 +02:00
|
|
|
|
|
|
|
//Placing
|
2021-11-21 22:38:48 +01:00
|
|
|
Recipe.shaped(ActuallyItems.DRILL_UPGRADE_BLOCK_PLACING.get())
|
2021-10-07 00:18:02 +02:00
|
|
|
.pattern("CEC")
|
|
|
|
.pattern("RAR")
|
|
|
|
.pattern("CEC")
|
|
|
|
.define('C', Tags.Items.COBBLESTONE)
|
|
|
|
.define('E', Items.PAPER)
|
2021-11-24 17:57:31 +01:00
|
|
|
.define('A', ActuallyItems.BASIC_COIL.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('R', ActuallyItems.ENORI_CRYSTAL.get()).save(recipeOutput);
|
2021-10-07 00:18:02 +02:00
|
|
|
|
|
|
|
//Bat Wings
|
|
|
|
Recipe.shaped(ActuallyItems.WINGS_OF_THE_BATS.get())
|
|
|
|
.pattern("WNW")
|
|
|
|
.pattern("WDW")
|
|
|
|
.pattern("WNW")
|
2021-11-24 17:57:31 +01:00
|
|
|
.define('W', ActuallyItems.BATS_WING.get())
|
2021-10-07 00:18:02 +02:00
|
|
|
.define('N', ActuallyBlocks.DIAMATINE_CRYSTAL.getItem())
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('D', ActuallyItems.ENDER_STAR.get()).save(recipeOutput);
|
2021-10-07 00:18:02 +02:00
|
|
|
|
|
|
|
//Coil
|
2021-11-24 17:57:31 +01:00
|
|
|
Recipe.shaped(ActuallyItems.BASIC_COIL.get())
|
2021-10-07 00:18:02 +02:00
|
|
|
.pattern(" R ")
|
|
|
|
.pattern("RIR")
|
|
|
|
.pattern(" R ")
|
|
|
|
.define('I', ActuallyItems.BLACK_QUARTZ.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('R', ActuallyItems.RESTONIA_CRYSTAL.get()).save(recipeOutput);
|
2021-10-07 00:18:02 +02:00
|
|
|
|
|
|
|
//Advanced Coil
|
2021-11-24 17:57:31 +01:00
|
|
|
Recipe.shaped(ActuallyItems.ADVANCED_COIL.get())
|
2021-10-07 00:18:02 +02:00
|
|
|
.pattern("GGG")
|
|
|
|
.pattern("GCG")
|
|
|
|
.pattern("GGG")
|
2021-11-24 17:57:31 +01:00
|
|
|
.define('C', ActuallyItems.BASIC_COIL.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.define('G', Items.GOLD_NUGGET).save(recipeOutput);
|
2021-10-02 18:49:11 +02:00
|
|
|
|
2021-10-12 23:26:43 +02:00
|
|
|
//Battery
|
2021-11-24 17:57:31 +01:00
|
|
|
Recipe.shaped(ActuallyItems.SINGLE_BATTERY.get())
|
2021-10-12 23:26:43 +02:00
|
|
|
.pattern(" R ")
|
|
|
|
.pattern("ICI")
|
|
|
|
.pattern("III")
|
|
|
|
.define('R', ActuallyItems.RESTONIA_CRYSTAL.get())
|
|
|
|
.define('I', ActuallyItems.ENORI_CRYSTAL.get())
|
2021-11-24 17:57:31 +01:00
|
|
|
.define('C', ActuallyItems.ADVANCED_COIL.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.save(recipeOutput);
|
2021-10-02 18:49:11 +02:00
|
|
|
|
2024-03-04 22:37:11 +01:00
|
|
|
//Double Battery
|
|
|
|
Recipe.shaped(ActuallyItems.DOUBLE_BATTERY.get())
|
|
|
|
.pattern(" R ")
|
|
|
|
.pattern("ICI")
|
|
|
|
.pattern("III")
|
|
|
|
.define('R', TargetNBTIngredient.of(ActuallyItems.SINGLE_BATTERY.get()))
|
|
|
|
.define('I', ActuallyItems.ENORI_CRYSTAL.get())
|
|
|
|
.define('C', ActuallyItems.ADVANCED_COIL.get())
|
|
|
|
.save(new RecipeInjector<ShapedRecipe>(recipeOutput, RecipeKeepDataShaped::new));
|
|
|
|
|
|
|
|
//Triple Battery
|
|
|
|
Recipe.shaped(ActuallyItems.TRIPLE_BATTERY.get())
|
|
|
|
.pattern(" R ")
|
|
|
|
.pattern("ICI")
|
|
|
|
.pattern("III")
|
|
|
|
.define('R', TargetNBTIngredient.of(ActuallyItems.DOUBLE_BATTERY.get()))
|
|
|
|
.define('I', ActuallyItems.EMPOWERED_ENORI_CRYSTAL.get())
|
|
|
|
.define('C', ActuallyItems.ADVANCED_COIL.get())
|
|
|
|
.save(new RecipeInjector<ShapedRecipe>(recipeOutput, RecipeKeepDataShaped::new));
|
|
|
|
|
|
|
|
//Quad Battery
|
|
|
|
Recipe.shaped(ActuallyItems.QUADRUPLE_BATTERY.get())
|
|
|
|
.pattern(" R ")
|
|
|
|
.pattern("ICI")
|
|
|
|
.pattern("III")
|
|
|
|
.define('R', TargetNBTIngredient.of(ActuallyItems.TRIPLE_BATTERY.get()))
|
|
|
|
.define('I', ActuallyItems.EMPOWERED_ENORI_CRYSTAL.get())
|
|
|
|
.define('C', ActuallyItems.ADVANCED_COIL.get())
|
|
|
|
.save(new RecipeInjector<ShapedRecipe>(recipeOutput, RecipeKeepDataShaped::new));
|
|
|
|
|
|
|
|
//Quintuple Battery
|
|
|
|
Recipe.shaped(ActuallyItems.QUINTUPLE_BATTERY.get())
|
|
|
|
.pattern(" R ")
|
|
|
|
.pattern("ICI")
|
|
|
|
.pattern("III")
|
|
|
|
.define('R', TargetNBTIngredient.of(ActuallyItems.QUADRUPLE_BATTERY.get()))
|
|
|
|
.define('I', ActuallyItems.EMPOWERED_DIAMATINE_CRYSTAL.get())
|
|
|
|
.define('C', ActuallyItems.ADVANCED_COIL.get())
|
|
|
|
.save(new RecipeInjector<ShapedRecipe>(recipeOutput, RecipeKeepDataShaped::new));
|
2021-10-02 18:49:11 +02:00
|
|
|
|
2022-12-30 01:02:38 +01:00
|
|
|
//Magnet Ring
|
|
|
|
Recipe.shaped(ActuallyItems.RING_OF_MAGNETIZING.get())
|
|
|
|
.pattern("RIB", "IOI", "BIR")
|
|
|
|
.define('R', ActuallyItems.RESTONIA_CRYSTAL.get())
|
|
|
|
.define('I', ActuallyItems.ENORI_CRYSTAL.get())
|
|
|
|
.define('B', Items.LAPIS_LAZULI)
|
|
|
|
.define('O', ActuallyItems.RING.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.save(recipeOutput);
|
2022-12-30 01:02:38 +01:00
|
|
|
|
2022-12-30 23:37:16 +01:00
|
|
|
//Growth Ring
|
|
|
|
Recipe.shaped(ActuallyItems.RING_OF_GROWTH.get())
|
|
|
|
.pattern("SIS", "IOI", "SIS")
|
|
|
|
.define('S', Tags.Items.SEEDS)
|
|
|
|
.define('I', ActuallyItems.EMPOWERED_ENORI_CRYSTAL.get())
|
|
|
|
.define('O', ActuallyItems.RING.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.save(recipeOutput);
|
2022-12-30 01:02:38 +01:00
|
|
|
|
2024-03-04 21:50:33 +01:00
|
|
|
Recipe.shapeless(ActuallyItems.CRAFTER_ON_A_STICK.get()).requires(Items.CRAFTING_TABLE).requires(ItemTags.SIGNS).save(recipeOutput);
|
2022-12-30 01:02:38 +01:00
|
|
|
|
2024-03-04 21:50:33 +01:00
|
|
|
RecipeOutput boolConsumer = recipeOutput.withConditions(new BoolConfigCondition("tinyCoalStuff"));
|
2024-03-04 20:21:48 +01:00
|
|
|
|
|
|
|
Recipe.shapeless(ActuallyItems.TINY_COAL.get(), 8)
|
|
|
|
.requires(Items.COAL)
|
|
|
|
.save(boolConsumer, new ResourceLocation(ActuallyAdditions.MODID, "coal_to_tiny"));
|
|
|
|
Recipe.shapeless(ActuallyItems.TINY_CHARCOAL.get(), 8)
|
|
|
|
.requires(Items.CHARCOAL).save(boolConsumer, new ResourceLocation(ActuallyAdditions.MODID, "charcoal_to_tiny"));
|
|
|
|
Recipe.shaped(Items.COAL)
|
|
|
|
.pattern("CCC", "C C", "CCC").define('C', ActuallyItems.TINY_COAL.get())
|
|
|
|
.save(boolConsumer, new ResourceLocation(ActuallyAdditions.MODID, "tiny_to_coal"));
|
|
|
|
Recipe.shaped(Items.CHARCOAL)
|
|
|
|
.pattern("CCC", "C C", "CCC").define('C', ActuallyItems.TINY_CHARCOAL.get())
|
|
|
|
.save(boolConsumer, new ResourceLocation(ActuallyAdditions.MODID, "tiny_to_charcoal"));
|
2022-12-30 01:02:38 +01:00
|
|
|
|
|
|
|
//Canola Seeds
|
|
|
|
Recipe.shapeless(ActuallyItems.CANOLA_SEEDS.get())
|
|
|
|
.requires(ActuallyItems.CANOLA.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.save(recipeOutput);
|
2022-12-30 01:02:38 +01:00
|
|
|
|
|
|
|
//Rice Seeds
|
|
|
|
Recipe.shapeless(ActuallyItems.RICE_SEEDS.get())
|
|
|
|
.requires(ActuallyItems.RICE.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.save(recipeOutput);
|
2022-12-30 01:02:38 +01:00
|
|
|
|
2024-03-07 01:38:50 +01:00
|
|
|
//Rice Dough
|
|
|
|
Recipe.shapeless(ActuallyItems.RICE_DOUGH.get(), 2)
|
|
|
|
.requires(ActuallyItems.RICE.get(), 3)
|
|
|
|
.save(recipeOutput);
|
|
|
|
|
|
|
|
//Ring, glow stone dust in the middle, iron in the corners, gold in the cardinals.
|
|
|
|
Recipe.shaped(ActuallyItems.RING)
|
|
|
|
.pattern("IGI", "GDG", "IGI")
|
|
|
|
.define('I', Tags.Items.INGOTS_IRON)
|
|
|
|
.define('G', Tags.Items.INGOTS_GOLD)
|
|
|
|
.define('D', Tags.Items.DUSTS_GLOWSTONE)
|
|
|
|
.save(recipeOutput);
|
|
|
|
|
2022-12-30 23:37:16 +01:00
|
|
|
//Cup
|
|
|
|
Recipe.shaped(ActuallyItems.EMPTY_CUP.get())
|
|
|
|
.pattern("S S", "SCS", "SSS")
|
|
|
|
.define('S', Tags.Items.STONE)
|
|
|
|
.define('C', ActuallyItems.COFFEE_BEANS.get())
|
2024-03-04 21:50:33 +01:00
|
|
|
.save(recipeOutput);
|
2022-12-30 23:37:16 +01:00
|
|
|
|
|
|
|
//Phantom Connector
|
|
|
|
Recipe.shaped(ActuallyItems.PHANTOM_CONNECTOR.get())
|
|
|
|
.pattern("YE", "EY", "S ")
|
|
|
|
.define('Y', Items.ENDER_EYE)
|
|
|
|
.define('E', Tags.Items.ENDER_PEARLS)
|
|
|
|
.define('S', Tags.Items.RODS_WOODEN)
|
2024-03-04 21:50:33 +01:00
|
|
|
.save(recipeOutput);
|
2021-11-13 20:29:59 +01:00
|
|
|
|
2022-12-30 23:37:16 +01:00
|
|
|
//Player Probe
|
|
|
|
Recipe.shaped(ActuallyItems.PLAYER_PROBE.get())
|
|
|
|
.pattern("A A", "AIA", "RHR")
|
|
|
|
.define('A', Items.IRON_BARS)
|
|
|
|
.define('R', ActuallyItems.EMPOWERED_RESTONIA_CRYSTAL.get())
|
|
|
|
.define('H', Items.WITHER_SKELETON_SKULL)
|
|
|
|
.define('I', Items.IRON_HELMET)
|
2024-03-04 21:50:33 +01:00
|
|
|
.save(recipeOutput);
|
2021-11-13 20:29:59 +01:00
|
|
|
|
2023-01-09 00:35:39 +01:00
|
|
|
//Shards
|
2024-03-04 21:50:33 +01:00
|
|
|
addShard(recipeOutput, ActuallyItems.VOID_CRYSTAL_SHARD, ActuallyItems.VOID_CRYSTAL);
|
|
|
|
addShard(recipeOutput, ActuallyItems.ENORI_CRYSTAL_SHARD, ActuallyItems.ENORI_CRYSTAL);
|
|
|
|
addShard(recipeOutput, ActuallyItems.RESTONIA_CRYSTAL_SHARD, ActuallyItems.RESTONIA_CRYSTAL);
|
|
|
|
addShard(recipeOutput, ActuallyItems.PALIS_CRYSTAL_SHARD, ActuallyItems.PALIS_CRYSTAL);
|
|
|
|
addShard(recipeOutput, ActuallyItems.DIAMATINE_CRYSTAL_SHARD, ActuallyItems.DIAMATINE_CRYSTAL);
|
|
|
|
addShard(recipeOutput, ActuallyItems.EMERADIC_CRYSTAL_SHARD, ActuallyItems.EMERADIC_CRYSTAL);
|
2023-01-09 00:35:39 +01:00
|
|
|
|
2024-03-07 02:30:59 +01:00
|
|
|
//Crystal Blocks
|
|
|
|
addCrystalBlock(recipeOutput, ActuallyBlocks.VOID_CRYSTAL.getItem(), ActuallyItems.VOID_CRYSTAL);
|
|
|
|
addCrystalBlock(recipeOutput, ActuallyBlocks.ENORI_CRYSTAL.getItem(), ActuallyItems.ENORI_CRYSTAL);
|
|
|
|
addCrystalBlock(recipeOutput, ActuallyBlocks.RESTONIA_CRYSTAL.getItem(), ActuallyItems.RESTONIA_CRYSTAL);
|
|
|
|
addCrystalBlock(recipeOutput, ActuallyBlocks.PALIS_CRYSTAL.getItem(), ActuallyItems.PALIS_CRYSTAL);
|
|
|
|
addCrystalBlock(recipeOutput, ActuallyBlocks.DIAMATINE_CRYSTAL.getItem(), ActuallyItems.DIAMATINE_CRYSTAL);
|
|
|
|
addCrystalBlock(recipeOutput, ActuallyBlocks.EMERADIC_CRYSTAL.getItem(), ActuallyItems.EMERADIC_CRYSTAL);
|
|
|
|
|
2023-01-09 00:35:39 +01:00
|
|
|
|
2021-10-05 01:25:33 +02:00
|
|
|
// //Quartz
|
|
|
|
// GameRegistry.addSmelting(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F);
|
2022-12-30 01:02:38 +01:00
|
|
|
|
2021-10-05 01:25:33 +02:00
|
|
|
// //Ingots from Dusts
|
|
|
|
// GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.IRON.ordinal()), new ItemStack(Items.IRON_INGOT), 1F);
|
|
|
|
// GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.GOLD.ordinal()), new ItemStack(Items.GOLD_INGOT), 1F);
|
|
|
|
// GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.DIAMOND.ordinal()), new ItemStack(Items.DIAMOND), 1F);
|
|
|
|
// GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.EMERALD.ordinal()), new ItemStack(Items.EMERALD), 1F);
|
|
|
|
// GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.LAPIS.ordinal()), new ItemStack(Items.DYE, 1, 4), 1F);
|
|
|
|
// GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.QUARTZ_BLACK.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F);
|
|
|
|
// GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.QUARTZ.ordinal()), new ItemStack(Items.QUARTZ), 1F);
|
|
|
|
// GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.COAL.ordinal()), new ItemStack(Items.COAL), 1F);
|
2021-05-02 00:51:36 +02:00
|
|
|
}
|
|
|
|
|
2024-03-04 20:21:48 +01:00
|
|
|
protected void generatePaxels(RecipeOutput consumer) {
|
2021-11-24 17:57:31 +01:00
|
|
|
addPaxel(consumer, ActuallyItems.WOODEN_AIOT, Items.WOODEN_AXE, Items.WOODEN_PICKAXE, Items.WOODEN_SWORD, Items.WOODEN_SHOVEL, Items.WOODEN_HOE);
|
|
|
|
addPaxel(consumer, ActuallyItems.STONE_AIOT, Items.STONE_AXE, Items.STONE_PICKAXE, Items.STONE_SWORD, Items.STONE_SHOVEL, Items.STONE_HOE);
|
|
|
|
addPaxel(consumer, ActuallyItems.IRON_AIOT, Items.IRON_AXE, Items.IRON_PICKAXE, Items.IRON_SWORD, Items.IRON_SHOVEL, Items.IRON_HOE);
|
|
|
|
addPaxel(consumer, ActuallyItems.GOLD_AIOT, Items.GOLDEN_AXE, Items.GOLDEN_PICKAXE, Items.GOLDEN_SWORD, Items.GOLDEN_SHOVEL, Items.GOLDEN_HOE);
|
|
|
|
addPaxel(consumer, ActuallyItems.DIAMOND_AIOT, Items.DIAMOND_AXE, Items.DIAMOND_PICKAXE, Items.DIAMOND_SWORD, Items.DIAMOND_SHOVEL, Items.DIAMOND_HOE);
|
|
|
|
addPaxel(consumer, ActuallyItems.NETHERITE_AIOT, Items.NETHERITE_AXE, Items.NETHERITE_PICKAXE, Items.NETHERITE_SWORD, Items.NETHERITE_SHOVEL, Items.NETHERITE_HOE);
|
2022-04-11 23:10:47 +02:00
|
|
|
}
|
2021-11-13 20:29:59 +01:00
|
|
|
|
2024-03-04 23:44:24 +01:00
|
|
|
public static void addPaxel(RecipeOutput consumer, DeferredItem<? extends Item> output, Item axe, Item pickaxe, Item sword, Item shovel, Item hoe) {
|
2021-11-13 20:29:59 +01:00
|
|
|
Recipe.shapeless(output.get())
|
|
|
|
.requires(axe)
|
|
|
|
.requires(pickaxe)
|
|
|
|
.requires(sword)
|
|
|
|
.requires(shovel)
|
|
|
|
.requires(hoe)
|
|
|
|
.save(consumer);
|
|
|
|
}
|
|
|
|
|
2024-03-04 23:44:24 +01:00
|
|
|
public static void addPaxel(RecipeOutput consumer, DeferredItem<? extends Item> output, DeferredItem<? extends Item> axe, DeferredItem<? extends Item> pickaxe, DeferredItem<? extends Item> sword, DeferredItem<? extends Item> shovel, DeferredItem<? extends Item> hoe) {
|
2021-11-13 20:29:59 +01:00
|
|
|
Recipe.shapeless(output.get())
|
|
|
|
.requires(axe.get())
|
|
|
|
.requires(pickaxe.get())
|
|
|
|
.requires(sword.get())
|
|
|
|
.requires(shovel.get())
|
|
|
|
.requires(hoe.get())
|
|
|
|
.save(consumer);
|
|
|
|
}
|
|
|
|
|
2024-03-07 02:30:59 +01:00
|
|
|
public static void decompress(RecipeOutput consumer, ItemLike output, ItemLike input) {
|
|
|
|
ResourceLocation key = BuiltInRegistries.ITEM.getKey(output.asItem());
|
|
|
|
Recipe.shapeless(output, 9).requires(input).save(consumer, new ResourceLocation(key.getNamespace(), "decompress/" + key.getPath()));
|
2023-01-09 00:35:39 +01:00
|
|
|
}
|
2024-03-07 02:30:59 +01:00
|
|
|
public static void compress(RecipeOutput consumer, ItemLike output, ItemLike input) {
|
|
|
|
ResourceLocation key = BuiltInRegistries.ITEM.getKey(output.asItem());
|
|
|
|
Recipe.shaped(output).pattern("xxx","xxx", "xxx").define('x', input).save(consumer, new ResourceLocation(key.getNamespace(), "compress/" + key.getPath()));
|
2023-01-09 00:35:39 +01:00
|
|
|
}
|
2024-03-04 23:44:24 +01:00
|
|
|
public static void addShard(RecipeOutput consumer, DeferredItem<? extends Item> shard, DeferredItem<? extends Item> crystal) {
|
2023-01-09 00:35:39 +01:00
|
|
|
compress(consumer, crystal, shard);
|
|
|
|
decompress(consumer, shard, crystal);
|
|
|
|
}
|
|
|
|
|
2024-03-07 02:30:59 +01:00
|
|
|
public static void addCrystalBlock(RecipeOutput consumer, ItemLike block, DeferredItem<? extends Item> crystal) {
|
|
|
|
compress(consumer, block, crystal);
|
|
|
|
decompress(consumer, crystal, block);
|
|
|
|
}
|
|
|
|
|
2024-03-04 23:44:24 +01:00
|
|
|
public static void addToolAndArmorRecipes(RecipeOutput consumer, DeferredItem<? extends Item> base, DeferredItem<? extends Item> pickaxe, DeferredItem<? extends Item> sword, DeferredItem<? extends Item> axe, DeferredItem<? extends Item> shovel, DeferredItem<? extends Item> hoe, DeferredItem<? extends Item> helm, DeferredItem<? extends Item> chest, DeferredItem<? extends Item> pants, DeferredItem<? extends Item> boots) {
|
2021-11-13 20:29:59 +01:00
|
|
|
//Pickaxe
|
|
|
|
Recipe.shaped(pickaxe.get())
|
|
|
|
.pattern("EEE", " S ", " S ")
|
|
|
|
.define('E', base.get())
|
|
|
|
.define('S', Tags.Items.RODS_WOODEN)
|
|
|
|
.save(consumer);
|
|
|
|
|
|
|
|
//Sword
|
|
|
|
Recipe.shaped(sword.get())
|
|
|
|
.pattern("E", "E", "S")
|
|
|
|
.define('E', base.get())
|
|
|
|
.define('S', Tags.Items.RODS_WOODEN)
|
|
|
|
.save(consumer);
|
|
|
|
|
|
|
|
//Axe
|
|
|
|
Recipe.shaped(axe.get())
|
|
|
|
.pattern("EE", "ES", " S")
|
|
|
|
.define('E', base.get())
|
|
|
|
.define('S', Tags.Items.RODS_WOODEN)
|
|
|
|
.save(consumer);
|
|
|
|
|
|
|
|
//Shovel
|
|
|
|
Recipe.shaped(shovel.get())
|
|
|
|
.pattern("E", "S", "S")
|
|
|
|
.define('E', base.get())
|
|
|
|
.define('S', Tags.Items.RODS_WOODEN)
|
|
|
|
.save(consumer);
|
|
|
|
|
|
|
|
//Hoe
|
|
|
|
Recipe.shaped(hoe.get())
|
|
|
|
.pattern("EE", " S", " S")
|
|
|
|
.define('E', base.get())
|
|
|
|
.define('S', Tags.Items.RODS_WOODEN)
|
|
|
|
.save(consumer);
|
|
|
|
|
|
|
|
//Helm
|
|
|
|
Recipe.shaped(helm.get())
|
|
|
|
.pattern("OOO", "O O")
|
|
|
|
.define('O', base.get())
|
|
|
|
.save(consumer);
|
|
|
|
|
|
|
|
//Chest
|
|
|
|
Recipe.shaped(chest.get())
|
|
|
|
.pattern("O O", "OOO", "OOO")
|
|
|
|
.define('O', base.get())
|
|
|
|
.save(consumer);
|
|
|
|
|
|
|
|
//Legs
|
|
|
|
Recipe.shaped(pants.get())
|
|
|
|
.pattern("OOO", "O O", "O O")
|
|
|
|
.define('O', base.get())
|
|
|
|
.save(consumer);
|
|
|
|
|
|
|
|
//Boots
|
|
|
|
Recipe.shaped(boots.get())
|
|
|
|
.pattern("O O", "O O")
|
|
|
|
.define('O', base.get())
|
|
|
|
.save(consumer);
|
|
|
|
}
|
|
|
|
|
2021-10-02 18:49:11 +02:00
|
|
|
public static class Recipe {
|
2024-03-02 21:23:08 +01:00
|
|
|
public static ItemRecipeGenerator.Recipe.Shapeless shapeless(ItemLike result) {
|
2021-10-02 18:49:11 +02:00
|
|
|
return new ItemRecipeGenerator.Recipe.Shapeless(result);
|
|
|
|
}
|
|
|
|
|
2024-03-02 21:23:08 +01:00
|
|
|
public static ItemRecipeGenerator.Recipe.Shapeless shapeless(ItemLike result, int count) {
|
2021-10-02 18:49:11 +02:00
|
|
|
return new ItemRecipeGenerator.Recipe.Shapeless(result, count);
|
|
|
|
}
|
|
|
|
|
2024-03-02 21:23:08 +01:00
|
|
|
public static ItemRecipeGenerator.Recipe.Shaped shaped(ItemLike result) {
|
2021-10-02 18:49:11 +02:00
|
|
|
return new ItemRecipeGenerator.Recipe.Shaped(result);
|
|
|
|
}
|
|
|
|
|
2024-03-02 21:23:08 +01:00
|
|
|
public static ItemRecipeGenerator.Recipe.Shaped shaped(ItemLike result, int count) {
|
2021-10-02 18:49:11 +02:00
|
|
|
return new ItemRecipeGenerator.Recipe.Shaped(result, count);
|
|
|
|
}
|
|
|
|
|
|
|
|
private static class Shapeless extends ShapelessRecipeBuilder {
|
2021-11-21 22:38:48 +01:00
|
|
|
private ResourceLocation name;
|
2024-03-02 21:23:08 +01:00
|
|
|
public Shapeless(ItemLike result) {
|
2021-10-02 18:49:11 +02:00
|
|
|
this(result, 1);
|
|
|
|
}
|
|
|
|
|
2024-03-02 21:23:08 +01:00
|
|
|
public Shapeless(ItemLike result, int countIn) {
|
2024-03-03 01:20:53 +01:00
|
|
|
super(RecipeCategory.MISC, result, countIn);
|
2021-10-02 18:49:11 +02:00
|
|
|
}
|
|
|
|
|
2024-03-02 21:23:08 +01:00
|
|
|
public ItemRecipeGenerator.Recipe.Shapeless ingredients(ItemLike... ingredients) {
|
2021-10-02 18:49:11 +02:00
|
|
|
Arrays.asList(ingredients).forEach(this::requires);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-21 22:38:48 +01:00
|
|
|
public ItemRecipeGenerator.Recipe.Shapeless name(ResourceLocation name) {
|
|
|
|
this.name = name;
|
|
|
|
return this;
|
2021-10-02 18:49:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2024-03-04 20:21:48 +01:00
|
|
|
public void save(@Nonnull RecipeOutput consumer) {
|
2021-10-02 18:49:11 +02:00
|
|
|
this.unlockedBy("has_book", has(ActuallyItems.ITEM_BOOKLET.get()));
|
2021-11-21 22:38:48 +01:00
|
|
|
if (this.name != null) {
|
|
|
|
this.save(consumer, this.name);
|
|
|
|
} else {
|
|
|
|
super.save(consumer);
|
|
|
|
}
|
2021-10-02 18:49:11 +02:00
|
|
|
}
|
2023-01-09 00:35:39 +01:00
|
|
|
@Override
|
2024-03-04 20:21:48 +01:00
|
|
|
public void save(@Nonnull RecipeOutput consumer, @Nonnull ResourceLocation location) {
|
2023-01-09 00:35:39 +01:00
|
|
|
this.unlockedBy("", has(Items.AIR));
|
|
|
|
super.save(consumer, location);
|
|
|
|
}
|
2021-10-02 18:49:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
private static class Shaped extends ShapedRecipeBuilder {
|
2024-03-02 21:23:08 +01:00
|
|
|
public Shaped(ItemLike resultIn) {
|
2021-10-02 18:49:11 +02:00
|
|
|
this(resultIn, 1);
|
|
|
|
}
|
|
|
|
|
2024-03-02 21:23:08 +01:00
|
|
|
public Shaped(ItemLike resultIn, int countIn) {
|
2024-03-03 01:20:53 +01:00
|
|
|
super(RecipeCategory.MISC, resultIn, countIn);
|
2021-10-02 18:49:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public ItemRecipeGenerator.Recipe.Shaped pattern(String line1, String line2, String line3) {
|
|
|
|
this.pattern(line1);
|
|
|
|
this.pattern(line2);
|
|
|
|
this.pattern(line3);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public ItemRecipeGenerator.Recipe.Shaped pattern(String line1, String line2) {
|
|
|
|
this.pattern(line1);
|
|
|
|
this.pattern(line2);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2024-03-02 21:23:08 +01:00
|
|
|
public ItemRecipeGenerator.Recipe.Shaped patternSingleKey(char key, ItemLike resource, String... lines) {
|
2021-10-02 18:49:11 +02:00
|
|
|
this.define(key, resource);
|
|
|
|
for (String line : lines) {
|
|
|
|
this.pattern(line);
|
|
|
|
}
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-21 22:38:48 +01:00
|
|
|
public ItemRecipeGenerator.Recipe.Shaped requiresBook() {
|
2021-10-02 18:49:11 +02:00
|
|
|
this.unlockedBy("has_book", has(ActuallyItems.ITEM_BOOKLET.get()));
|
2021-11-21 22:38:48 +01:00
|
|
|
return this;
|
2021-10-02 18:49:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2024-03-04 20:21:48 +01:00
|
|
|
public void save(@Nonnull RecipeOutput consumerIn) {
|
2021-10-02 18:49:11 +02:00
|
|
|
this.unlockedBy("has_book", has(ActuallyItems.ITEM_BOOKLET.get()));
|
2021-11-21 22:38:48 +01:00
|
|
|
super.save(consumerIn);
|
2021-10-02 18:49:11 +02:00
|
|
|
}
|
2023-01-09 00:35:39 +01:00
|
|
|
|
|
|
|
@Override
|
2024-03-04 20:21:48 +01:00
|
|
|
public void save(@Nonnull RecipeOutput consumer, @Nonnull ResourceLocation location) {
|
2023-01-09 00:35:39 +01:00
|
|
|
this.unlockedBy("", has(Items.AIR));
|
|
|
|
super.save(consumer, location);
|
|
|
|
}
|
2021-10-02 18:49:11 +02:00
|
|
|
}
|
|
|
|
}
|
2021-05-02 00:51:36 +02:00
|
|
|
}
|