mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-27 23:46:05 +00:00
Add Genetic Database JEI recipes
This commit is contained in:
1 parent
0f716a0a16
commit
aa8ff6556b
6 files changed
+167
-3
No files matched your search
@@ -0,0 +1,47 @@
|
||||
package binnie.genetics.integration.jei.database;
|
||||
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.integration.jei.GeneticsJeiPlugin;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class DatabaseRecipeWrapper extends BlankRecipeWrapper {
|
||||
private final ItemStack input;
|
||||
private final List<ItemStack> outputs;
|
||||
private final IDrawableAnimated arrowAnimated;
|
||||
|
||||
public DatabaseRecipeWrapper(ItemStack input, List<ItemStack> outputs) {
|
||||
this.input = input;
|
||||
this.outputs = outputs;
|
||||
|
||||
this.arrowAnimated = GeneticsJeiPlugin.drawables.createArrowAnimated(20);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawInfo(Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) {
|
||||
IDrawable arrow = GeneticsJeiPlugin.drawables.getArrow();
|
||||
arrow.draw(minecraft, 60, 4);
|
||||
arrowAnimated.draw(minecraft, 60, 4);
|
||||
|
||||
String instructions = "Open the database and pick up an empty serum. Click the serum on a Sequenced gene to apply.";
|
||||
minecraft.fontRendererObj.drawSplitString(instructions, 0, 40, recipeWidth, Color.gray.getRGB());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInputs(ItemStack.class, Arrays.asList(
|
||||
input,
|
||||
new ItemStack(Genetics.database)
|
||||
));
|
||||
|
||||
ingredients.setOutputs(ItemStack.class, outputs);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user