Update JEI, minor clean up of JEI integration
This commit is contained in:
parent
fb1d6f1074
commit
a1ef232b38
37 changed files with 311 additions and 375 deletions
|
@ -110,7 +110,7 @@ dependencies {
|
|||
compile name: "CraftTweaker", version: "1.8.8-3.0.0", classifier: "Dev"
|
||||
// shade 'IC2-Classic-API-STANDALONE:IC2-Classic-API-STANDALONE:1.1.0.19-5:api'
|
||||
deobfCompile 'RebornCore:RebornCore-1.8.9:1.4.3.+:universal'
|
||||
deobfCompile "mezz.jei:jei_1.8.9:2.24.+"
|
||||
deobfCompile "mezz.jei:jei_1.8.9:2.27.+"
|
||||
|
||||
testCompile 'junit:junit:4.12'
|
||||
}
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package techreborn.compat.jei;
|
||||
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import techreborn.api.recipe.BaseRecipe;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -7,16 +12,9 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import techreborn.api.recipe.BaseRecipe;
|
||||
|
||||
public abstract class BaseRecipeWrapper<T extends BaseRecipe> extends BlankRecipeWrapper {
|
||||
protected final T baseRecipe;
|
||||
@Nonnull
|
||||
private final List<List<ItemStack>> inputs;
|
||||
|
||||
public BaseRecipeWrapper(T baseRecipe) {
|
||||
|
@ -48,18 +46,15 @@ public abstract class BaseRecipeWrapper<T extends BaseRecipe> extends BlankRecip
|
|||
return new ArrayList<>(itemStackSet);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public List<List<ItemStack>> getInputs() {
|
||||
return inputs;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public List<ItemStack> getOutputs() {
|
||||
return baseRecipe.getOutputs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,20 +1,13 @@
|
|||
package techreborn.compat.jei;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import mezz.jei.api.BlankModPlugin;
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.IItemRegistry;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.IJeiRuntime;
|
||||
import mezz.jei.api.IModPlugin;
|
||||
import mezz.jei.api.IModRegistry;
|
||||
import mezz.jei.api.IRecipeRegistry;
|
||||
import mezz.jei.api.recipe.VanillaRecipeCategoryUid;
|
||||
import mezz.jei.api.recipe.transfer.IRecipeTransferRegistry;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import techreborn.Core;
|
||||
import techreborn.api.reactor.FusionReactorRecipeHelper;
|
||||
import techreborn.api.recipe.RecipeHandler;
|
||||
|
@ -72,22 +65,15 @@ import techreborn.compat.jei.rollingMachine.RollingMachineRecipeMaker;
|
|||
import techreborn.compat.jei.vacuumFreezer.VacuumFreezerRecipeCategory;
|
||||
import techreborn.compat.jei.vacuumFreezer.VacuumFreezerRecipeHandler;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@mezz.jei.api.JEIPlugin
|
||||
public class TechRebornJeiPlugin implements IModPlugin {
|
||||
public static IJeiHelpers jeiHelpers;
|
||||
|
||||
public class TechRebornJeiPlugin extends BlankModPlugin {
|
||||
@Override
|
||||
public void onJeiHelpersAvailable(IJeiHelpers jeiHelpers) {
|
||||
TechRebornJeiPlugin.jeiHelpers = jeiHelpers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRegistryAvailable(IItemRegistry itemRegistry) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(IModRegistry registry) {
|
||||
public void register(@Nonnull IModRegistry registry) {
|
||||
IJeiHelpers jeiHelpers = registry.getJeiHelpers();
|
||||
IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
|
||||
|
||||
registry.addRecipeCategories(
|
||||
|
@ -106,18 +92,18 @@ public class TechRebornJeiPlugin implements IModPlugin {
|
|||
);
|
||||
|
||||
registry.addRecipeHandlers(
|
||||
new AlloySmelterRecipeHandler(),
|
||||
new AssemblingMachineRecipeHandler(),
|
||||
new BlastFurnaceRecipeHandler(),
|
||||
new CentrifugeRecipeHandler(),
|
||||
new ChemicalReactorRecipeHandler(),
|
||||
new AlloySmelterRecipeHandler(jeiHelpers),
|
||||
new AssemblingMachineRecipeHandler(jeiHelpers),
|
||||
new BlastFurnaceRecipeHandler(jeiHelpers),
|
||||
new CentrifugeRecipeHandler(jeiHelpers),
|
||||
new ChemicalReactorRecipeHandler(jeiHelpers),
|
||||
new FusionReactorRecipeHandler(),
|
||||
new GrinderRecipeHandler(),
|
||||
new ImplosionCompressorRecipeHandler(),
|
||||
new IndustrialElectrolyzerRecipeHandler(),
|
||||
new IndustrialSawmillRecipeHandler(),
|
||||
new GrinderRecipeHandler(jeiHelpers),
|
||||
new ImplosionCompressorRecipeHandler(jeiHelpers),
|
||||
new IndustrialElectrolyzerRecipeHandler(jeiHelpers),
|
||||
new IndustrialSawmillRecipeHandler(jeiHelpers),
|
||||
new RollingMachineRecipeHandler(),
|
||||
new VacuumFreezerRecipeHandler()
|
||||
new VacuumFreezerRecipeHandler(jeiHelpers)
|
||||
);
|
||||
|
||||
registry.addRecipes(RecipeHandler.recipeList);
|
||||
|
@ -138,7 +124,10 @@ public class TechRebornJeiPlugin implements IModPlugin {
|
|||
registry.addRecipeClickArea(GuiAlloySmelter.class, 80, 35, 26, 20, RecipeCategoryUids.ALLOY_SMELTER);
|
||||
registry.addRecipeClickArea(GuiAssemblingMachine.class, 85, 34, 24, 20, RecipeCategoryUids.ASSEMBLING_MACHINE);
|
||||
registry.addRecipeClickArea(GuiBlastFurnace.class, 63, 36, 24, 15, RecipeCategoryUids.BLAST_FURNACE);
|
||||
registry.addRecipeClickArea(GuiCentrifuge.class, 98, 37, 12, 15, RecipeCategoryUids.CENTRIFUGE);
|
||||
registry.addRecipeClickArea(GuiCentrifuge.class, 98, 37, 9, 12, RecipeCategoryUids.CENTRIFUGE);
|
||||
registry.addRecipeClickArea(GuiCentrifuge.class, 68, 37, 9, 12, RecipeCategoryUids.CENTRIFUGE);
|
||||
registry.addRecipeClickArea(GuiCentrifuge.class, 83, 23, 12, 9, RecipeCategoryUids.CENTRIFUGE);
|
||||
registry.addRecipeClickArea(GuiCentrifuge.class, 83, 53, 12, 9, RecipeCategoryUids.CENTRIFUGE);
|
||||
registry.addRecipeClickArea(GuiChemicalReactor.class, 73, 39, 32, 12, RecipeCategoryUids.CHEMICAL_REACTOR);
|
||||
registry.addRecipeClickArea(GuiFusionReactor.class, 111, 34, 27, 19, RecipeCategoryUids.FUSION_REACTOR);
|
||||
registry.addRecipeClickArea(GuiGrinder.class, 50, 35, 25, 16, RecipeCategoryUids.GRINDER);
|
||||
|
@ -165,16 +154,6 @@ public class TechRebornJeiPlugin implements IModPlugin {
|
|||
recipeTransferRegistry.addRecipeTransferHandler(ContainerVacuumFreezer.class, RecipeCategoryUids.VACUUM_FREEZER, 0, 1, 2, 36);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecipeRegistryAvailable(IRecipeRegistry recipeRegistry) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRuntimeAvailable(IJeiRuntime jeiRuntime) {
|
||||
|
||||
}
|
||||
|
||||
private static void addDebugRecipes(IModRegistry registry) {
|
||||
ItemStack diamondBlock = new ItemStack(Blocks.diamond_block);
|
||||
ItemStack dirtBlock = new ItemStack(Blocks.dirt);
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
package techreborn.compat.jei.alloySmelter;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import techreborn.client.gui.GuiAlloySmelter;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
import techreborn.compat.jei.RecipeUtil;
|
||||
|
||||
public class AlloySmelterRecipeCategory implements IRecipeCategory {
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class AlloySmelterRecipeCategory extends BlankRecipeCategory {
|
||||
private static final int[] INPUT_SLOTS = {0, 1};
|
||||
private static final int[] OUTPUT_SLOTS = {2};
|
||||
|
||||
|
@ -51,12 +50,7 @@ public class AlloySmelterRecipeCategory implements IRecipeCategory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft) {
|
||||
electricity.draw(minecraft, 10, 20);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
package techreborn.compat.jei.alloySmelter;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import techreborn.api.recipe.machines.AlloySmelterRecipe;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class AlloySmelterRecipeHandler implements IRecipeHandler<AlloySmelterRecipe> {
|
||||
@Nonnull
|
||||
private final IJeiHelpers jeiHelpers;
|
||||
|
||||
public AlloySmelterRecipeHandler(@Nonnull IJeiHelpers jeiHelpers) {
|
||||
this.jeiHelpers = jeiHelpers;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<AlloySmelterRecipe> getRecipeClass() {
|
||||
|
@ -23,7 +31,7 @@ public class AlloySmelterRecipeHandler implements IRecipeHandler<AlloySmelterRec
|
|||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull AlloySmelterRecipe recipe) {
|
||||
return new AlloySmelterRecipeWrapper(recipe);
|
||||
return new AlloySmelterRecipeWrapper(jeiHelpers, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
package techreborn.compat.jei.alloySmelter;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import techreborn.api.recipe.machines.AlloySmelterRecipe;
|
||||
import techreborn.client.gui.GuiAlloySmelter;
|
||||
import techreborn.compat.jei.BaseRecipeWrapper;
|
||||
import techreborn.compat.jei.TechRebornJeiPlugin;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class AlloySmelterRecipeWrapper extends BaseRecipeWrapper<AlloySmelterRecipe> {
|
||||
private final IDrawableAnimated arrow;
|
||||
|
||||
public AlloySmelterRecipeWrapper(AlloySmelterRecipe baseRecipe) {
|
||||
public AlloySmelterRecipeWrapper(@Nonnull IJeiHelpers jeiHelpers, @Nonnull AlloySmelterRecipe baseRecipe) {
|
||||
super(baseRecipe);
|
||||
IGuiHelper guiHelper = TechRebornJeiPlugin.jeiHelpers.getGuiHelper();
|
||||
IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
|
||||
IDrawableStatic arrowStatic = guiHelper.createDrawable(GuiAlloySmelter.texture, 176, 14, 24, 17);
|
||||
this.arrow = guiHelper.createAnimatedDrawable(arrowStatic, baseRecipe.tickTime(), IDrawableAnimated.StartDirection.LEFT, false);
|
||||
}
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
package techreborn.compat.jei.assemblingMachine;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import techreborn.client.gui.GuiAssemblingMachine;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
import techreborn.compat.jei.RecipeUtil;
|
||||
|
||||
public class AssemblingMachineRecipeCategory implements IRecipeCategory {
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class AssemblingMachineRecipeCategory extends BlankRecipeCategory {
|
||||
private static final int[] INPUT_SLOTS = {0, 1};
|
||||
private static final int[] OUTPUT_SLOTS = {2};
|
||||
|
||||
|
@ -51,12 +50,7 @@ public class AssemblingMachineRecipeCategory implements IRecipeCategory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft) {
|
||||
electricity.draw(minecraft, 10, 20);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
package techreborn.compat.jei.assemblingMachine;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import techreborn.api.recipe.machines.AssemblingMachineRecipe;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class AssemblingMachineRecipeHandler implements IRecipeHandler<AssemblingMachineRecipe> {
|
||||
@Nonnull
|
||||
private final IJeiHelpers jeiHelpers;
|
||||
|
||||
public AssemblingMachineRecipeHandler(@Nonnull IJeiHelpers jeiHelpers) {
|
||||
this.jeiHelpers = jeiHelpers;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<AssemblingMachineRecipe> getRecipeClass() {
|
||||
|
@ -23,7 +31,7 @@ public class AssemblingMachineRecipeHandler implements IRecipeHandler<Assembling
|
|||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull AssemblingMachineRecipe recipe) {
|
||||
return new AssemblingMachineRecipeWrapper(recipe);
|
||||
return new AssemblingMachineRecipeWrapper(jeiHelpers, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
package techreborn.compat.jei.assemblingMachine;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import techreborn.api.recipe.machines.AssemblingMachineRecipe;
|
||||
import techreborn.client.gui.GuiAssemblingMachine;
|
||||
import techreborn.compat.jei.BaseRecipeWrapper;
|
||||
import techreborn.compat.jei.TechRebornJeiPlugin;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class AssemblingMachineRecipeWrapper extends BaseRecipeWrapper<AssemblingMachineRecipe> {
|
||||
private final IDrawableAnimated progress;
|
||||
|
||||
public AssemblingMachineRecipeWrapper(AssemblingMachineRecipe baseRecipe) {
|
||||
public AssemblingMachineRecipeWrapper(@Nonnull IJeiHelpers jeiHelpers, @Nonnull AssemblingMachineRecipe baseRecipe) {
|
||||
super(baseRecipe);
|
||||
IGuiHelper guiHelper = TechRebornJeiPlugin.jeiHelpers.getGuiHelper();
|
||||
IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
|
||||
IDrawableStatic progressStatic = guiHelper.createDrawable(GuiAssemblingMachine.texture, 176, 14, 20, 18);
|
||||
this.progress = guiHelper.createAnimatedDrawable(progressStatic, baseRecipe.tickTime(), IDrawableAnimated.StartDirection.LEFT, false);
|
||||
}
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
package techreborn.compat.jei.blastFurnace;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import techreborn.client.gui.GuiBlastFurnace;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
import techreborn.compat.jei.RecipeUtil;
|
||||
|
||||
public class BlastFurnaceRecipeCategory implements IRecipeCategory {
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class BlastFurnaceRecipeCategory extends BlankRecipeCategory {
|
||||
private static final int[] INPUT_SLOTS = {0, 1};
|
||||
private static final int[] OUTPUT_SLOTS = {2, 3};
|
||||
|
||||
|
@ -45,16 +43,6 @@ public class BlastFurnaceRecipeCategory implements IRecipeCategory {
|
|||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
package techreborn.compat.jei.blastFurnace;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import techreborn.api.recipe.machines.BlastFurnaceRecipe;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class BlastFurnaceRecipeHandler implements IRecipeHandler<BlastFurnaceRecipe> {
|
||||
@Nonnull
|
||||
private final IJeiHelpers jeiHelpers;
|
||||
|
||||
public BlastFurnaceRecipeHandler(@Nonnull IJeiHelpers jeiHelpers) {
|
||||
this.jeiHelpers = jeiHelpers;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<BlastFurnaceRecipe> getRecipeClass() {
|
||||
|
@ -23,7 +31,7 @@ public class BlastFurnaceRecipeHandler implements IRecipeHandler<BlastFurnaceRec
|
|||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull BlastFurnaceRecipe recipe) {
|
||||
return new BlastFurnaceRecipeWrapper(recipe);
|
||||
return new BlastFurnaceRecipeWrapper(jeiHelpers, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
package techreborn.compat.jei.blastFurnace;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import techreborn.api.recipe.machines.BlastFurnaceRecipe;
|
||||
import techreborn.client.gui.GuiBlastFurnace;
|
||||
import techreborn.compat.jei.BaseRecipeWrapper;
|
||||
import techreborn.compat.jei.TechRebornJeiPlugin;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class BlastFurnaceRecipeWrapper extends BaseRecipeWrapper<BlastFurnaceRecipe> {
|
||||
private final IDrawableAnimated progress;
|
||||
|
||||
public BlastFurnaceRecipeWrapper(BlastFurnaceRecipe baseRecipe) {
|
||||
public BlastFurnaceRecipeWrapper(@Nonnull IJeiHelpers jeiHelpers, @Nonnull BlastFurnaceRecipe baseRecipe) {
|
||||
super(baseRecipe);
|
||||
IGuiHelper guiHelper = TechRebornJeiPlugin.jeiHelpers.getGuiHelper();
|
||||
IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
|
||||
IDrawableStatic progressStatic = guiHelper.createDrawable(GuiBlastFurnace.texture, 176, 14, 20, 11);
|
||||
this.progress = guiHelper.createAnimatedDrawable(progressStatic, baseRecipe.tickTime(), IDrawableAnimated.StartDirection.LEFT, false);
|
||||
}
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
package techreborn.compat.jei.centrifuge;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import techreborn.client.gui.GuiCentrifuge;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
import techreborn.compat.jei.RecipeUtil;
|
||||
|
||||
public class CentrifugeRecipeCategory implements IRecipeCategory {
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class CentrifugeRecipeCategory extends BlankRecipeCategory {
|
||||
private static final int[] INPUT_SLOTS = {0, 1};
|
||||
private static final int[] OUTPUT_SLOTS = {2, 3, 4, 5};
|
||||
|
||||
|
@ -45,16 +43,6 @@ public class CentrifugeRecipeCategory implements IRecipeCategory {
|
|||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
package techreborn.compat.jei.centrifuge;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import techreborn.api.recipe.machines.CentrifugeRecipe;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class CentrifugeRecipeHandler implements IRecipeHandler<CentrifugeRecipe> {
|
||||
@Nonnull
|
||||
private final IJeiHelpers jeiHelpers;
|
||||
|
||||
public CentrifugeRecipeHandler(@Nonnull IJeiHelpers jeiHelpers) {
|
||||
this.jeiHelpers = jeiHelpers;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<CentrifugeRecipe> getRecipeClass() {
|
||||
|
@ -23,7 +31,7 @@ public class CentrifugeRecipeHandler implements IRecipeHandler<CentrifugeRecipe>
|
|||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull CentrifugeRecipe recipe) {
|
||||
return new CentrifugeRecipeWrapper(recipe);
|
||||
return new CentrifugeRecipeWrapper(jeiHelpers, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
package techreborn.compat.jei.centrifuge;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import techreborn.api.recipe.machines.CentrifugeRecipe;
|
||||
import techreborn.client.gui.GuiCentrifuge;
|
||||
import techreborn.compat.jei.BaseRecipeWrapper;
|
||||
import techreborn.compat.jei.TechRebornJeiPlugin;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class CentrifugeRecipeWrapper extends BaseRecipeWrapper<CentrifugeRecipe> {
|
||||
private final IDrawableAnimated progressUp;
|
||||
|
@ -18,9 +17,9 @@ public class CentrifugeRecipeWrapper extends BaseRecipeWrapper<CentrifugeRecipe>
|
|||
private final IDrawableAnimated progressDown;
|
||||
private final IDrawableAnimated progressRight;
|
||||
|
||||
public CentrifugeRecipeWrapper(CentrifugeRecipe baseRecipe) {
|
||||
public CentrifugeRecipeWrapper(@Nonnull IJeiHelpers jeiHelpers, @Nonnull CentrifugeRecipe baseRecipe) {
|
||||
super(baseRecipe);
|
||||
IGuiHelper guiHelper = TechRebornJeiPlugin.jeiHelpers.getGuiHelper();
|
||||
IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
|
||||
IDrawableStatic progressUpStatic = guiHelper.createDrawable(GuiCentrifuge.texture, 176, 14, 12, 12);
|
||||
IDrawableStatic progressLeftStatic = guiHelper.createDrawable(GuiCentrifuge.texture, 176, 26, 12, 12);
|
||||
IDrawableStatic progressDownStatic = guiHelper.createDrawable(GuiCentrifuge.texture, 176, 38, 12, 12);
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
package techreborn.compat.jei.chemicalReactor;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import techreborn.client.gui.GuiChemicalReactor;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
import techreborn.compat.jei.RecipeUtil;
|
||||
|
||||
public class ChemicalReactorRecipeCategory implements IRecipeCategory {
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ChemicalReactorRecipeCategory extends BlankRecipeCategory {
|
||||
private static final int[] INPUT_SLOTS = {0, 1};
|
||||
private static final int[] OUTPUT_SLOTS = {2};
|
||||
|
||||
|
@ -45,16 +43,6 @@ public class ChemicalReactorRecipeCategory implements IRecipeCategory {
|
|||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
|
||||
|
|
|
@ -1,14 +1,21 @@
|
|||
package techreborn.compat.jei.chemicalReactor;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import techreborn.api.recipe.machines.CentrifugeRecipe;
|
||||
import techreborn.api.recipe.machines.ChemicalReactorRecipe;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ChemicalReactorRecipeHandler implements IRecipeHandler<ChemicalReactorRecipe> {
|
||||
@Nonnull
|
||||
private final IJeiHelpers jeiHelpers;
|
||||
|
||||
public ChemicalReactorRecipeHandler(@Nonnull IJeiHelpers jeiHelpers) {
|
||||
this.jeiHelpers = jeiHelpers;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<ChemicalReactorRecipe> getRecipeClass() {
|
||||
|
@ -24,7 +31,7 @@ public class ChemicalReactorRecipeHandler implements IRecipeHandler<ChemicalReac
|
|||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull ChemicalReactorRecipe recipe) {
|
||||
return new ChemicalReactorRecipeWrapper(recipe);
|
||||
return new ChemicalReactorRecipeWrapper(jeiHelpers, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
package techreborn.compat.jei.chemicalReactor;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import techreborn.api.recipe.machines.ChemicalReactorRecipe;
|
||||
import techreborn.client.gui.GuiChemicalReactor;
|
||||
import techreborn.compat.jei.BaseRecipeWrapper;
|
||||
import techreborn.compat.jei.TechRebornJeiPlugin;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ChemicalReactorRecipeWrapper extends BaseRecipeWrapper<ChemicalReactorRecipe> {
|
||||
private final IDrawableAnimated progress;
|
||||
|
||||
public ChemicalReactorRecipeWrapper(ChemicalReactorRecipe baseRecipe) {
|
||||
public ChemicalReactorRecipeWrapper(@Nonnull IJeiHelpers jeiHelpers, @Nonnull ChemicalReactorRecipe baseRecipe) {
|
||||
super(baseRecipe);
|
||||
IGuiHelper guiHelper = TechRebornJeiPlugin.jeiHelpers.getGuiHelper();
|
||||
IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
|
||||
IDrawableStatic progressStatic = guiHelper.createDrawable(GuiChemicalReactor.texture, 176, 14, 32, 12);
|
||||
|
||||
int ticksPerCycle = baseRecipe.tickTime();
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
package techreborn.compat.jei.fusionReactor;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import techreborn.client.gui.GuiFusionReactor;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
|
||||
public class FusionReactorRecipeCategory implements IRecipeCategory {
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class FusionReactorRecipeCategory extends BlankRecipeCategory {
|
||||
|
||||
private static final int inputSlotTop = 0;
|
||||
private static final int inputSlotBottom = 1;
|
||||
|
@ -48,16 +46,6 @@ public class FusionReactorRecipeCategory implements IRecipeCategory {
|
|||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
|
||||
|
|
|
@ -1,30 +1,31 @@
|
|||
package techreborn.compat.jei.fusionReactor;
|
||||
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import techreborn.api.reactor.FusionReactorRecipe;
|
||||
import techreborn.compat.jei.RecipeUtil;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import techreborn.api.reactor.FusionReactorRecipe;
|
||||
import techreborn.compat.jei.RecipeUtil;
|
||||
|
||||
public class FusionReactorRecipeWrapper extends BlankRecipeWrapper {
|
||||
private FusionReactorRecipe baseRecipe;
|
||||
private final FusionReactorRecipe baseRecipe;
|
||||
|
||||
public FusionReactorRecipeWrapper(FusionReactorRecipe baseRecipe) {
|
||||
this.baseRecipe = baseRecipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<ItemStack> getInputs() {
|
||||
return Arrays.asList(baseRecipe.getTopInput(), baseRecipe.getBottomInput());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<ItemStack> getOutputs() {
|
||||
return Collections.singletonList(baseRecipe.getOutput());
|
||||
}
|
||||
|
@ -38,7 +39,7 @@ public class FusionReactorRecipeWrapper extends BlankRecipeWrapper {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {
|
||||
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) {
|
||||
RecipeUtil.drawInfo(minecraft, 0, 67, baseRecipe.getStartEU(), baseRecipe.getEuTick(), baseRecipe.getTickTime());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
package techreborn.compat.jei.grinder;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiFluidStackGroup;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import techreborn.client.gui.GuiGrinder;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
import techreborn.compat.jei.RecipeUtil;
|
||||
import techreborn.tiles.TileGrinder;
|
||||
|
||||
public class GrinderRecipeCategory implements IRecipeCategory {
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class GrinderRecipeCategory extends BlankRecipeCategory {
|
||||
private static final int[] INPUT_SLOTS = {0, 1};
|
||||
private static final int[] OUTPUT_SLOTS = {2, 3, 4, 5};
|
||||
private static final int[] INPUT_TANKS = {0};
|
||||
|
@ -53,15 +52,10 @@ public class GrinderRecipeCategory implements IRecipeCategory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
public void drawExtras(@Nonnull Minecraft minecraft) {
|
||||
blankArea.draw(minecraft, 129, 49);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
|
||||
|
|
|
@ -1,14 +1,21 @@
|
|||
package techreborn.compat.jei.grinder;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import techreborn.api.recipe.machines.ChemicalReactorRecipe;
|
||||
import techreborn.api.recipe.machines.GrinderRecipe;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class GrinderRecipeHandler implements IRecipeHandler<GrinderRecipe> {
|
||||
@Nonnull
|
||||
private final IJeiHelpers jeiHelpers;
|
||||
|
||||
public GrinderRecipeHandler(@Nonnull IJeiHelpers jeiHelpers) {
|
||||
this.jeiHelpers = jeiHelpers;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<GrinderRecipe> getRecipeClass() {
|
||||
|
@ -24,7 +31,7 @@ public class GrinderRecipeHandler implements IRecipeHandler<GrinderRecipe> {
|
|||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull GrinderRecipe recipe) {
|
||||
return new GrinderRecipeWrapper(recipe);
|
||||
return new GrinderRecipeWrapper(jeiHelpers, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,27 +1,25 @@
|
|||
package techreborn.compat.jei.grinder;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import techreborn.api.recipe.machines.GrinderRecipe;
|
||||
import techreborn.client.gui.GuiGrinder;
|
||||
import techreborn.compat.jei.BaseRecipeWrapper;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import techreborn.api.recipe.machines.GrinderRecipe;
|
||||
import techreborn.client.gui.GuiGrinder;
|
||||
import techreborn.compat.jei.BaseRecipeWrapper;
|
||||
import techreborn.compat.jei.TechRebornJeiPlugin;
|
||||
|
||||
public class GrinderRecipeWrapper extends BaseRecipeWrapper<GrinderRecipe> {
|
||||
private final IDrawableAnimated progress;
|
||||
|
||||
public GrinderRecipeWrapper(GrinderRecipe baseRecipe) {
|
||||
public GrinderRecipeWrapper(@Nonnull IJeiHelpers jeiHelpers, @Nonnull GrinderRecipe baseRecipe) {
|
||||
super(baseRecipe);
|
||||
IGuiHelper guiHelper = TechRebornJeiPlugin.jeiHelpers.getGuiHelper();
|
||||
IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
|
||||
IDrawableStatic progressStatic = guiHelper.createDrawable(GuiGrinder.texture, 176, 14, 24, 17);
|
||||
|
||||
int ticksPerCycle = baseRecipe.tickTime();
|
||||
|
@ -29,6 +27,7 @@ public class GrinderRecipeWrapper extends BaseRecipeWrapper<GrinderRecipe> {
|
|||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<FluidStack> getFluidInputs() {
|
||||
if (baseRecipe.fluidStack != null) {
|
||||
return Collections.singletonList(baseRecipe.fluidStack);
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
package techreborn.compat.jei.implosionCompressor;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import techreborn.client.gui.GuiImplosionCompressor;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
import techreborn.compat.jei.RecipeUtil;
|
||||
|
||||
public class ImplosionCompressorRecipeCategory implements IRecipeCategory {
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ImplosionCompressorRecipeCategory extends BlankRecipeCategory {
|
||||
private static final int[] INPUT_SLOTS = {0, 1};
|
||||
private static final int[] OUTPUT_SLOTS = {2, 3};
|
||||
|
||||
|
@ -51,12 +50,7 @@ public class ImplosionCompressorRecipeCategory implements IRecipeCategory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft) {
|
||||
electricity.draw(minecraft, 0, 12);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
package techreborn.compat.jei.implosionCompressor;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import techreborn.api.recipe.machines.ImplosionCompressorRecipe;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ImplosionCompressorRecipeHandler implements IRecipeHandler<ImplosionCompressorRecipe> {
|
||||
@Nonnull
|
||||
private final IJeiHelpers jeiHelpers;
|
||||
|
||||
public ImplosionCompressorRecipeHandler(@Nonnull IJeiHelpers jeiHelpers) {
|
||||
this.jeiHelpers = jeiHelpers;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<ImplosionCompressorRecipe> getRecipeClass() {
|
||||
|
@ -23,7 +31,7 @@ public class ImplosionCompressorRecipeHandler implements IRecipeHandler<Implosio
|
|||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull ImplosionCompressorRecipe recipe) {
|
||||
return new ImplosionCompressorRecipeWrapper(recipe);
|
||||
return new ImplosionCompressorRecipeWrapper(jeiHelpers, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
package techreborn.compat.jei.implosionCompressor;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import techreborn.api.recipe.machines.ImplosionCompressorRecipe;
|
||||
import techreborn.client.gui.GuiImplosionCompressor;
|
||||
import techreborn.compat.jei.BaseRecipeWrapper;
|
||||
import techreborn.compat.jei.TechRebornJeiPlugin;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ImplosionCompressorRecipeWrapper extends BaseRecipeWrapper<ImplosionCompressorRecipe> {
|
||||
private final IDrawableAnimated progress;
|
||||
|
||||
public ImplosionCompressorRecipeWrapper(ImplosionCompressorRecipe baseRecipe) {
|
||||
public ImplosionCompressorRecipeWrapper(@Nonnull IJeiHelpers jeiHelpers, @Nonnull ImplosionCompressorRecipe baseRecipe) {
|
||||
super(baseRecipe);
|
||||
IGuiHelper guiHelper = TechRebornJeiPlugin.jeiHelpers.getGuiHelper();
|
||||
IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
|
||||
IDrawableStatic progressStatic = guiHelper.createDrawable(GuiImplosionCompressor.texture, 176, 14, 21, 11);
|
||||
this.progress = guiHelper.createAnimatedDrawable(progressStatic, baseRecipe.tickTime(), IDrawableAnimated.StartDirection.LEFT, false);
|
||||
}
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
package techreborn.compat.jei.industrialElectrolyzer;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import techreborn.client.gui.GuiIndustrialElectrolyzer;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
import techreborn.compat.jei.RecipeUtil;
|
||||
|
||||
public class IndustrialElectrolyzerRecipeCategory implements IRecipeCategory {
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class IndustrialElectrolyzerRecipeCategory extends BlankRecipeCategory {
|
||||
private static final int[] INPUT_SLOTS = {0, 1};
|
||||
private static final int[] OUTPUT_SLOTS = {2, 3, 4, 5};
|
||||
|
||||
|
@ -45,16 +43,6 @@ public class IndustrialElectrolyzerRecipeCategory implements IRecipeCategory {
|
|||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
package techreborn.compat.jei.industrialElectrolyzer;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import techreborn.api.recipe.machines.IndustrialElectrolyzerRecipe;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class IndustrialElectrolyzerRecipeHandler implements IRecipeHandler<IndustrialElectrolyzerRecipe> {
|
||||
@Nonnull
|
||||
private final IJeiHelpers jeiHelpers;
|
||||
|
||||
public IndustrialElectrolyzerRecipeHandler(@Nonnull IJeiHelpers jeiHelpers) {
|
||||
this.jeiHelpers = jeiHelpers;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<IndustrialElectrolyzerRecipe> getRecipeClass() {
|
||||
|
@ -23,7 +31,7 @@ public class IndustrialElectrolyzerRecipeHandler implements IRecipeHandler<Indus
|
|||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull IndustrialElectrolyzerRecipe recipe) {
|
||||
return new IndustrialElectrolyzerRecipeWrapper(recipe);
|
||||
return new IndustrialElectrolyzerRecipeWrapper(jeiHelpers, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
package techreborn.compat.jei.industrialElectrolyzer;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import techreborn.api.recipe.machines.IndustrialElectrolyzerRecipe;
|
||||
import techreborn.client.gui.GuiIndustrialElectrolyzer;
|
||||
import techreborn.compat.jei.BaseRecipeWrapper;
|
||||
import techreborn.compat.jei.TechRebornJeiPlugin;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class IndustrialElectrolyzerRecipeWrapper extends BaseRecipeWrapper<IndustrialElectrolyzerRecipe> {
|
||||
private final IDrawableAnimated progress;
|
||||
|
||||
public IndustrialElectrolyzerRecipeWrapper(IndustrialElectrolyzerRecipe baseRecipe) {
|
||||
public IndustrialElectrolyzerRecipeWrapper(@Nonnull IJeiHelpers jeiHelpers, @Nonnull IndustrialElectrolyzerRecipe baseRecipe) {
|
||||
super(baseRecipe);
|
||||
IGuiHelper guiHelper = TechRebornJeiPlugin.jeiHelpers.getGuiHelper();
|
||||
IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
|
||||
IDrawableStatic progressStatic = guiHelper.createDrawable(GuiIndustrialElectrolyzer.texture, 176, 14, 30, 10);
|
||||
this.progress = guiHelper.createAnimatedDrawable(progressStatic, baseRecipe.tickTime(), IDrawableAnimated.StartDirection.BOTTOM, false);
|
||||
}
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
package techreborn.compat.jei.industrialSawmill;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiFluidStackGroup;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import techreborn.client.gui.GuiIndustrialSawmill;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
import techreborn.compat.jei.RecipeUtil;
|
||||
import techreborn.tiles.TileIndustrialSawmill;
|
||||
|
||||
public class IndustrialSawmillRecipeCategory implements IRecipeCategory {
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class IndustrialSawmillRecipeCategory extends BlankRecipeCategory {
|
||||
private static final int[] INPUT_SLOTS = {0, 1};
|
||||
private static final int[] OUTPUT_SLOTS = {2, 3, 4};
|
||||
private static final int[] INPUT_TANKS = {0};
|
||||
|
@ -53,15 +52,10 @@ public class IndustrialSawmillRecipeCategory implements IRecipeCategory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
public void drawExtras(@Nonnull Minecraft minecraft) {
|
||||
blankArea.draw(minecraft, 31, 51);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
package techreborn.compat.jei.industrialSawmill;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class IndustrialSawmillRecipeHandler implements IRecipeHandler<IndustrialSawmillRecipe> {
|
||||
@Nonnull
|
||||
private final IJeiHelpers jeiHelpers;
|
||||
|
||||
public IndustrialSawmillRecipeHandler(@Nonnull IJeiHelpers jeiHelpers) {
|
||||
this.jeiHelpers = jeiHelpers;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<IndustrialSawmillRecipe> getRecipeClass() {
|
||||
|
@ -23,7 +31,7 @@ public class IndustrialSawmillRecipeHandler implements IRecipeHandler<Industrial
|
|||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull IndustrialSawmillRecipe recipe) {
|
||||
return new IndustrialSawmillRecipeWrapper(recipe);
|
||||
return new IndustrialSawmillRecipeWrapper(jeiHelpers, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,27 +1,25 @@
|
|||
package techreborn.compat.jei.industrialSawmill;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
|
||||
import techreborn.client.gui.GuiIndustrialSawmill;
|
||||
import techreborn.compat.jei.BaseRecipeWrapper;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
|
||||
import techreborn.client.gui.GuiIndustrialSawmill;
|
||||
import techreborn.compat.jei.BaseRecipeWrapper;
|
||||
import techreborn.compat.jei.TechRebornJeiPlugin;
|
||||
|
||||
public class IndustrialSawmillRecipeWrapper extends BaseRecipeWrapper<IndustrialSawmillRecipe> {
|
||||
private final IDrawableAnimated progress;
|
||||
|
||||
public IndustrialSawmillRecipeWrapper(IndustrialSawmillRecipe baseRecipe) {
|
||||
public IndustrialSawmillRecipeWrapper(@Nonnull IJeiHelpers jeiHelpers, @Nonnull IndustrialSawmillRecipe baseRecipe) {
|
||||
super(baseRecipe);
|
||||
IGuiHelper guiHelper = TechRebornJeiPlugin.jeiHelpers.getGuiHelper();
|
||||
IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
|
||||
IDrawableStatic progressStatic = guiHelper.createDrawable(GuiIndustrialSawmill.texture, 176, 14, 20, 12);
|
||||
|
||||
int ticksPerCycle = baseRecipe.tickTime();
|
||||
|
@ -29,6 +27,7 @@ public class IndustrialSawmillRecipeWrapper extends BaseRecipeWrapper<Industrial
|
|||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<FluidStack> getFluidInputs() {
|
||||
if (baseRecipe.fluidStack != null) {
|
||||
return Collections.singletonList(baseRecipe.fluidStack);
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
package techreborn.compat.jei.rollingMachine;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.ICraftingGridHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
|
@ -12,12 +7,16 @@ import mezz.jei.api.gui.IDrawableAnimated;
|
|||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import techreborn.client.gui.GuiRollingMachine;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
|
||||
public class RollingMachineRecipeCategory implements IRecipeCategory {
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class RollingMachineRecipeCategory extends BlankRecipeCategory {
|
||||
private static final int[] INPUT_SLOTS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
|
||||
private static final int[] OUTPUT_SLOTS = {10};
|
||||
|
||||
|
@ -55,12 +54,7 @@ public class RollingMachineRecipeCategory implements IRecipeCategory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft) {
|
||||
progress.draw(minecraft, 62, 18);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
package techreborn.compat.jei.rollingMachine;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.item.crafting.ShapedRecipes;
|
||||
import net.minecraft.item.crafting.ShapelessRecipes;
|
||||
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import mezz.jei.api.recipe.wrapper.ICraftingRecipeWrapper;
|
||||
import mezz.jei.plugins.vanilla.crafting.ShapedOreRecipeWrapper;
|
||||
import mezz.jei.plugins.vanilla.crafting.ShapedRecipesWrapper;
|
||||
import mezz.jei.plugins.vanilla.crafting.ShapelessOreRecipeWrapper;
|
||||
import mezz.jei.plugins.vanilla.crafting.ShapelessRecipesWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.item.crafting.ShapedRecipes;
|
||||
import net.minecraft.item.crafting.ShapelessRecipes;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class RollingMachineRecipeWrapper extends BlankRecipeWrapper implements ICraftingRecipeWrapper {
|
||||
private final ICraftingRecipeWrapper baseRecipe;
|
||||
|
@ -44,11 +43,13 @@ public class RollingMachineRecipeWrapper extends BlankRecipeWrapper implements I
|
|||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List getInputs() {
|
||||
return baseRecipe.getInputs();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<ItemStack> getOutputs() {
|
||||
return baseRecipe.getOutputs();
|
||||
}
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
package techreborn.compat.jei.vacuumFreezer;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import techreborn.client.gui.GuiVacuumFreezer;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
import techreborn.compat.jei.RecipeUtil;
|
||||
|
||||
public class VacuumFreezerRecipeCategory implements IRecipeCategory {
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class VacuumFreezerRecipeCategory extends BlankRecipeCategory {
|
||||
private static final int[] INPUT_SLOTS = {0};
|
||||
private static final int[] OUTPUT_SLOTS = {1};
|
||||
|
||||
|
@ -45,16 +43,6 @@ public class VacuumFreezerRecipeCategory implements IRecipeCategory {
|
|||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
package techreborn.compat.jei.vacuumFreezer;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import techreborn.api.recipe.machines.VacuumFreezerRecipe;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class VacuumFreezerRecipeHandler implements IRecipeHandler<VacuumFreezerRecipe> {
|
||||
@Nonnull
|
||||
private final IJeiHelpers jeiHelpers;
|
||||
|
||||
public VacuumFreezerRecipeHandler(@Nonnull IJeiHelpers jeiHelpers) {
|
||||
this.jeiHelpers = jeiHelpers;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<VacuumFreezerRecipe> getRecipeClass() {
|
||||
|
@ -23,7 +31,7 @@ public class VacuumFreezerRecipeHandler implements IRecipeHandler<VacuumFreezerR
|
|||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull VacuumFreezerRecipe recipe) {
|
||||
return new VacuumFreezerRecipeWrapper(recipe);
|
||||
return new VacuumFreezerRecipeWrapper(jeiHelpers, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
package techreborn.compat.jei.vacuumFreezer;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import techreborn.api.recipe.machines.VacuumFreezerRecipe;
|
||||
import techreborn.client.gui.GuiVacuumFreezer;
|
||||
import techreborn.compat.jei.BaseRecipeWrapper;
|
||||
import techreborn.compat.jei.TechRebornJeiPlugin;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class VacuumFreezerRecipeWrapper extends BaseRecipeWrapper<VacuumFreezerRecipe> {
|
||||
private final IDrawableAnimated progress;
|
||||
|
||||
public VacuumFreezerRecipeWrapper(VacuumFreezerRecipe baseRecipe) {
|
||||
public VacuumFreezerRecipeWrapper(@Nonnull IJeiHelpers jeiHelpers, @Nonnull VacuumFreezerRecipe baseRecipe) {
|
||||
super(baseRecipe);
|
||||
IGuiHelper guiHelper = TechRebornJeiPlugin.jeiHelpers.getGuiHelper();
|
||||
IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
|
||||
IDrawableStatic progressStatic = guiHelper.createDrawable(GuiVacuumFreezer.texture, 176, 14, 20, 11);
|
||||
|
||||
int ticksPerCycle = baseRecipe.tickTime();
|
||||
|
|
Loading…
Reference in a new issue