fixup! Split mixing and mechanical crafting categories

This commit is contained in:
Zelophed 2020-10-16 18:58:35 +02:00
parent 022bcdd620
commit a2e4cfb66d
15 changed files with 153 additions and 158 deletions

View file

@ -368,16 +368,16 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
82524600ca83a766522129634a44b47a277a4b71 assets/create/lang/en_ud.json 82524600ca83a766522129634a44b47a277a4b71 assets/create/lang/en_ud.json
ba57282598aa07f9729bf0a7f3072b468fa07fc3 assets/create/lang/en_us.json ceb95c9ec33c0fd8d377a6b7589948d7a2c307b5 assets/create/lang/en_us.json
84125f41ff3c49ddc9a168afbff3b5827d553ed4 assets/create/lang/unfinished/de_de.json 34e9e276f2e082bb20f3f78662d4ba2d77b2a41d assets/create/lang/unfinished/de_de.json
430e73280908926c3871d563dfd5198af51fa5b1 assets/create/lang/unfinished/fr_fr.json c7dcd1eea54c09dd0433eb92a529ac99551b29be assets/create/lang/unfinished/fr_fr.json
2c3d9087b1647bf1e942d6ad9de2dbd6e070c9d6 assets/create/lang/unfinished/it_it.json 2cdedaba849e30ed2237f02d36b135f41800119e assets/create/lang/unfinished/it_it.json
4018abe8126f2b6cb26f9a315c5debb2bf1c7e4b assets/create/lang/unfinished/ja_jp.json 665ae9fa760c7cef399e962c6f8c4eedd018c91f assets/create/lang/unfinished/ja_jp.json
2d5e80a3d4a44c15f521087e47b02d4384ea89c1 assets/create/lang/unfinished/ko_kr.json 4171e22d172669d2d484c4dcbf585cc8c45a15b5 assets/create/lang/unfinished/ko_kr.json
2f4807c936b523f475061fee23b84d627f9b0187 assets/create/lang/unfinished/nl_nl.json 3d82d42dba4d700d1a95b48390c25aa07d4a0939 assets/create/lang/unfinished/nl_nl.json
0bc87fc63139aad54909d0a3aa57f9acfcf52940 assets/create/lang/unfinished/pt_br.json e848ccedee3b2df7830736055808e84a0b26bbb8 assets/create/lang/unfinished/pt_br.json
0e980ae9ee05fd260e11c09cbe46f300194adc77 assets/create/lang/unfinished/ru_ru.json ebd0aa7eced5d3f87e541f61d589220a147c6fae assets/create/lang/unfinished/ru_ru.json
ed4dcf4372f1b2a88474ef35fd4ab062978c708e assets/create/lang/unfinished/zh_cn.json 8373638521a2e51ed52ff055c7b0f60795411c08 assets/create/lang/unfinished/zh_cn.json
846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json
1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json
1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json

View file

@ -547,9 +547,11 @@
"create.recipe.blasting_via_fan.fan": "Fan behind Lava", "create.recipe.blasting_via_fan.fan": "Fan behind Lava",
"create.recipe.pressing": "Pressing", "create.recipe.pressing": "Pressing",
"create.recipe.mixing": "Mixing", "create.recipe.mixing": "Mixing",
"create.recipe.shapeless_mixing": "Shapeless Crafting",
"create.recipe.packing": "Compacting", "create.recipe.packing": "Compacting",
"create.recipe.sawing": "Sawing", "create.recipe.sawing": "Sawing",
"create.recipe.mechanical_crafting": "Mechanical Crafting", "create.recipe.mechanical_crafting": "Crafting",
"create.recipe.mechanical_crafting_exclusive": "Mechanical Crafting",
"create.recipe.block_cutting": "Block Cutting", "create.recipe.block_cutting": "Block Cutting",
"create.recipe.blockzapper_upgrade": "Handheld Blockzapper", "create.recipe.blockzapper_upgrade": "Handheld Blockzapper",
"create.recipe.sandpaper_polishing": "Sandpaper Polishing", "create.recipe.sandpaper_polishing": "Sandpaper Polishing",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 918", "_": "Missing Localizations: 920",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -548,9 +548,11 @@
"create.recipe.blasting_via_fan.fan": "Propeller hinter Lava", "create.recipe.blasting_via_fan.fan": "Propeller hinter Lava",
"create.recipe.pressing": "Mechanische Presse", "create.recipe.pressing": "Mechanische Presse",
"create.recipe.mixing": "UNLOCALIZED: Mixing", "create.recipe.mixing": "UNLOCALIZED: Mixing",
"create.recipe.shapeless_mixing": "UNLOCALIZED: Shapeless Crafting",
"create.recipe.packing": "UNLOCALIZED: Compacting", "create.recipe.packing": "UNLOCALIZED: Compacting",
"create.recipe.sawing": "UNLOCALIZED: Sawing", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting", "create.recipe.mechanical_crafting": "UNLOCALIZED: Crafting",
"create.recipe.mechanical_crafting_exclusive": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.block_cutting": "UNLOCALIZED: Block Cutting", "create.recipe.block_cutting": "UNLOCALIZED: Block Cutting",
"create.recipe.blockzapper_upgrade": "Blockpistole", "create.recipe.blockzapper_upgrade": "Blockpistole",
"create.recipe.sandpaper_polishing": "UNLOCALIZED: Sandpaper Polishing", "create.recipe.sandpaper_polishing": "UNLOCALIZED: Sandpaper Polishing",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 543", "_": "Missing Localizations: 545",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -548,9 +548,11 @@
"create.recipe.blasting_via_fan.fan": "Ventilateur derrière de la lave", "create.recipe.blasting_via_fan.fan": "Ventilateur derrière de la lave",
"create.recipe.pressing": "Pressage", "create.recipe.pressing": "Pressage",
"create.recipe.mixing": "Mixage", "create.recipe.mixing": "Mixage",
"create.recipe.shapeless_mixing": "UNLOCALIZED: Shapeless Crafting",
"create.recipe.packing": "Compactage", "create.recipe.packing": "Compactage",
"create.recipe.sawing": "UNLOCALIZED: Sawing", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "Fabrication mécanique", "create.recipe.mechanical_crafting": "Fabrication mécanique",
"create.recipe.mechanical_crafting_exclusive": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.block_cutting": "Coupe de bloc", "create.recipe.block_cutting": "Coupe de bloc",
"create.recipe.blockzapper_upgrade": "Blockzappeur portable", "create.recipe.blockzapper_upgrade": "Blockzappeur portable",
"create.recipe.sandpaper_polishing": "Polissage au papier de verre", "create.recipe.sandpaper_polishing": "Polissage au papier de verre",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 531", "_": "Missing Localizations: 533",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -548,9 +548,11 @@
"create.recipe.blasting_via_fan.fan": "UNLOCALIZED: Fan behind Lava", "create.recipe.blasting_via_fan.fan": "UNLOCALIZED: Fan behind Lava",
"create.recipe.pressing": "Pressatura", "create.recipe.pressing": "Pressatura",
"create.recipe.mixing": "Mescolamento", "create.recipe.mixing": "Mescolamento",
"create.recipe.shapeless_mixing": "UNLOCALIZED: Shapeless Crafting",
"create.recipe.packing": "Compattazione", "create.recipe.packing": "Compattazione",
"create.recipe.sawing": "UNLOCALIZED: Sawing", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "Creazione Meccanico", "create.recipe.mechanical_crafting": "Creazione Meccanico",
"create.recipe.mechanical_crafting_exclusive": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.block_cutting": "Taglio Blocco", "create.recipe.block_cutting": "Taglio Blocco",
"create.recipe.blockzapper_upgrade": "UNLOCALIZED: Handheld Blockzapper", "create.recipe.blockzapper_upgrade": "UNLOCALIZED: Handheld Blockzapper",
"create.recipe.sandpaper_polishing": "Carta Vetrata Levigata", "create.recipe.sandpaper_polishing": "Carta Vetrata Levigata",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 526", "_": "Missing Localizations: 528",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -548,9 +548,11 @@
"create.recipe.blasting_via_fan.fan": "溶岩の後ろにファンを置く", "create.recipe.blasting_via_fan.fan": "溶岩の後ろにファンを置く",
"create.recipe.pressing": "押しつぶし", "create.recipe.pressing": "押しつぶし",
"create.recipe.mixing": "混合", "create.recipe.mixing": "混合",
"create.recipe.shapeless_mixing": "UNLOCALIZED: Shapeless Crafting",
"create.recipe.packing": "圧縮", "create.recipe.packing": "圧縮",
"create.recipe.sawing": "UNLOCALIZED: Sawing", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "メカニカルクラフト", "create.recipe.mechanical_crafting": "メカニカルクラフト",
"create.recipe.mechanical_crafting_exclusive": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.block_cutting": "ブロックカット", "create.recipe.block_cutting": "ブロックカット",
"create.recipe.blockzapper_upgrade": "携帯型ブロックザッパー", "create.recipe.blockzapper_upgrade": "携帯型ブロックザッパー",
"create.recipe.sandpaper_polishing": "紙やすりでの研磨", "create.recipe.sandpaper_polishing": "紙やすりでの研磨",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 531", "_": "Missing Localizations: 533",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -548,9 +548,11 @@
"create.recipe.blasting_via_fan.fan": "UNLOCALIZED: Fan behind Lava", "create.recipe.blasting_via_fan.fan": "UNLOCALIZED: Fan behind Lava",
"create.recipe.pressing": "압착", "create.recipe.pressing": "압착",
"create.recipe.mixing": "혼합", "create.recipe.mixing": "혼합",
"create.recipe.shapeless_mixing": "UNLOCALIZED: Shapeless Crafting",
"create.recipe.packing": "압축", "create.recipe.packing": "압축",
"create.recipe.sawing": "UNLOCALIZED: Sawing", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "기계 조합", "create.recipe.mechanical_crafting": "기계 조합",
"create.recipe.mechanical_crafting_exclusive": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.block_cutting": "블럭 절단", "create.recipe.block_cutting": "블럭 절단",
"create.recipe.blockzapper_upgrade": "UNLOCALIZED: Handheld Blockzapper", "create.recipe.blockzapper_upgrade": "UNLOCALIZED: Handheld Blockzapper",
"create.recipe.sandpaper_polishing": "사포 연마", "create.recipe.sandpaper_polishing": "사포 연마",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 857", "_": "Missing Localizations: 859",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -548,9 +548,11 @@
"create.recipe.blasting_via_fan.fan": "Ventilator achter Lava", "create.recipe.blasting_via_fan.fan": "Ventilator achter Lava",
"create.recipe.pressing": "Persen", "create.recipe.pressing": "Persen",
"create.recipe.mixing": "Mengen", "create.recipe.mixing": "Mengen",
"create.recipe.shapeless_mixing": "UNLOCALIZED: Shapeless Crafting",
"create.recipe.packing": "Compressen", "create.recipe.packing": "Compressen",
"create.recipe.sawing": "UNLOCALIZED: Sawing", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting", "create.recipe.mechanical_crafting": "UNLOCALIZED: Crafting",
"create.recipe.mechanical_crafting_exclusive": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.block_cutting": "Blok Zagen", "create.recipe.block_cutting": "Blok Zagen",
"create.recipe.blockzapper_upgrade": "Blokzapper", "create.recipe.blockzapper_upgrade": "Blokzapper",
"create.recipe.sandpaper_polishing": "UNLOCALIZED: Sandpaper Polishing", "create.recipe.sandpaper_polishing": "UNLOCALIZED: Sandpaper Polishing",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 925", "_": "Missing Localizations: 927",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -548,9 +548,11 @@
"create.recipe.blasting_via_fan.fan": "Ventilador atras de Lava", "create.recipe.blasting_via_fan.fan": "Ventilador atras de Lava",
"create.recipe.pressing": "Prensa Mecânica", "create.recipe.pressing": "Prensa Mecânica",
"create.recipe.mixing": "UNLOCALIZED: Mixing", "create.recipe.mixing": "UNLOCALIZED: Mixing",
"create.recipe.shapeless_mixing": "UNLOCALIZED: Shapeless Crafting",
"create.recipe.packing": "UNLOCALIZED: Compacting", "create.recipe.packing": "UNLOCALIZED: Compacting",
"create.recipe.sawing": "UNLOCALIZED: Sawing", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting", "create.recipe.mechanical_crafting": "UNLOCALIZED: Crafting",
"create.recipe.mechanical_crafting_exclusive": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.block_cutting": "UNLOCALIZED: Block Cutting", "create.recipe.block_cutting": "UNLOCALIZED: Block Cutting",
"create.recipe.blockzapper_upgrade": "Blockzapper Portátil", "create.recipe.blockzapper_upgrade": "Blockzapper Portátil",
"create.recipe.sandpaper_polishing": "UNLOCALIZED: Sandpaper Polishing", "create.recipe.sandpaper_polishing": "UNLOCALIZED: Sandpaper Polishing",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 919", "_": "Missing Localizations: 921",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -548,9 +548,11 @@
"create.recipe.blasting_via_fan.fan": "Вентелятор за лавой", "create.recipe.blasting_via_fan.fan": "Вентелятор за лавой",
"create.recipe.pressing": "Механический пресс", "create.recipe.pressing": "Механический пресс",
"create.recipe.mixing": "UNLOCALIZED: Mixing", "create.recipe.mixing": "UNLOCALIZED: Mixing",
"create.recipe.shapeless_mixing": "UNLOCALIZED: Shapeless Crafting",
"create.recipe.packing": "UNLOCALIZED: Compacting", "create.recipe.packing": "UNLOCALIZED: Compacting",
"create.recipe.sawing": "UNLOCALIZED: Sawing", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting", "create.recipe.mechanical_crafting": "UNLOCALIZED: Crafting",
"create.recipe.mechanical_crafting_exclusive": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.block_cutting": "UNLOCALIZED: Block Cutting", "create.recipe.block_cutting": "UNLOCALIZED: Block Cutting",
"create.recipe.blockzapper_upgrade": "Портативный размещатель блоков", "create.recipe.blockzapper_upgrade": "Портативный размещатель блоков",
"create.recipe.sandpaper_polishing": "UNLOCALIZED: Sandpaper Polishing", "create.recipe.sandpaper_polishing": "UNLOCALIZED: Sandpaper Polishing",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 213", "_": "Missing Localizations: 215",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -548,9 +548,11 @@
"create.recipe.blasting_via_fan.fan": "UNLOCALIZED: Fan behind Lava", "create.recipe.blasting_via_fan.fan": "UNLOCALIZED: Fan behind Lava",
"create.recipe.pressing": "金属压片", "create.recipe.pressing": "金属压片",
"create.recipe.mixing": "混合搅拌", "create.recipe.mixing": "混合搅拌",
"create.recipe.shapeless_mixing": "UNLOCALIZED: Shapeless Crafting",
"create.recipe.packing": "压块塑形", "create.recipe.packing": "压块塑形",
"create.recipe.sawing": "UNLOCALIZED: Sawing", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "自动合成", "create.recipe.mechanical_crafting": "自动合成",
"create.recipe.mechanical_crafting_exclusive": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.block_cutting": "方块切割", "create.recipe.block_cutting": "方块切割",
"create.recipe.blockzapper_upgrade": "UNLOCALIZED: Handheld Blockzapper", "create.recipe.blockzapper_upgrade": "UNLOCALIZED: Handheld Blockzapper",
"create.recipe.sandpaper_polishing": "砂纸抛光", "create.recipe.sandpaper_polishing": "砂纸抛光",

View file

@ -1,28 +1,11 @@
package com.simibubi.create.compat.jei; package com.simibubi.create.compat.jei;
import java.util.List;
import java.util.stream.Collectors;
import com.google.common.base.Predicate;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllItems; import com.simibubi.create.AllItems;
import com.simibubi.create.AllRecipeTypes; import com.simibubi.create.AllRecipeTypes;
import com.simibubi.create.Create; import com.simibubi.create.Create;
import com.simibubi.create.compat.jei.category.BlastingViaFanCategory; import com.simibubi.create.compat.jei.category.*;
import com.simibubi.create.compat.jei.category.BlockCuttingCategory;
import com.simibubi.create.compat.jei.category.BlockCuttingCategory.CondensedBlockCuttingRecipe; import com.simibubi.create.compat.jei.category.BlockCuttingCategory.CondensedBlockCuttingRecipe;
import com.simibubi.create.compat.jei.category.BlockzapperUpgradeCategory;
import com.simibubi.create.compat.jei.category.CrushingCategory;
import com.simibubi.create.compat.jei.category.MechanicalCraftingCategory;
import com.simibubi.create.compat.jei.category.MillingCategory;
import com.simibubi.create.compat.jei.category.MixingCategory;
import com.simibubi.create.compat.jei.category.MysteriousItemConversionCategory;
import com.simibubi.create.compat.jei.category.PackingCategory;
import com.simibubi.create.compat.jei.category.PolishingCategory;
import com.simibubi.create.compat.jei.category.PressingCategory;
import com.simibubi.create.compat.jei.category.SawingCategory;
import com.simibubi.create.compat.jei.category.SmokingViaFanCategory;
import com.simibubi.create.compat.jei.category.SplashingCategory;
import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity; import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity;
import com.simibubi.create.content.contraptions.processing.BasinRecipe; import com.simibubi.create.content.contraptions.processing.BasinRecipe;
import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateScreen; import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateScreen;
@ -31,31 +14,26 @@ import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.config.CRecipes; import com.simibubi.create.foundation.config.CRecipes;
import com.simibubi.create.foundation.fluid.FluidIngredient; import com.simibubi.create.foundation.fluid.FluidIngredient;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
import mezz.jei.api.IModPlugin; import mezz.jei.api.IModPlugin;
import mezz.jei.api.JeiPlugin; import mezz.jei.api.JeiPlugin;
import mezz.jei.api.ingredients.IIngredientType; import mezz.jei.api.ingredients.IIngredientType;
import mezz.jei.api.registration.IGuiHandlerRegistration; import mezz.jei.api.registration.*;
import mezz.jei.api.registration.IRecipeCatalystRegistration;
import mezz.jei.api.registration.IRecipeCategoryRegistration;
import mezz.jei.api.registration.IRecipeRegistration;
import mezz.jei.api.registration.ISubtypeRegistration;
import net.minecraft.block.Blocks; import net.minecraft.block.Blocks;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.ICraftingRecipe; import net.minecraft.item.crafting.*;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.IRecipeSerializer;
import net.minecraft.item.crafting.IRecipeType;
import net.minecraft.item.crafting.ShapedRecipe;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.StringTextComponent; import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
@JeiPlugin @JeiPlugin
public class CreateJEI implements IModPlugin { public class CreateJEI implements IModPlugin {
private static ResourceLocation ID = new ResourceLocation(Create.ID, "jei_plugin"); private static final ResourceLocation ID = new ResourceLocation(Create.ID, "jei_plugin");
public static final IIngredientType<FluidIngredient> FLUIDS = new IIngredientType<FluidIngredient>() { public static final IIngredientType<FluidIngredient> FLUIDS = new IIngredientType<FluidIngredient>() {
@ -65,20 +43,22 @@ public class CreateJEI implements IModPlugin {
} }
}; };
private MillingCategory millingCategory; private final MillingCategory millingCategory;
private CrushingCategory crushingCategory; private final CrushingCategory crushingCategory;
private SplashingCategory splashingCategory; private final SplashingCategory splashingCategory;
private SmokingViaFanCategory smokingCategory; private final SmokingViaFanCategory smokingCategory;
private PressingCategory pressingCategory; private final PressingCategory pressingCategory;
private BlastingViaFanCategory blastingCategory; private final BlastingViaFanCategory blastingCategory;
private BlockzapperUpgradeCategory blockzapperCategory; private final BlockzapperUpgradeCategory blockzapperCategory;
private MixingCategory mixingCategory; private final MixingCategory shapelessMixingCategory;
private SawingCategory sawingCategory; private final MixingCategory mixingCategory;
private BlockCuttingCategory blockCuttingCategory; private final SawingCategory sawingCategory;
private PackingCategory packingCategory; private final BlockCuttingCategory blockCuttingCategory;
private PolishingCategory polishingCategory; private final PackingCategory packingCategory;
private MysteriousItemConversionCategory mysteryConversionCategory; private final PolishingCategory polishingCategory;
private MechanicalCraftingCategory mechanicalCraftingCategory; private final MysteriousItemConversionCategory mysteryConversionCategory;
private final MechanicalCraftingCategory mechanicalCraftingCategory;
private final MechanicalCraftingCategory mechanicalCraftingExclusiveCategory;
@Override @Override
public ResourceLocation getPluginUid() { public ResourceLocation getPluginUid() {
@ -93,13 +73,15 @@ public class CreateJEI implements IModPlugin {
smokingCategory = new SmokingViaFanCategory(); smokingCategory = new SmokingViaFanCategory();
blastingCategory = new BlastingViaFanCategory(); blastingCategory = new BlastingViaFanCategory();
blockzapperCategory = new BlockzapperUpgradeCategory(); blockzapperCategory = new BlockzapperUpgradeCategory();
mixingCategory = new MixingCategory(); shapelessMixingCategory = new MixingCategory(true);
mixingCategory = new MixingCategory(false);
sawingCategory = new SawingCategory(); sawingCategory = new SawingCategory();
blockCuttingCategory = new BlockCuttingCategory(); blockCuttingCategory = new BlockCuttingCategory();
packingCategory = new PackingCategory(); packingCategory = new PackingCategory();
polishingCategory = new PolishingCategory(); polishingCategory = new PolishingCategory();
mysteryConversionCategory = new MysteriousItemConversionCategory(); mysteryConversionCategory = new MysteriousItemConversionCategory();
mechanicalCraftingCategory = new MechanicalCraftingCategory(); mechanicalCraftingCategory = new MechanicalCraftingCategory(true);
mechanicalCraftingExclusiveCategory = new MechanicalCraftingCategory(false);
} }
@Override @Override
@ -109,10 +91,7 @@ public class CreateJEI implements IModPlugin {
@Override @Override
public void registerCategories(IRecipeCategoryRegistration registration) { public void registerCategories(IRecipeCategoryRegistration registration) {
registration.addRecipeCategories(millingCategory, crushingCategory, splashingCategory, pressingCategory, registration.addRecipeCategories(millingCategory, crushingCategory, splashingCategory, pressingCategory, smokingCategory, blastingCategory, blockzapperCategory, mixingCategory, shapelessMixingCategory, sawingCategory, blockCuttingCategory, packingCategory, polishingCategory, mysteryConversionCategory, mechanicalCraftingCategory, mechanicalCraftingExclusiveCategory);
smokingCategory, blastingCategory, blockzapperCategory, mixingCategory, sawingCategory,
blockCuttingCategory, packingCategory, polishingCategory, mysteryConversionCategory,
mechanicalCraftingCategory);
} }
@Override @Override
@ -121,36 +100,32 @@ public class CreateJEI implements IModPlugin {
registration.addRecipes(findRecipes(AllRecipeTypes.MILLING), millingCategory.getUid()); registration.addRecipes(findRecipes(AllRecipeTypes.MILLING), millingCategory.getUid());
registration.addRecipes(findRecipes(AllRecipeTypes.CRUSHING), crushingCategory.getUid()); registration.addRecipes(findRecipes(AllRecipeTypes.CRUSHING), crushingCategory.getUid());
registration.addRecipes( registration.addRecipes(findRecipesByTypeExcluding(AllRecipeTypes.MILLING.getType(), AllRecipeTypes.CRUSHING.getType()), crushingCategory.getUid());
findRecipesByTypeExcluding(AllRecipeTypes.MILLING.getType(), AllRecipeTypes.CRUSHING.getType()),
crushingCategory.getUid());
registration.addRecipes(findRecipes(AllRecipeTypes.SPLASHING), splashingCategory.getUid()); registration.addRecipes(findRecipes(AllRecipeTypes.SPLASHING), splashingCategory.getUid());
registration.addRecipes(findRecipes(AllRecipeTypes.PRESSING), pressingCategory.getUid()); registration.addRecipes(findRecipes(AllRecipeTypes.PRESSING), pressingCategory.getUid());
registration.addRecipes(findRecipesById(AllRecipeTypes.BLOCKZAPPER_UPGRADE.serializer.getRegistryName()), registration.addRecipes(findRecipesById(AllRecipeTypes.BLOCKZAPPER_UPGRADE.serializer.getRegistryName()), blockzapperCategory.getUid());
blockzapperCategory.getUid());
registration.addRecipes(findRecipesByType(IRecipeType.SMOKING), smokingCategory.getUid()); registration.addRecipes(findRecipesByType(IRecipeType.SMOKING), smokingCategory.getUid());
registration.addRecipes(findRecipesByTypeExcluding(IRecipeType.SMELTING, IRecipeType.SMOKING), registration.addRecipes(findRecipesByTypeExcluding(IRecipeType.SMELTING, IRecipeType.SMOKING), blastingCategory.getUid());
blastingCategory.getUid());
registration.addRecipes(findRecipes(AllRecipeTypes.MIXING), mixingCategory.getUid()); registration.addRecipes(findRecipes(AllRecipeTypes.MIXING), mixingCategory.getUid());
if (recipeConfig.allowShapelessInMixer.get()) if (recipeConfig.allowShapelessInMixer.get())
registration.addRecipes(findRecipes(r -> r.getSerializer() == IRecipeSerializer.CRAFTING_SHAPELESS registration.addRecipes(
&& !MechanicalPressTileEntity.canCompress(r.getIngredients())).stream() findRecipes(r -> r.getSerializer() == IRecipeSerializer.CRAFTING_SHAPELESS && !MechanicalPressTileEntity.canCompress(r.getIngredients()))
.stream()
.map(BasinRecipe::convert) .map(BasinRecipe::convert)
.collect(Collectors.toList()), .collect(Collectors.toList()),
mixingCategory.getUid()); shapelessMixingCategory.getUid());
registration.addRecipes(findRecipes(AllRecipeTypes.CUTTING), sawingCategory.getUid()); registration.addRecipes(findRecipes(AllRecipeTypes.CUTTING), sawingCategory.getUid());
if (recipeConfig.allowStonecuttingOnSaw.get()) if (recipeConfig.allowStonecuttingOnSaw.get())
registration.addRecipes( registration.addRecipes(CondensedBlockCuttingRecipe.condenseRecipes(findRecipesByType(IRecipeType.STONECUTTING)), blockCuttingCategory.getUid());
CondensedBlockCuttingRecipe.condenseRecipes(findRecipesByType(IRecipeType.STONECUTTING)),
blockCuttingCategory.getUid());
registration.addRecipes(findRecipes(AllRecipeTypes.COMPACTING), packingCategory.getUid()); registration.addRecipes(findRecipes(AllRecipeTypes.COMPACTING), packingCategory.getUid());
if (recipeConfig.allowShapedSquareInPress.get()) if (recipeConfig.allowShapedSquareInPress.get())
registration.addRecipes(findRecipes( registration.addRecipes(
r -> (r instanceof ICraftingRecipe) && MechanicalPressTileEntity.canCompress(r.getIngredients())) findRecipes(r -> (r instanceof ICraftingRecipe) && MechanicalPressTileEntity.canCompress(r.getIngredients()))
.stream() .stream()
.map(BasinRecipe::convert) .map(BasinRecipe::convert)
.collect(Collectors.toList()), .collect(Collectors.toList()),
@ -158,13 +133,11 @@ public class CreateJEI implements IModPlugin {
registration.addRecipes(findRecipes(AllRecipeTypes.SANDPAPER_POLISHING), polishingCategory.getUid()); registration.addRecipes(findRecipes(AllRecipeTypes.SANDPAPER_POLISHING), polishingCategory.getUid());
registration.addRecipes(MysteriousItemConversionCategory.getRecipes(), mysteryConversionCategory.getUid()); registration.addRecipes(MysteriousItemConversionCategory.getRecipes(), mysteryConversionCategory.getUid());
registration.addRecipes(findRecipes(r -> (r.getType() == AllRecipeTypes.MECHANICAL_CRAFTING.type)), registration.addRecipes(findRecipes(r -> (r.getType() == AllRecipeTypes.MECHANICAL_CRAFTING.type)), mechanicalCraftingExclusiveCategory.getUid());
mechanicalCraftingCategory.getUid());
if (recipeConfig.allowRegularCraftingInCrafter.get()) if (recipeConfig.allowRegularCraftingInCrafter.get())
registration.addRecipes(findRecipes( registration.addRecipes(
r -> (r.getType() == IRecipeType.CRAFTING && r.getType() != AllRecipeTypes.MECHANICAL_CRAFTING.type) findRecipes(r -> (r.getType() == IRecipeType.CRAFTING && r.getType() != AllRecipeTypes.MECHANICAL_CRAFTING.type) && (r instanceof ShapedRecipe)),
&& (r instanceof ShapedRecipe)),
mechanicalCraftingCategory.getUid()); mechanicalCraftingCategory.getUid());
} }
@ -172,32 +145,44 @@ public class CreateJEI implements IModPlugin {
public void registerRecipeCatalysts(IRecipeCatalystRegistration registration) { public void registerRecipeCatalysts(IRecipeCatalystRegistration registration) {
ItemStack fan = new ItemStack(AllBlocks.ENCASED_FAN.get()); ItemStack fan = new ItemStack(AllBlocks.ENCASED_FAN.get());
ItemStack splashingFan = fan.copy() ItemStack splashingFan = fan.copy().setDisplayName(new StringTextComponent(TextFormatting.RESET + Lang.translate("recipe.splashing.fan")));
.setDisplayName(new StringTextComponent(TextFormatting.RESET + Lang.translate("recipe.splashing.fan"))); ItemStack smokingFan = fan.copy().setDisplayName(new StringTextComponent(TextFormatting.RESET + Lang.translate("recipe.smokingViaFan.fan")));
ItemStack smokingFan = fan.copy() ItemStack blastingFan = fan.copy().setDisplayName(new StringTextComponent(TextFormatting.RESET + Lang.translate("recipe.blastingViaFan.fan")));
.setDisplayName(new StringTextComponent(TextFormatting.RESET + Lang.translate("recipe.smokingViaFan.fan")));
ItemStack blastingFan = fan.copy()
.setDisplayName(
new StringTextComponent(TextFormatting.RESET + Lang.translate("recipe.blastingViaFan.fan")));
registration.addRecipeCatalyst(new ItemStack(AllBlocks.MILLSTONE.get()), millingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.MILLSTONE.get()), millingCategory.getUid());
registration.addRecipeCatalyst(new ItemStack(AllBlocks.CRUSHING_WHEEL.get()), crushingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.CRUSHING_WHEEL.get()), crushingCategory.getUid());
registration.addRecipeCatalyst(splashingFan, splashingCategory.getUid()); registration.addRecipeCatalyst(splashingFan, splashingCategory.getUid());
registration.addRecipeCatalyst(smokingFan, smokingCategory.getUid()); registration.addRecipeCatalyst(smokingFan, smokingCategory.getUid());
registration.addRecipeCatalyst(blastingFan, blastingCategory.getUid()); registration.addRecipeCatalyst(blastingFan, blastingCategory.getUid());
registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_PRESS.get()), pressingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_PRESS.get()), pressingCategory.getUid());
registration.addRecipeCatalyst(new ItemStack(AllItems.BLOCKZAPPER.get()), blockzapperCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllItems.BLOCKZAPPER.get()), blockzapperCategory.getUid());
registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_MIXER.get()), shapelessMixingCategory.getUid());
registration.addRecipeCatalyst(new ItemStack(AllBlocks.BASIN.get()), shapelessMixingCategory.getUid());
registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_MIXER.get()), mixingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_MIXER.get()), mixingCategory.getUid());
registration.addRecipeCatalyst(new ItemStack(AllBlocks.BASIN.get()), mixingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.BASIN.get()), mixingCategory.getUid());
registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_SAW.get()), sawingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_SAW.get()), sawingCategory.getUid());
registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_SAW.get()), blockCuttingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_SAW.get()), blockCuttingCategory.getUid());
registration.addRecipeCatalyst(new ItemStack(Blocks.STONECUTTER), blockCuttingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(Blocks.STONECUTTER), blockCuttingCategory.getUid());
registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_PRESS.get()), packingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_PRESS.get()), packingCategory.getUid());
registration.addRecipeCatalyst(new ItemStack(AllBlocks.BASIN.get()), packingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.BASIN.get()), packingCategory.getUid());
registration.addRecipeCatalyst(AllItems.SAND_PAPER.asStack(), polishingCategory.getUid()); registration.addRecipeCatalyst(AllItems.SAND_PAPER.asStack(), polishingCategory.getUid());
registration.addRecipeCatalyst(AllItems.RED_SAND_PAPER.asStack(), polishingCategory.getUid()); registration.addRecipeCatalyst(AllItems.RED_SAND_PAPER.asStack(), polishingCategory.getUid());
registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_CRAFTER.get()),
mechanicalCraftingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_CRAFTER.get()), mechanicalCraftingCategory.getUid());
registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_CRAFTER.get()), mechanicalCraftingExclusiveCategory.getUid());
} }
@Override @Override
@ -210,30 +195,20 @@ public class CreateJEI implements IModPlugin {
return findRecipesByType(recipe.type); return findRecipesByType(recipe.type);
} }
private static List<IRecipe<?>> findRecipes(Predicate<IRecipe<?>> pred) { private static List<IRecipe<?>> findRecipes(Predicate<IRecipe<?>> predicate) {
return Minecraft.getInstance().world.getRecipeManager() return Minecraft.getInstance().world.getRecipeManager()
.getRecipes() .getRecipes()
.stream() .stream()
.filter(pred) .filter(predicate)
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
private static List<IRecipe<?>> findRecipesByType(IRecipeType<?> type) { private static List<IRecipe<?>> findRecipesByType(IRecipeType<?> type) {
return Minecraft.getInstance().world.getRecipeManager() return findRecipes(r -> r.getType() == type);
.getRecipes()
.stream()
.filter(r -> r.getType() == type)
.collect(Collectors.toList());
} }
private static List<IRecipe<?>> findRecipesById(ResourceLocation id) { private static List<IRecipe<?>> findRecipesById(ResourceLocation id) {
return Minecraft.getInstance().world.getRecipeManager() return findRecipes(r -> r.getSerializer().getRegistryName().equals(id));
.getRecipes()
.stream()
.filter(r -> r.getSerializer()
.getRegistryName()
.equals(id))
.collect(Collectors.toList());
} }
private static List<IRecipe<?>> findRecipesByTypeExcluding(IRecipeType<?> type, IRecipeType<?> excludingType) { private static List<IRecipe<?>> findRecipesByTypeExcluding(IRecipeType<?> type, IRecipeType<?> excludingType) {
@ -241,15 +216,9 @@ public class CreateJEI implements IModPlugin {
List<IRecipe<?>> byExcludingType = findRecipesByType(excludingType); List<IRecipe<?>> byExcludingType = findRecipesByType(excludingType);
byType.removeIf(recipe -> { byType.removeIf(recipe -> {
for (IRecipe<?> r : byExcludingType) { for (IRecipe<?> r : byExcludingType) {
ItemStack[] matchingStacks = recipe.getIngredients() ItemStack[] matchingStacks = recipe.getIngredients().get(0).getMatchingStacks();
.get(0) if (matchingStacks.length == 0) return true;
.getMatchingStacks(); if (r.getIngredients().get(0).test(matchingStacks[0])) return true;
if (matchingStacks.length == 0)
return true;
if (r.getIngredients()
.get(0)
.test(matchingStacks[0]))
return true;
} }
return false; return false;
}); });

View file

@ -1,15 +1,9 @@
package com.simibubi.create.compat.jei.category; package com.simibubi.create.compat.jei.category;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.compat.jei.category.animations.AnimatedCrafter; import com.simibubi.create.compat.jei.category.animations.AnimatedCrafter;
import com.simibubi.create.foundation.gui.AllGuiTextures; import com.simibubi.create.foundation.gui.AllGuiTextures;
import mezz.jei.api.constants.VanillaTypes; import mezz.jei.api.constants.VanillaTypes;
import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.gui.ingredient.IGuiItemStackGroup; import mezz.jei.api.gui.ingredient.IGuiItemStackGroup;
@ -29,11 +23,16 @@ import net.minecraft.util.NonNullList;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
public class MechanicalCraftingCategory extends CreateRecipeCategory<ShapedRecipe> { public class MechanicalCraftingCategory extends CreateRecipeCategory<ShapedRecipe> {
private final class CrafterIngredientRenderer implements IIngredientRenderer<ItemStack> { private static final class CrafterIngredientRenderer implements IIngredientRenderer<ItemStack> {
private ShapedRecipe recipe; private final ShapedRecipe recipe;
public CrafterIngredientRenderer(ShapedRecipe recipe) { public CrafterIngredientRenderer(ShapedRecipe recipe) {
this.recipe = recipe; this.recipe = recipe;
@ -95,10 +94,13 @@ public class MechanicalCraftingCategory extends CreateRecipeCategory<ShapedRecip
} }
} }
private AnimatedCrafter crafter = new AnimatedCrafter(); private final AnimatedCrafter crafter = new AnimatedCrafter();
public MechanicalCraftingCategory() { public MechanicalCraftingCategory(boolean isForNormalCraftingOnly) {
super("mechanical_crafting", itemIcon(AllBlocks.MECHANICAL_CRAFTER.get()), emptyBackground(177, 107)); super(
isForNormalCraftingOnly ? "mechanical_crafting" : "mechanical_crafting_exclusive",
itemIcon(AllBlocks.MECHANICAL_CRAFTER.get()),
emptyBackground(177, 107));
} }
@Override @Override
@ -158,7 +160,7 @@ public class MechanicalCraftingCategory extends CreateRecipeCategory<ShapedRecip
for (int col = 0; col < recipe.getWidth(); col++) for (int col = 0; col < recipe.getWidth(); col++)
if (!recipe.getIngredients().get(row * recipe.getWidth() + col).hasNoMatchingItems()) { if (!recipe.getIngredients().get(row * recipe.getWidth() + col).hasNoMatchingItems()) {
RenderSystem.pushMatrix(); RenderSystem.pushMatrix();
RenderSystem.translated((int) col * 19 * scale, (int) row * 19 * scale, 0); RenderSystem.translated(col * 19 * scale, row * 19 * scale, 0);
RenderSystem.scaled(scale, scale, scale); RenderSystem.scaled(scale, scale, scale);
AllGuiTextures.JEI_SLOT.draw(0, 0); AllGuiTextures.JEI_SLOT.draw(0, 0);
RenderSystem.popMatrix(); RenderSystem.popMatrix();

View file

@ -8,11 +8,13 @@ import com.simibubi.create.content.contraptions.processing.HeatCondition;
public class MixingCategory extends BasinCategory { public class MixingCategory extends BasinCategory {
private AnimatedMixer mixer = new AnimatedMixer(); private final AnimatedMixer mixer = new AnimatedMixer();
private AnimatedBlazeBurner heater = new AnimatedBlazeBurner(); private final AnimatedBlazeBurner heater = new AnimatedBlazeBurner();
public MixingCategory() { public MixingCategory(boolean isForShapelessCraftingOnly) {
super("mixing", doubleItemIcon(AllBlocks.MECHANICAL_MIXER.get(), AllBlocks.BASIN.get()), super(
isForShapelessCraftingOnly ? "shapeless_mixing" : "mixing",
doubleItemIcon(AllBlocks.MECHANICAL_MIXER.get(), AllBlocks.BASIN.get()),
emptyBackground(177, 103)); emptyBackground(177, 103));
} }

View file

@ -22,9 +22,11 @@
"create.recipe.blasting_via_fan.fan": "Fan behind Lava", "create.recipe.blasting_via_fan.fan": "Fan behind Lava",
"create.recipe.pressing": "Pressing", "create.recipe.pressing": "Pressing",
"create.recipe.mixing": "Mixing", "create.recipe.mixing": "Mixing",
"create.recipe.shapeless_mixing": "Shapeless Crafting",
"create.recipe.packing": "Compacting", "create.recipe.packing": "Compacting",
"create.recipe.sawing": "Sawing", "create.recipe.sawing": "Sawing",
"create.recipe.mechanical_crafting": "Mechanical Crafting", "create.recipe.mechanical_crafting": "Crafting",
"create.recipe.mechanical_crafting_exclusive": "Mechanical Crafting",
"create.recipe.block_cutting": "Block Cutting", "create.recipe.block_cutting": "Block Cutting",
"create.recipe.blockzapper_upgrade": "Handheld Blockzapper", "create.recipe.blockzapper_upgrade": "Handheld Blockzapper",
"create.recipe.sandpaper_polishing": "Sandpaper Polishing", "create.recipe.sandpaper_polishing": "Sandpaper Polishing",