add JEI for Crucibles, adding JEI for anvil
This commit is contained in:
@@ -5,6 +5,7 @@ import mezz.jei.api.gui.ICraftingGridHelper;
|
|||||||
import mezz.jei.api.recipe.IRecipeCategoryRegistration;
|
import mezz.jei.api.recipe.IRecipeCategoryRegistration;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
import net.minecraftforge.oredict.OreIngredient;
|
||||||
import nmd.primal.forgecraft.compat.JEI.crucible.CrucibleRecipeCategory;
|
import nmd.primal.forgecraft.compat.JEI.crucible.CrucibleRecipeCategory;
|
||||||
import nmd.primal.forgecraft.compat.JEI.crucible.CrucibleRecipeChecker;
|
import nmd.primal.forgecraft.compat.JEI.crucible.CrucibleRecipeChecker;
|
||||||
import nmd.primal.forgecraft.compat.JEI.crucible.CrucibleRecipeHandler;
|
import nmd.primal.forgecraft.compat.JEI.crucible.CrucibleRecipeHandler;
|
||||||
@@ -57,6 +58,8 @@ public class ModJEI implements IModPlugin
|
|||||||
// ***************************************************************************** //
|
// ***************************************************************************** //
|
||||||
// Info
|
// Info
|
||||||
// ***************************************************************************** //
|
// ***************************************************************************** //
|
||||||
//egistry.addIngredientInfo(new ItemStack(ModBlocks.nbtCrucible, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.crucible");
|
registry.addIngredientInfo(ItemStack.EMPTY, ItemStack.class, "jei.info.forgecraft.crucible");
|
||||||
|
registry.addIngredientInfo(new ItemStack(ModBlocks.nbtCrucible, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.crucible");
|
||||||
|
registry.addIngredientInfo(new OreIngredient("oreIron"), OreIngredient.class, "jei.info.forgecraft.oreiron");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package nmd.primal.forgecraft.compat.JEI.anvil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mminaie on 9/16/18.
|
||||||
|
*/
|
||||||
|
public class AnvilRecipeCategory {
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package nmd.primal.forgecraft.compat.JEI.anvil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mminaie on 9/16/18.
|
||||||
|
*/
|
||||||
|
public class AnvilRecipeChecker {
|
||||||
|
}
|
||||||
@@ -1,17 +1,16 @@
|
|||||||
package nmd.primal.forgecraft.compat.JEI.crucible;
|
package nmd.primal.forgecraft.compat.JEI.crucible;
|
||||||
|
|
||||||
import crafttweaker.api.item.IngredientAny;
|
|
||||||
import mezz.jei.api.IGuiHelper;
|
import mezz.jei.api.IGuiHelper;
|
||||||
import mezz.jei.api.gui.*;
|
import mezz.jei.api.gui.*;
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.Ingredient;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import nmd.primal.core.common.compat.jei.AbstractCategory;
|
import nmd.primal.core.common.compat.jei.AbstractCategory;
|
||||||
import nmd.primal.core.common.helper.CommonUtils;
|
import nmd.primal.core.common.helper.CommonUtils;
|
||||||
import nmd.primal.core.common.init.ModInfo;
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
|
import nmd.primal.forgecraft.init.ModBlocks;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
@@ -22,17 +21,13 @@ public class CrucibleRecipeCategory extends AbstractCategory<CrucibleRecipeWrapp
|
|||||||
{
|
{
|
||||||
public static String CATEGORY = CommonUtils.prefix("crucible");
|
public static String CATEGORY = CommonUtils.prefix("crucible");
|
||||||
|
|
||||||
private static ResourceLocation gui_background = new ResourceLocation(ModInfo.MOD_ID,"textures/gui/jei/cauldron.png");
|
private static ResourceLocation gui_background = new ResourceLocation(ModInfo.MOD_ID,"textures/gui/jei/crucible.png");
|
||||||
private static ResourceLocation gui_progress = new ResourceLocation(ModInfo.MOD_ID,"textures/gui/jei/cauldron_progress.png");
|
|
||||||
private final IDrawable background;
|
private final IDrawable background;
|
||||||
private final IDrawableAnimated progress;
|
|
||||||
|
|
||||||
public CrucibleRecipeCategory(IGuiHelper guiHelper)
|
public CrucibleRecipeCategory(IGuiHelper guiHelper)
|
||||||
{
|
{
|
||||||
background = guiHelper.createDrawable(gui_background, 0, 0, 160, 60, 0, 0, 0, 0);
|
//background = guiHelper.createDrawable(gui_background, 0, 0, 134, 144, 0, 0, 0, 0);
|
||||||
|
background = guiHelper.createDrawable(gui_background, 0,0,160,134);
|
||||||
IDrawableStatic progressDrawable = guiHelper.createDrawable(gui_progress, -14, -1, 24, 52);
|
|
||||||
progress = guiHelper.createAnimatedDrawable(progressDrawable, 200, IDrawableAnimated.StartDirection.BOTTOM, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@@ -59,55 +54,40 @@ public class CrucibleRecipeCategory extends AbstractCategory<CrucibleRecipeWrapp
|
|||||||
@Override
|
@Override
|
||||||
public void drawExtras(@Nonnull Minecraft minecraft)
|
public void drawExtras(@Nonnull Minecraft minecraft)
|
||||||
{
|
{
|
||||||
progress.draw(minecraft, 67, 18);
|
//progress.draw(minecraft, 67, 18);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setRecipe(IRecipeLayout layout, CrucibleRecipeWrapper recipe, IIngredients ingredients)
|
public void setRecipe(IRecipeLayout layout, CrucibleRecipeWrapper recipe, IIngredients ingredients)
|
||||||
{
|
{
|
||||||
//IGuiFluidStackGroup fluids = layout.getFluidStacks();
|
|
||||||
IGuiItemStackGroup items = layout.getItemStacks();
|
IGuiItemStackGroup items = layout.getItemStacks();
|
||||||
|
|
||||||
|
/***INPUTS***/
|
||||||
// input fluid
|
items.init(0, true, 1, 77);
|
||||||
//fluids.init(0, true, 6, 8, 13, 48, 4000, true, null);
|
items.init(1, true, 1, 58);
|
||||||
//fluids.set(ingredients);
|
items.init(2, true, 1, 39);
|
||||||
|
items.init(3, true, 1, 20);
|
||||||
// output_items fluid
|
items.init(4, true, 1, 1);
|
||||||
//if (recipe.output_fluid != null) {
|
|
||||||
//fluids.init(1, false, 135, 8, 13, 48, 4000, true, null);
|
|
||||||
//fluids.set(ingredients);
|
|
||||||
//}
|
|
||||||
|
|
||||||
// input items
|
|
||||||
items.init(0, true, 0, 18);
|
|
||||||
items.init(1, true, 10, 18);
|
|
||||||
items.init(2, true, 20, 18);
|
|
||||||
items.init(3, true, 30, 18);
|
|
||||||
items.init(4, true, 50, 18);
|
|
||||||
|
|
||||||
|
|
||||||
|
//items.set(0, recipe.getIngredient(0));
|
||||||
items.set(0, recipe.getIngredient(0));
|
items.set(0, recipe.getIngredient(0));
|
||||||
items.set(1, recipe.getIngredient(1));
|
items.set(1, recipe.getIngredient(1));
|
||||||
items.set(2, recipe.getIngredient(2));
|
items.set(2, recipe.getIngredient(2));
|
||||||
items.set(3, recipe.getIngredient(3));
|
items.set(3, recipe.getIngredient(3));
|
||||||
items.set(4, recipe.getIngredient(4));
|
items.set(4, recipe.getIngredient(4));
|
||||||
//items.set(1, recipe.item_input_2);
|
|
||||||
//items.set(2, recipe.item_input_3);
|
|
||||||
//items.set(3, recipe.item_input_4);
|
|
||||||
|
|
||||||
//items.set(0, RecipeHelper.getSlotList(recipe.input_slots, 0));
|
/***OUTPUTS***/
|
||||||
//items.set(1, RecipeHelper.getSlotList(recipe.input_slots, 1));
|
items.init(5, false, 115, 96);
|
||||||
//items.set(2, RecipeHelper.getSlotList(recipe.input_slots, 2));
|
items.set(5, recipe.dropsCooked);
|
||||||
//items.set(3, RecipeHelper.getSlotList(recipe.input_slots, 3));
|
|
||||||
|
|
||||||
// output_items items
|
/***EXTRAS***/
|
||||||
//if (recipe.output_items != null) {
|
items.init(6, false, 1, 96);
|
||||||
items.init(4, false, 104, 18);
|
ItemStack crucibleStack = new ItemStack(ModBlocks.nbtCrucible, 1, 0);
|
||||||
items.set(ingredients);
|
items.set(6, crucibleStack);
|
||||||
|
|
||||||
items.init(5, false, 104, 37);
|
items.init(7, false, 58, 96);
|
||||||
items.set(ingredients);
|
ItemStack bloomeryStack = new ItemStack(ModBlocks.bloomery_brick, 1, 0);
|
||||||
//}
|
items.set(7, bloomeryStack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.item.crafting.Ingredient;
|
import net.minecraft.item.crafting.Ingredient;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
import nmd.primal.forgecraft.crafting.CrucibleCrafting;
|
import nmd.primal.forgecraft.crafting.CrucibleCrafting;
|
||||||
|
import nmd.primal.forgecraft.init.ModBlocks;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
@@ -81,7 +82,8 @@ public class CrucibleRecipeWrapper implements IRecipeWrapper
|
|||||||
@Override
|
@Override
|
||||||
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY)
|
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY)
|
||||||
{
|
{
|
||||||
minecraft.fontRenderer.drawString(String.valueOf("Cook time: " + cookTime), 60, 50, Color.red.getRGB());
|
minecraft.fontRenderer.drawString(String.valueOf(cookTemp), 58, 120, Color.red.getRGB());
|
||||||
minecraft.fontRenderer.drawString(String.valueOf("Cook temp: " + cookTemp), 60, 10, Color.green.getRGB());
|
minecraft.fontRenderer.drawString(String.valueOf(cookTime + " ticks"), 58, 86, Color.blue.getRGB());
|
||||||
|
minecraft.fontRenderer.drawString(recipe.getDropsCooked().getDisplayName() + " Recipe", 20, 5, Color.black.getRGB());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package nmd.primal.forgecraft.init;
|
package nmd.primal.forgecraft.init;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockPlanks;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@@ -69,11 +70,11 @@ public class ModCrafting{
|
|||||||
1000);
|
1000);
|
||||||
|
|
||||||
CrucibleCrafting.addRecipe(
|
CrucibleCrafting.addRecipe(
|
||||||
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
|
|
||||||
Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, 15)),
|
|
||||||
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
|
|
||||||
Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, 15)),
|
|
||||||
new OreIngredient("dustMagnetite"),
|
new OreIngredient("dustMagnetite"),
|
||||||
|
Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, BlockPlanks.EnumType.JUNGLE.getMetadata())),
|
||||||
|
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
|
||||||
|
Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, BlockPlanks.EnumType.JUNGLE.getMetadata())),
|
||||||
|
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
|
||||||
new ItemStack(PrimalAPI.Blocks.ORE_MAGNETITE, 1),
|
new ItemStack(PrimalAPI.Blocks.ORE_MAGNETITE, 1),
|
||||||
new ItemStack(ModItems.wootzingotball, 1),
|
new ItemStack(ModItems.wootzingotball, 1),
|
||||||
100,
|
100,
|
||||||
@@ -81,11 +82,11 @@ public class ModCrafting{
|
|||||||
1000);
|
1000);
|
||||||
|
|
||||||
CrucibleCrafting.addRecipe(
|
CrucibleCrafting.addRecipe(
|
||||||
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
|
|
||||||
Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, 15)),
|
|
||||||
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
|
|
||||||
Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, 15)),
|
|
||||||
new OreIngredient("magnetite"),
|
new OreIngredient("magnetite"),
|
||||||
|
Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, BlockPlanks.EnumType.JUNGLE.getMetadata())),
|
||||||
|
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
|
||||||
|
Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, BlockPlanks.EnumType.JUNGLE.getMetadata())),
|
||||||
|
Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
|
||||||
new ItemStack(PrimalAPI.Blocks.ORE_MAGNETITE, 1),
|
new ItemStack(PrimalAPI.Blocks.ORE_MAGNETITE, 1),
|
||||||
new ItemStack(ModItems.wootzingotball, 1),
|
new ItemStack(ModItems.wootzingotball, 1),
|
||||||
100,
|
100,
|
||||||
|
|||||||
@@ -126,3 +126,5 @@ forgecraft.config.title=ForgeCraft Config
|
|||||||
|
|
||||||
forgecraft.compatibility=Compatibility
|
forgecraft.compatibility=Compatibility
|
||||||
forgecraft.compatibility.tooltip=Compatibility Features
|
forgecraft.compatibility.tooltip=Compatibility Features
|
||||||
|
|
||||||
|
jei.category.forgecraft.crucible=Crucible Crafting
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
||||||
"textures": {
|
"textures": {
|
||||||
"particle": "forgecraft:blocks/stone_slab",
|
"particle": "blocks/stone_slab",
|
||||||
"texture": "forgecraft:blocks/stone_slab"
|
"texture": "blocks/stone_slab"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
@@ -125,19 +125,28 @@
|
|||||||
],
|
],
|
||||||
"display": {
|
"display": {
|
||||||
"thirdperson_righthand": {
|
"thirdperson_righthand": {
|
||||||
"translation": [ 0.1, 1.1, -2.35 ]
|
"rotation": [ 45, 0, 0 ],
|
||||||
|
"translation": [ 0.9, 2.75, -0.2 ]
|
||||||
|
},
|
||||||
|
"thirdperson_lefthand": {
|
||||||
|
"rotation": [ 45, 0, 0 ],
|
||||||
|
"translation": [ 0.9, 2.75, -0.2 ]
|
||||||
},
|
},
|
||||||
"firstperson_righthand": {
|
"firstperson_righthand": {
|
||||||
"translation": [ 0, 4, 0 ]
|
"translation": [ 0, 4, 0 ]
|
||||||
},
|
},
|
||||||
"gui": {
|
"firstperson_lefthand": {
|
||||||
"translation": [ 0, 4, 0 ]
|
"translation": [ 0, 4, 0 ]
|
||||||
},
|
},
|
||||||
|
"gui": {
|
||||||
|
"rotation": [ 30, 225, 0 ],
|
||||||
|
"translation": [ 0, 5, 0 ],
|
||||||
|
"scale": [ 1.3, 1.3, 1.3 ]
|
||||||
|
},
|
||||||
"ground": {
|
"ground": {
|
||||||
"translation": [ 0, 4, 0 ]
|
"translation": [ 0, 4, 0 ]
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"rotation": [ 45, 45, 0 ],
|
|
||||||
"translation": [ 0, 4, 0 ]
|
"translation": [ 0, 4, 0 ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Reference in New Issue
Block a user