ARC Recipe Framework Part 1
Added the serializers, deserializers, builders, etc, for the Alchemical Reaction Chamber recipe, ARCRecipe. The block does not currently have the functionality to use it yet. And only when I am currently writing this do I realize I forgot to add FluidStack functionality to the recipes. Welp.
This commit is contained in:
parent
152525bbe3
commit
f9327d8f5a
21 changed files with 556 additions and 39 deletions
|
@ -38,7 +38,9 @@ import wayoftime.bloodmagic.client.render.entity.SoulSnareRenderer;
|
|||
import wayoftime.bloodmagic.common.block.BloodMagicBlocks;
|
||||
import wayoftime.bloodmagic.common.data.GeneratorBaseRecipes;
|
||||
import wayoftime.bloodmagic.common.data.GeneratorBlockStates;
|
||||
import wayoftime.bloodmagic.common.data.GeneratorBlockTags;
|
||||
import wayoftime.bloodmagic.common.data.GeneratorItemModels;
|
||||
import wayoftime.bloodmagic.common.data.GeneratorItemTags;
|
||||
import wayoftime.bloodmagic.common.data.GeneratorLanguage;
|
||||
import wayoftime.bloodmagic.common.data.GeneratorLootTable;
|
||||
import wayoftime.bloodmagic.common.data.recipe.BloodMagicRecipeProvider;
|
||||
|
@ -117,7 +119,7 @@ public class BloodMagic
|
|||
|
||||
private void registerRecipes(RegistryEvent.Register<IRecipeSerializer<?>> event)
|
||||
{
|
||||
System.out.println("Registering IngredientBloodOrb Serializer.");
|
||||
// System.out.println("Registering IngredientBloodOrb Serializer.");
|
||||
CraftingHelper.register(IngredientBloodOrb.NAME, IngredientBloodOrb.Serializer.INSTANCE);
|
||||
|
||||
// event.getRegistry().registerAll(
|
||||
|
@ -171,6 +173,11 @@ public class BloodMagic
|
|||
gen.addProvider(new BloodMagicRecipeProvider(gen));
|
||||
gen.addProvider(new GeneratorBaseRecipes(gen));
|
||||
gen.addProvider(new GeneratorLootTable(gen));
|
||||
|
||||
GeneratorBlockTags bmBlockTags = new GeneratorBlockTags(gen, event.getExistingFileHelper());
|
||||
gen.addProvider(bmBlockTags);
|
||||
gen.addProvider(new GeneratorItemTags(gen, bmBlockTags, event.getExistingFileHelper()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ import wayoftime.bloodmagic.altar.AltarTier;
|
|||
|
||||
public abstract class RecipeBloodAltar extends BloodMagicRecipe
|
||||
{
|
||||
|
||||
@Nonnull
|
||||
private final Ingredient input;
|
||||
@Nonnull
|
||||
|
|
|
@ -18,12 +18,6 @@ import wayoftime.bloodmagic.orb.BloodOrb;
|
|||
|
||||
public class IngredientBloodOrb extends Ingredient
|
||||
{
|
||||
|
||||
// private final BloodOrb orb;
|
||||
// private NonNullList<ItemStack> orbs;
|
||||
// private IntList itemIds = null;
|
||||
// private ItemStack[] items;
|
||||
|
||||
public static final ResourceLocation NAME = new ResourceLocation(BloodMagic.MODID, "bloodorb");
|
||||
|
||||
public final int orbTier;
|
||||
|
@ -61,14 +55,8 @@ public class IngredientBloodOrb extends Ingredient
|
|||
@Override
|
||||
public Collection<ItemStack> getStacks()
|
||||
{
|
||||
// System.out.println("BING BONG");
|
||||
List<ItemStack> orbGet = OrbRegistry.getOrbsDownToTier(orbTier);
|
||||
// List<ItemStack> orbGet = new ArrayList<ItemStack>();
|
||||
// orbGet.add(new ItemStack(Items.DIAMOND));
|
||||
// orbs = NonNullList.withSize(orbGet.size(), ItemStack.EMPTY);
|
||||
//
|
||||
// for (int i = 0; i < orbGet.size(); i++)
|
||||
// orbs.set(i, orbGet.get(i));
|
||||
|
||||
return orbGet;
|
||||
}
|
||||
|
||||
|
@ -89,24 +77,7 @@ public class IngredientBloodOrb extends Ingredient
|
|||
@Override
|
||||
public Ingredient parse(JsonObject json)
|
||||
{
|
||||
System.out.println("Parsing Blood Orb");
|
||||
return new IngredientBloodOrb(JSONUtils.getInt(json, "orb_tier"));
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// @Override
|
||||
// public boolean test(@Nullable ItemStack input)
|
||||
// {
|
||||
// System.out.println("Testing");
|
||||
// if (input == null || input.isEmpty())
|
||||
// return false;
|
||||
//
|
||||
// if (!(input.getItem() instanceof IBloodOrb))
|
||||
// return false;
|
||||
//
|
||||
// BloodOrb orb = ((IBloodOrb) input.getItem()).getOrb(input);
|
||||
// return orb != null && orb.getTier() >= this.orbTier;
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
@ -133,8 +133,10 @@ public class Constants
|
|||
public static class JSON
|
||||
{
|
||||
public static final String INPUT = "input";
|
||||
public static final String TOOL = "tool";
|
||||
public static final String BASEINPUT = "baseinput";
|
||||
public static final String ADDEDINPUT = "addedinput";
|
||||
public static final String ADDEDOUTPUT = "addedoutput";
|
||||
public static final String OUTPUT = "output";
|
||||
public static final String ITEM = "item";
|
||||
public static final String COUNT = "count";
|
||||
|
@ -142,6 +144,7 @@ public class Constants
|
|||
public static final String TYPE = "type";
|
||||
public static final String TEXTURE = "texture";
|
||||
public static final String CONDITIONS = "conditions";
|
||||
public static final String CHANCE = "chance";
|
||||
|
||||
public static final String ALTAR_TIER = Constants.NBT.ALTAR_TIER;
|
||||
public static final String ALTAR_SYPHON = "altarSyphon";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue