Centrifuge stuff
This commit is contained in:
parent
0a9a62c455
commit
3c40e25b6a
6 changed files with 179 additions and 134 deletions
|
@ -1,13 +1,16 @@
|
|||
package techreborn.compat.jei;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.BlankModPlugin;
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.IModRegistry;
|
||||
import mezz.jei.api.recipe.VanillaRecipeCategoryUid;
|
||||
import mezz.jei.api.recipe.transfer.IRecipeTransferRegistry;
|
||||
import mezz.jei.config.Config;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
import reborncore.api.recipe.RecipeHandler;
|
||||
|
||||
import techreborn.Core;
|
||||
import techreborn.api.generator.EFluidGenerator;
|
||||
import techreborn.api.generator.GeneratorRecipeHelper;
|
||||
|
@ -59,17 +62,10 @@ import techreborn.items.ItemParts;
|
|||
import techreborn.parts.TechRebornParts;
|
||||
import techreborn.parts.powerCables.EnumCableType;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mezz.jei.api.BlankModPlugin;
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.IModRegistry;
|
||||
import mezz.jei.api.recipe.VanillaRecipeCategoryUid;
|
||||
import mezz.jei.api.recipe.transfer.IRecipeTransferRegistry;
|
||||
import mezz.jei.config.Config;
|
||||
|
||||
@mezz.jei.api.JEIPlugin
|
||||
public class TechRebornJeiPlugin extends BlankModPlugin {
|
||||
private static void addDebugRecipes(final IModRegistry registry) {
|
||||
|
@ -79,13 +75,13 @@ public class TechRebornJeiPlugin extends BlankModPlugin {
|
|||
for (int i = 0; i < 10; i++) {
|
||||
final int time = (int) Math.round(200 + Math.random() * 100);
|
||||
final AssemblingMachineRecipe assemblingMachineRecipe = new AssemblingMachineRecipe(diamondBlock, diamondBlock,
|
||||
dirtBlock, time, 120);
|
||||
dirtBlock, time, 120);
|
||||
debugRecipes.add(assemblingMachineRecipe);
|
||||
}
|
||||
for (int i = 0; i < 10; i++) {
|
||||
final int time = (int) Math.round(200 + Math.random() * 100);
|
||||
final ImplosionCompressorRecipe recipe = new ImplosionCompressorRecipe(diamondBlock, diamondBlock, dirtBlock,
|
||||
dirtBlock, time, 120);
|
||||
dirtBlock, time, 120);
|
||||
debugRecipes.add(recipe);
|
||||
}
|
||||
registry.addRecipes(debugRecipes);
|
||||
|
@ -93,8 +89,9 @@ public class TechRebornJeiPlugin extends BlankModPlugin {
|
|||
|
||||
@Override
|
||||
public void register(
|
||||
@Nonnull final
|
||||
IModRegistry registry) {
|
||||
@Nonnull
|
||||
final
|
||||
IModRegistry registry) {
|
||||
final IJeiHelpers jeiHelpers = registry.getJeiHelpers();
|
||||
final IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
|
||||
|
||||
|
@ -132,13 +129,13 @@ public class TechRebornJeiPlugin extends BlankModPlugin {
|
|||
jeiHelpers.getItemBlacklist().addItemToBlacklist(new ItemStack(ModFluids.BLOCK_OIL));
|
||||
jeiHelpers.getItemBlacklist().addItemToBlacklist(new ItemStack(ModItems.MISSING_RECIPE_PLACEHOLDER));
|
||||
|
||||
if(IC2Duplicates.deduplicate()){
|
||||
for(final IC2Duplicates duplicate : IC2Duplicates.values()){
|
||||
if(duplicate.hasIC2Stack()){
|
||||
if (IC2Duplicates.deduplicate()) {
|
||||
for (final IC2Duplicates duplicate : IC2Duplicates.values()) {
|
||||
if (duplicate.hasIC2Stack()) {
|
||||
jeiHelpers.getItemBlacklist().addItemToBlacklist(duplicate.getTrStack());
|
||||
}
|
||||
}
|
||||
if(TechRebornParts.cables != null){
|
||||
if (TechRebornParts.cables != null) {
|
||||
for (int i = 0; i < EnumCableType.values().length; i++) {
|
||||
jeiHelpers.getItemBlacklist().addItemToBlacklist(new ItemStack(TechRebornParts.cables, 1, i));
|
||||
}
|
||||
|
@ -147,7 +144,7 @@ public class TechRebornJeiPlugin extends BlankModPlugin {
|
|||
jeiHelpers.getItemBlacklist().addItemToBlacklist(ItemParts.getPartByName("rubberSap"));
|
||||
jeiHelpers.getItemBlacklist().addItemToBlacklist(ItemParts.getPartByName("electronicCircuit"));
|
||||
jeiHelpers.getItemBlacklist().addItemToBlacklist(ItemParts.getPartByName("advancedCircuit"));
|
||||
if(!Core.worldGen.config.rubberTreeConfig.shouldSpawn){
|
||||
if (!Core.worldGen.config.rubberTreeConfig.shouldSpawn) {
|
||||
jeiHelpers.getItemBlacklist().addItemToBlacklist(new ItemStack(ModBlocks.RUBBER_SAPLING));
|
||||
jeiHelpers.getItemBlacklist().addItemToBlacklist(new ItemStack(ModBlocks.RUBBER_LOG));
|
||||
jeiHelpers.getItemBlacklist().addItemToBlacklist(new ItemStack(ModBlocks.RUBBER_PLANKS));
|
||||
|
@ -158,26 +155,26 @@ public class TechRebornJeiPlugin extends BlankModPlugin {
|
|||
}
|
||||
|
||||
registry.addRecipeCategories(new AlloySmelterRecipeCategory(guiHelper),
|
||||
new AssemblingMachineRecipeCategory(guiHelper), new BlastFurnaceRecipeCategory(guiHelper),
|
||||
new CentrifugeRecipeCategory(guiHelper), new ChemicalReactorRecipeCategory(guiHelper),
|
||||
new FusionReactorRecipeCategory(guiHelper), new IndustrialGrinderRecipeCategory(guiHelper),
|
||||
new ImplosionCompressorRecipeCategory(guiHelper), new IndustrialElectrolyzerRecipeCategory(guiHelper),
|
||||
new RollingMachineRecipeCategory(guiHelper), new VacuumFreezerRecipeCategory(guiHelper),
|
||||
new GrinderRecipeCategory(guiHelper), new ExtractorRecipeCategory(guiHelper),
|
||||
new CompressorRecipeCategory(guiHelper), new ScrapboxRecipeCategory(guiHelper));
|
||||
new AssemblingMachineRecipeCategory(guiHelper), new BlastFurnaceRecipeCategory(guiHelper),
|
||||
new CentrifugeRecipeCategory(guiHelper), new ChemicalReactorRecipeCategory(guiHelper),
|
||||
new FusionReactorRecipeCategory(guiHelper), new IndustrialGrinderRecipeCategory(guiHelper),
|
||||
new ImplosionCompressorRecipeCategory(guiHelper), new IndustrialElectrolyzerRecipeCategory(guiHelper),
|
||||
new RollingMachineRecipeCategory(guiHelper), new VacuumFreezerRecipeCategory(guiHelper),
|
||||
new GrinderRecipeCategory(guiHelper), new ExtractorRecipeCategory(guiHelper),
|
||||
new CompressorRecipeCategory(guiHelper), new ScrapboxRecipeCategory(guiHelper));
|
||||
|
||||
for(final EFluidGenerator type : EFluidGenerator.values())
|
||||
for (final EFluidGenerator type : EFluidGenerator.values())
|
||||
registry.addRecipeCategories(new FluidGeneratorRecipeCategory(type, guiHelper));
|
||||
|
||||
registry.addRecipeHandlers(new AlloySmelterRecipeHandler(jeiHelpers),
|
||||
new AssemblingMachineRecipeHandler(jeiHelpers), new BlastFurnaceRecipeHandler(jeiHelpers),
|
||||
new CentrifugeRecipeHandler(jeiHelpers), new ChemicalReactorRecipeHandler(jeiHelpers),
|
||||
new FusionReactorRecipeHandler(), new IndustrialGrinderRecipeHandler(jeiHelpers),
|
||||
new ImplosionCompressorRecipeHandler(jeiHelpers), new IndustrialElectrolyzerRecipeHandler(jeiHelpers),
|
||||
new RollingMachineRecipeHandler(), new VacuumFreezerRecipeHandler(jeiHelpers),
|
||||
new GrinderRecipeHandler(jeiHelpers), new ExtractorRecipeHandler(jeiHelpers),
|
||||
new CompressorRecipeHandler(jeiHelpers), new ScrapboxRecipeHandler(jeiHelpers),
|
||||
new FluidGeneratorRecipeHandler(jeiHelpers));
|
||||
new AssemblingMachineRecipeHandler(jeiHelpers), new BlastFurnaceRecipeHandler(jeiHelpers),
|
||||
new CentrifugeRecipeHandler(jeiHelpers), new ChemicalReactorRecipeHandler(jeiHelpers),
|
||||
new FusionReactorRecipeHandler(), new IndustrialGrinderRecipeHandler(jeiHelpers),
|
||||
new ImplosionCompressorRecipeHandler(jeiHelpers), new IndustrialElectrolyzerRecipeHandler(jeiHelpers),
|
||||
new RollingMachineRecipeHandler(), new VacuumFreezerRecipeHandler(jeiHelpers),
|
||||
new GrinderRecipeHandler(jeiHelpers), new ExtractorRecipeHandler(jeiHelpers),
|
||||
new CompressorRecipeHandler(jeiHelpers), new ScrapboxRecipeHandler(jeiHelpers),
|
||||
new FluidGeneratorRecipeHandler(jeiHelpers));
|
||||
|
||||
registry.addRecipes(RecipeHandler.recipeList);
|
||||
registry.addRecipes(FusionReactorRecipeHelper.reactorRecipes);
|
||||
|
@ -188,7 +185,7 @@ public class TechRebornJeiPlugin extends BlankModPlugin {
|
|||
registry.addRecipes(RollingMachineRecipeMaker.getRecipes(jeiHelpers));
|
||||
} catch (final RuntimeException e) {
|
||||
Core.logHelper
|
||||
.error("Could not register rolling machine recipes. JEI may have changed its internal recipe wrapper locations.");
|
||||
.error("Could not register rolling machine recipes. JEI may have changed its internal recipe wrapper locations.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
@ -197,118 +194,115 @@ public class TechRebornJeiPlugin extends BlankModPlugin {
|
|||
}
|
||||
|
||||
registry.addDescription(ItemParts.getPartByName("rubberSap"),
|
||||
I18n.translateToLocal("techreborn.desc.rubberSap"));
|
||||
I18n.translateToLocal("techreborn.desc.rubberSap"));
|
||||
if (!ConfigTechReborn.ScrapboxDispenser) {
|
||||
registry.addDescription(new ItemStack(ModItems.SCRAP_BOX),
|
||||
I18n.translateToLocal("techreborn.desc.scrapBoxNoDispenser"));
|
||||
I18n.translateToLocal("techreborn.desc.scrapBoxNoDispenser"));
|
||||
} else {
|
||||
registry.addDescription(new ItemStack(ModItems.SCRAP_BOX),
|
||||
I18n.translateToLocal("techreborn.desc.scrapBox"));
|
||||
I18n.translateToLocal("techreborn.desc.scrapBox"));
|
||||
}
|
||||
|
||||
registry.addRecipeClickArea(GuiAlloyFurnace.class, 80, 35, 26, 20, RecipeCategoryUids.ALLOY_SMELTER,
|
||||
VanillaRecipeCategoryUid.FUEL);
|
||||
VanillaRecipeCategoryUid.FUEL);
|
||||
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, 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(GuiCentrifuge.class, 150, 4, 20, 12, 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(GuiIndustrialGrinder.class, 50, 35, 25, 16, RecipeCategoryUids.INDUSTRIAL_GRINDER);
|
||||
registry.addRecipeClickArea(GuiImplosionCompressor.class, 60, 37, 24, 15,
|
||||
RecipeCategoryUids.IMPLOSION_COMPRESSOR);
|
||||
RecipeCategoryUids.IMPLOSION_COMPRESSOR);
|
||||
registry.addRecipeClickArea(GuiIndustrialElectrolyzer.class, 72, 37, 33, 14,
|
||||
RecipeCategoryUids.INDUSTRIAL_ELECTROLYZER);
|
||||
RecipeCategoryUids.INDUSTRIAL_ELECTROLYZER);
|
||||
registry.addRecipeClickArea(GuiRollingMachine.class, 89, 32, 26, 25, RecipeCategoryUids.ROLLING_MACHINE);
|
||||
registry.addRecipeClickArea(GuiVacuumFreezer.class, 78, 36, 24, 16, RecipeCategoryUids.VACUUM_FREEZER);
|
||||
registry.addRecipeClickArea(GuiGrinder.class, 78, 36, 24, 16, RecipeCategoryUids.GRINDER);
|
||||
registry.addRecipeClickArea(GuiExtractor.class, 78, 36, 24, 16, RecipeCategoryUids.EXTRACTOR);
|
||||
registry.addRecipeClickArea(GuiCompressor.class, 78, 36, 24, 16, RecipeCategoryUids.COMPRESSOR);
|
||||
registry.addRecipeClickArea(GuiIronFurnace.class, 78, 36, 24, 16, VanillaRecipeCategoryUid.SMELTING,
|
||||
VanillaRecipeCategoryUid.FUEL);
|
||||
VanillaRecipeCategoryUid.FUEL);
|
||||
registry.addRecipeClickArea(GuiElectricFurnace.class, 78, 36, 24, 16, VanillaRecipeCategoryUid.SMELTING);
|
||||
|
||||
registry.addRecipeClickArea(GuiSemifluidGenerator.class, 79, 34, 18, 18,
|
||||
EFluidGenerator.SEMIFLUID.getRecipeID());
|
||||
EFluidGenerator.SEMIFLUID.getRecipeID());
|
||||
registry.addRecipeClickArea(GuiDieselGenerator.class, 79, 34, 18, 18,
|
||||
EFluidGenerator.DIESEL.getRecipeID());
|
||||
EFluidGenerator.DIESEL.getRecipeID());
|
||||
registry.addRecipeClickArea(GuiGasTurbine.class, 79, 34, 18, 18,
|
||||
EFluidGenerator.GAS.getRecipeID());
|
||||
EFluidGenerator.GAS.getRecipeID());
|
||||
registry.addRecipeClickArea(GuiThermalGenerator.class, 79, 34, 18, 18,
|
||||
EFluidGenerator.THERMAL.getRecipeID());
|
||||
EFluidGenerator.THERMAL.getRecipeID());
|
||||
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.COMPRESSOR), RecipeCategoryUids.COMPRESSOR);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.IRON_ALLOY_FURNACE), RecipeCategoryUids.ALLOY_SMELTER);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.ALLOY_SMELTER), RecipeCategoryUids.ALLOY_SMELTER);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.ASSEMBLY_MACHINE),
|
||||
RecipeCategoryUids.ASSEMBLING_MACHINE);
|
||||
RecipeCategoryUids.ASSEMBLING_MACHINE);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.INDUSTRIAL_BLAST_FURNACE), RecipeCategoryUids.BLAST_FURNACE);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.INDUSTRIAL_CENTRIFUGE), RecipeCategoryUids.CENTRIFUGE);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.CHEMICAL_REACTOR),
|
||||
RecipeCategoryUids.CHEMICAL_REACTOR);
|
||||
RecipeCategoryUids.CHEMICAL_REACTOR);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.EXTRACTOR), RecipeCategoryUids.EXTRACTOR);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.FUSION_CONTROL_COMPUTER),
|
||||
RecipeCategoryUids.FUSION_REACTOR);
|
||||
RecipeCategoryUids.FUSION_REACTOR);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.GRINDER), RecipeCategoryUids.GRINDER);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.IMPLOSION_COMPRESSOR),
|
||||
RecipeCategoryUids.IMPLOSION_COMPRESSOR);
|
||||
RecipeCategoryUids.IMPLOSION_COMPRESSOR);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.INDUSTRIAL_ELECTROLYZER),
|
||||
RecipeCategoryUids.INDUSTRIAL_ELECTROLYZER);
|
||||
RecipeCategoryUids.INDUSTRIAL_ELECTROLYZER);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.INDUSTRIAL_GRINDER),
|
||||
RecipeCategoryUids.INDUSTRIAL_GRINDER);
|
||||
RecipeCategoryUids.INDUSTRIAL_GRINDER);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.ROLLING_MACHINE),
|
||||
RecipeCategoryUids.ROLLING_MACHINE);
|
||||
RecipeCategoryUids.ROLLING_MACHINE);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModItems.SCRAP_BOX), RecipeCategoryUids.SCRAPBOX);
|
||||
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.SEMIFLUID_GENERATOR),
|
||||
EFluidGenerator.SEMIFLUID.getRecipeID());
|
||||
EFluidGenerator.SEMIFLUID.getRecipeID());
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.GAS_TURBINE),
|
||||
EFluidGenerator.GAS.getRecipeID());
|
||||
EFluidGenerator.GAS.getRecipeID());
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.DIESEL_GENERATOR),
|
||||
EFluidGenerator.DIESEL.getRecipeID());
|
||||
EFluidGenerator.DIESEL.getRecipeID());
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.THERMAL_GENERATOR),
|
||||
EFluidGenerator.THERMAL.getRecipeID());
|
||||
EFluidGenerator.THERMAL.getRecipeID());
|
||||
|
||||
final IRecipeTransferRegistry recipeTransferRegistry = registry.getRecipeTransferRegistry();
|
||||
recipeTransferRegistry
|
||||
.addRecipeTransferHandler(ContainerAlloyFurnace.class, RecipeCategoryUids.ALLOY_SMELTER, 0, 2, 4, 36);
|
||||
.addRecipeTransferHandler(ContainerAlloyFurnace.class, RecipeCategoryUids.ALLOY_SMELTER, 0, 2, 4, 36);
|
||||
recipeTransferRegistry
|
||||
.addRecipeTransferHandler(ContainerAlloySmelter.class, RecipeCategoryUids.ALLOY_SMELTER, 0, 2, 8, 36);
|
||||
.addRecipeTransferHandler(ContainerAlloySmelter.class, RecipeCategoryUids.ALLOY_SMELTER, 0, 2, 8, 36);
|
||||
recipeTransferRegistry
|
||||
.addRecipeTransferHandler(ContainerAlloyFurnace.class, VanillaRecipeCategoryUid.FUEL, 3, 1, 4, 36);
|
||||
.addRecipeTransferHandler(ContainerAlloyFurnace.class, VanillaRecipeCategoryUid.FUEL, 3, 1, 4, 36);
|
||||
recipeTransferRegistry
|
||||
.addRecipeTransferHandler(ContainerBlastFurnace.class, RecipeCategoryUids.BLAST_FURNACE, 0, 2, 4, 36);
|
||||
.addRecipeTransferHandler(ContainerBlastFurnace.class, RecipeCategoryUids.BLAST_FURNACE, 0, 2, 4, 36);
|
||||
recipeTransferRegistry
|
||||
.addRecipeTransferHandler(ContainerFusionReactor.class, RecipeCategoryUids.FUSION_REACTOR, 0, 2, 3, 36);
|
||||
.addRecipeTransferHandler(ContainerFusionReactor.class, RecipeCategoryUids.FUSION_REACTOR, 0, 2, 3, 36);
|
||||
recipeTransferRegistry
|
||||
.addRecipeTransferHandler(ContainerIndustrialGrinder.class, RecipeCategoryUids.GRINDER, 0, 2, 6, 36);
|
||||
.addRecipeTransferHandler(ContainerIndustrialGrinder.class, RecipeCategoryUids.GRINDER, 0, 2, 6, 36);
|
||||
recipeTransferRegistry
|
||||
.addRecipeTransferHandler(ContainerImplosionCompressor.class, RecipeCategoryUids.IMPLOSION_COMPRESSOR,
|
||||
.addRecipeTransferHandler(ContainerImplosionCompressor.class, RecipeCategoryUids.IMPLOSION_COMPRESSOR,
|
||||
0, 2, 4, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerIndustrialElectrolyzer.class,
|
||||
RecipeCategoryUids.INDUSTRIAL_ELECTROLYZER, 0, 2, 7, 36);
|
||||
RecipeCategoryUids.INDUSTRIAL_ELECTROLYZER, 0, 2, 7, 36);
|
||||
recipeTransferRegistry
|
||||
.addRecipeTransferHandler(ContainerRollingMachine.class, RecipeCategoryUids.ROLLING_MACHINE, 0, 9, 11,
|
||||
.addRecipeTransferHandler(ContainerRollingMachine.class, RecipeCategoryUids.ROLLING_MACHINE, 0, 9, 11,
|
||||
36);
|
||||
recipeTransferRegistry
|
||||
.addRecipeTransferHandler(ContainerVacuumFreezer.class, RecipeCategoryUids.VACUUM_FREEZER, 0, 1, 2, 36);
|
||||
.addRecipeTransferHandler(ContainerVacuumFreezer.class, RecipeCategoryUids.VACUUM_FREEZER, 0, 1, 2, 36);
|
||||
|
||||
recipeTransferRegistry.addRecipeTransferHandler(
|
||||
new BuiltContainerTransferInfo("assemblingmachine", RecipeCategoryUids.ASSEMBLING_MACHINE, 36, 2, 0,
|
||||
36));
|
||||
new BuiltContainerTransferInfo("assemblingmachine", RecipeCategoryUids.ASSEMBLING_MACHINE, 36, 2, 0,
|
||||
36));
|
||||
recipeTransferRegistry.addRecipeTransferHandler(
|
||||
new BuiltContainerTransferInfo("chemicalreactor", RecipeCategoryUids.CHEMICAL_REACTOR, 36, 2, 0, 36));
|
||||
new BuiltContainerTransferInfo("chemicalreactor", RecipeCategoryUids.CHEMICAL_REACTOR, 36, 2, 0, 36));
|
||||
recipeTransferRegistry.addRecipeTransferHandler(
|
||||
new BuiltContainerTransferInfo("centrifuge", RecipeCategoryUids.CENTRIFUGE, 36, 2, 0, 36));
|
||||
new BuiltContainerTransferInfo("centrifuge", RecipeCategoryUids.CENTRIFUGE, 36, 2, 0, 36));
|
||||
recipeTransferRegistry.addRecipeTransferHandler(
|
||||
new BuiltContainerTransferInfo("grinder", RecipeCategoryUids.GRINDER, 36, 1, 0, 36));
|
||||
new BuiltContainerTransferInfo("grinder", RecipeCategoryUids.GRINDER, 36, 1, 0, 36));
|
||||
recipeTransferRegistry.addRecipeTransferHandler(
|
||||
new BuiltContainerTransferInfo("extractor", RecipeCategoryUids.EXTRACTOR, 36, 1, 0, 36));
|
||||
new BuiltContainerTransferInfo("extractor", RecipeCategoryUids.EXTRACTOR, 36, 1, 0, 36));
|
||||
recipeTransferRegistry.addRecipeTransferHandler(
|
||||
new BuiltContainerTransferInfo("compressor", RecipeCategoryUids.COMPRESSOR, 36, 1, 0, 36));
|
||||
new BuiltContainerTransferInfo("compressor", RecipeCategoryUids.COMPRESSOR, 36, 1, 0, 36));
|
||||
|
||||
if (CompatManager.isQuantumStorageLoaded) {
|
||||
registry.getJeiHelpers().getItemBlacklist().addItemToBlacklist(new ItemStack(ModBlocks.QUANTUM_CHEST));
|
||||
|
|
|
@ -6,22 +6,22 @@ import mezz.jei.api.gui.IGuiItemStackGroup;
|
|||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import techreborn.client.gui.GuiCentrifuge;
|
||||
import techreborn.compat.jei.RecipeCategoryUids;
|
||||
import techreborn.compat.jei.RecipeUtil;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class CentrifugeRecipeCategory extends BlankRecipeCategory<CentrifugeRecipeWrapper> {
|
||||
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/industrial_centrifuge.png");
|
||||
private static final int[] INPUT_SLOTS = { 0, 1 };
|
||||
private static final int[] OUTPUT_SLOTS = { 2, 3, 4, 5 };
|
||||
|
||||
private final IDrawable background;
|
||||
private final String title;
|
||||
|
||||
public CentrifugeRecipeCategory(IGuiHelper guiHelper) {
|
||||
background = guiHelper.createDrawable(GuiCentrifuge.texture, 49, 4, 78, 78);
|
||||
background = guiHelper.createDrawable(texture, 49, 4, 78, 78);
|
||||
title = I18n.translateToLocal("tile.techreborn.centrifuge.name");
|
||||
}
|
||||
|
||||
|
|
|
@ -5,13 +5,14 @@ import mezz.jei.api.IJeiHelpers;
|
|||
import mezz.jei.api.gui.IDrawableAnimated;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import techreborn.api.recipe.machines.CentrifugeRecipe;
|
||||
import techreborn.client.gui.GuiCentrifuge;
|
||||
import techreborn.compat.jei.BaseRecipeWrapper;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class CentrifugeRecipeWrapper extends BaseRecipeWrapper<CentrifugeRecipe> {
|
||||
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/industrial_centrifuge.png");
|
||||
private final IDrawableAnimated progressUp;
|
||||
private final IDrawableAnimated progressLeft;
|
||||
private final IDrawableAnimated progressDown;
|
||||
|
@ -24,10 +25,10 @@ public class CentrifugeRecipeWrapper extends BaseRecipeWrapper<CentrifugeRecipe>
|
|||
CentrifugeRecipe baseRecipe) {
|
||||
super(baseRecipe);
|
||||
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);
|
||||
IDrawableStatic progressRightStatic = guiHelper.createDrawable(GuiCentrifuge.texture, 176, 50, 12, 12);
|
||||
IDrawableStatic progressUpStatic = guiHelper.createDrawable(texture, 176, 14, 12, 12);
|
||||
IDrawableStatic progressLeftStatic = guiHelper.createDrawable(texture, 176, 26, 12, 12);
|
||||
IDrawableStatic progressDownStatic = guiHelper.createDrawable(texture, 176, 38, 12, 12);
|
||||
IDrawableStatic progressRightStatic = guiHelper.createDrawable(texture, 176, 50, 12, 12);
|
||||
|
||||
int ticksPerCycle = baseRecipe.tickTime() / 4; // speed up the animation
|
||||
// a bit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue