2021-05-02 00:51:36 +02:00
|
|
|
package de.ellpeck.actuallyadditions.data;
|
|
|
|
|
|
|
|
import com.google.gson.JsonObject;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.items.ActuallyItems;
|
|
|
|
import net.minecraft.data.*;
|
|
|
|
import net.minecraft.item.Items;
|
|
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
import net.minecraftforge.common.Tags;
|
|
|
|
|
|
|
|
import java.nio.file.Path;
|
|
|
|
import java.util.function.Consumer;
|
|
|
|
|
|
|
|
public class BlockRecipeGenerator extends RecipeProvider {
|
|
|
|
public BlockRecipeGenerator(DataGenerator generatorIn) {
|
|
|
|
super(generatorIn);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void registerRecipes(Consumer<IFinishedRecipe> consumer) {
|
2021-05-02 17:47:50 +02:00
|
|
|
//Battery Box
|
|
|
|
ShapelessRecipeBuilder.shapelessRecipe(ActuallyBlocks.BATTERY_BOX.get())
|
|
|
|
.addIngredient(ActuallyBlocks.ENERGIZER.get())
|
|
|
|
.addIngredient(ActuallyBlocks.ENERVATOR.get())
|
2021-05-02 18:10:21 +02:00
|
|
|
.addIngredient(ActuallyItems.COIL.get())
|
2021-05-02 00:51:36 +02:00
|
|
|
.addCriterion("", hasItem(Items.AIR))
|
|
|
|
.build(consumer, new ResourceLocation(ActuallyAdditions.MODID, "battery_box"));
|
|
|
|
|
2021-05-02 17:47:50 +02:00
|
|
|
//Farmer
|
|
|
|
ShapedRecipeBuilder.shapedRecipe(ActuallyBlocks.FARMER.get())
|
2021-05-02 00:51:36 +02:00
|
|
|
.patternLine("ISI")
|
|
|
|
.patternLine("SCS")
|
|
|
|
.patternLine("ISI")
|
|
|
|
.key('I', ActuallyBlocks.CRYSTAL_ENORI.get())
|
2021-05-02 17:47:50 +02:00
|
|
|
.key('C', ActuallyBlocks.IRON_CASING.get())
|
2021-05-02 00:51:36 +02:00
|
|
|
.key('S', Tags.Items.SEEDS)
|
|
|
|
.addCriterion("", hasItem(Items.AIR))
|
|
|
|
.build(consumer, new ResourceLocation(ActuallyAdditions.MODID, "farmer"));
|
|
|
|
|
2021-05-02 17:47:50 +02:00
|
|
|
//Empowerer
|
|
|
|
ShapedRecipeBuilder.shapedRecipe(ActuallyBlocks.EMPOWERER.get())
|
|
|
|
.patternLine(" R ")
|
|
|
|
.patternLine(" B ")
|
|
|
|
.patternLine("CDC")
|
|
|
|
.key('R', ActuallyItems.RESTONIA_CRYSTAL.get())
|
2021-05-02 18:10:21 +02:00
|
|
|
.key('B', ActuallyItems.BATTERY_DOUBLE.get())
|
2021-05-02 17:47:50 +02:00
|
|
|
.key('C', ActuallyBlocks.IRON_CASING.get())
|
|
|
|
.key('D', ActuallyBlocks.DISPLAY_STAND.get())
|
|
|
|
.addCriterion("", hasItem(Items.AIR))
|
2021-05-05 17:21:00 +02:00
|
|
|
.build(consumer, new ResourceLocation(ActuallyAdditions.MODID, "empowerer"));
|
2021-05-02 17:47:50 +02:00
|
|
|
|
2021-05-05 17:21:00 +02:00
|
|
|
//Tiny Torch coal
|
|
|
|
ShapedRecipeBuilder.shapedRecipe(ActuallyBlocks.TINY_TORCH.get(), 2)
|
|
|
|
.patternLine("C")
|
|
|
|
.patternLine("S")
|
|
|
|
.key('C', ActuallyItems.TINY_COAL.get())
|
|
|
|
.key('S', Tags.Items.RODS_WOODEN)
|
|
|
|
.addCriterion("", hasItem(Items.AIR))
|
|
|
|
.build(consumer, new ResourceLocation(ActuallyAdditions.MODID, "tiny_torch_coal"));
|
|
|
|
|
|
|
|
//Tiny Torch charcoal
|
|
|
|
ShapedRecipeBuilder.shapedRecipe(ActuallyBlocks.TINY_TORCH.get(), 2)
|
|
|
|
.patternLine("C")
|
|
|
|
.patternLine("S")
|
|
|
|
.key('C', ActuallyItems.TINY_CHARCOAL.get())
|
|
|
|
.key('S', Tags.Items.RODS_WOODEN)
|
|
|
|
.addCriterion("", hasItem(Items.AIR))
|
|
|
|
.build(consumer, new ResourceLocation(ActuallyAdditions.MODID, "tiny_torch_charcoal"));
|
|
|
|
|
|
|
|
//Fireworks Box
|
|
|
|
ShapedRecipeBuilder.shapedRecipe(ActuallyBlocks.FIREWORK_BOX.get())
|
|
|
|
.patternLine("GFG")
|
|
|
|
.patternLine("SAS")
|
|
|
|
.patternLine("CCC")
|
|
|
|
.key('G', Tags.Items.GUNPOWDER)
|
|
|
|
.key('S', Tags.Items.RODS_WOODEN)
|
|
|
|
.key('A', ActuallyBlocks.IRON_CASING.get())
|
|
|
|
.key('F', Items.FIREWORK_ROCKET)
|
|
|
|
.key('C', ActuallyItems.ENORI_CRYSTAL.get())
|
|
|
|
.addCriterion("", hasItem(Items.AIR))
|
|
|
|
.build(consumer, new ResourceLocation(ActuallyAdditions.MODID, "firework_box"));
|
|
|
|
|
|
|
|
//Shock Suppressor
|
|
|
|
ShapedRecipeBuilder.shapedRecipe(ActuallyBlocks.SHOCK_SUPPRESSOR.get())
|
|
|
|
.patternLine("OAO")
|
|
|
|
.patternLine("ACA")
|
|
|
|
.patternLine("OAO")
|
|
|
|
.key('A', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get())
|
|
|
|
.key('O', Tags.Items.OBSIDIAN)
|
|
|
|
.key('C', ActuallyItems.COIL_ADVANCED.get())
|
|
|
|
.addCriterion("", hasItem(Items.AIR))
|
|
|
|
.build(consumer, new ResourceLocation(ActuallyAdditions.MODID, "shock_suppressor"));
|
2021-05-02 17:47:50 +02:00
|
|
|
|
2021-05-05 17:21:00 +02:00
|
|
|
//Display Stand
|
|
|
|
ShapedRecipeBuilder.shapedRecipe(ActuallyBlocks.DISPLAY_STAND.get())
|
|
|
|
.patternLine(" R ")
|
|
|
|
.patternLine("EEE")
|
|
|
|
.patternLine("GGG")
|
|
|
|
.key('R', ActuallyItems.COIL_ADVANCED.get())
|
|
|
|
.key('E', ActuallyBlocks.ETHETIC_GREEN_BLOCK.get())
|
|
|
|
.key('G', ActuallyBlocks.ETHETIC_WHITE_BLOCK.get())
|
|
|
|
.addCriterion("", hasItem(Items.AIR))
|
|
|
|
.build(consumer, new ResourceLocation(ActuallyAdditions.MODID, "display_stand"));
|
2021-05-02 00:51:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void saveRecipeAdvancement(DirectoryCache cache, JsonObject cache2, Path advancementJson) {
|
|
|
|
//Nope...
|
|
|
|
}
|
|
|
|
}
|