/
RuneRecipe.java
56 lines (45 loc) · 1.75 KB
/
RuneRecipe.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*******************************************************************************
* @author Reika Kalseki
*
* Copyright 2017
*
* All rights reserved.
* Distribution of the software in any form is only allowed with
* explicit, prior permission from the owner.
******************************************************************************/
package Reika.ChromatiCraft.Auxiliary.RecipeManagers.CastingRecipes.Blocks;
import java.util.Collection;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.ShapedRecipes;
import Reika.ChromatiCraft.Auxiliary.Interfaces.CoreRecipe;
import Reika.ChromatiCraft.Auxiliary.RecipeManagers.CastingRecipe;
import Reika.ChromatiCraft.Magic.Progression.ProgressStage;
import Reika.ChromatiCraft.Registry.ChromaBlocks;
import Reika.ChromatiCraft.Registry.ChromaItems;
import Reika.ChromatiCraft.Registry.CrystalElement;
import Reika.DragonAPI.Libraries.ReikaRecipeHelper;
public class RuneRecipe extends CastingRecipe implements CoreRecipe {
public RuneRecipe(CrystalElement e) {
super(genOutput(e), getRecipe(e, false));
}
static ShapedRecipes getRecipe(CrystalElement e, boolean enhanced) {
ItemStack shard = ChromaItems.SHARD.getStackOfMetadata(enhanced ? 16+e.ordinal() : e.ordinal());
return ReikaRecipeHelper.getShapedRecipeFor(genOutput(e), "SSS", "SCS", "SSS", 'C', shard, 'S', ChromaBlocks.PYLONSTRUCT.getStackOf());
}
static ItemStack genOutput(CrystalElement e) {
return ChromaBlocks.RUNE.getStackOf(e);
}
@Override
public int getExperience() {
return 2*super.getExperience();
}
@Override
protected void getRequiredProgress(Collection<ProgressStage> c) {
super.getRequiredProgress(c);
c.add(ProgressStage.ALLCOLORS);
}
@Override
public boolean canGiveDoubleOutput() {
return true;
}
}