Merge branch 'mc1.15/dev' into mc1.16/dev

# Conflicts:
#	src/generated/resources/.cache/cache
#	src/main/java/com/simibubi/create/compat/jei/CreateJEI.java
#	src/main/java/com/simibubi/create/compat/jei/category/MechanicalCraftingCategory.java
#	src/main/java/com/simibubi/create/compat/jei/category/MixingCategory.java
This commit is contained in:
Zelophed 2020-10-16 19:11:29 +02:00
commit b5802bb0e8
16 changed files with 3329 additions and 139 deletions

File diff suppressed because it is too large Load diff

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,30 +14,25 @@ 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.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>() {
@ -64,20 +42,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() {
@ -92,13 +72,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
@ -108,10 +90,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
@ -120,36 +99,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()),
@ -157,13 +132,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());
} }
@ -171,6 +144,9 @@ 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().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 blastingFan = fan.copy().setDisplayName(new StringTextComponent(TextFormatting.RESET + Lang.translate("recipe.blastingViaFan.fan")));
ItemStack splashingFan = fan ItemStack splashingFan = fan
.copy() .copy()
.setDisplayName(Lang.translate("recipe.splashing.fan").formatted(TextFormatting.RESET)); .setDisplayName(Lang.translate("recipe.splashing.fan").formatted(TextFormatting.RESET));
@ -182,23 +158,39 @@ public class CreateJEI implements IModPlugin {
.setDisplayName(Lang.translate("recipe.blastingViaFan.fan").formatted(TextFormatting.RESET)); .setDisplayName(Lang.translate("recipe.blastingViaFan.fan").formatted(TextFormatting.RESET));
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
@ -211,30 +203,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) {
@ -242,15 +224,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

@ -9,7 +9,6 @@ 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 +28,16 @@ import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent; import net.minecraft.util.text.TranslationTextComponent;
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;
@ -79,10 +83,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

View file

@ -9,11 +9,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

@ -1,10 +1,5 @@
package com.simibubi.create.content.logistics.block.mechanicalArm; package com.simibubi.create.content.logistics.block.mechanicalArm;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nullable;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.content.logistics.block.mechanicalArm.ArmInteractionPoint.Jukebox; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmInteractionPoint.Jukebox;
import com.simibubi.create.content.logistics.block.mechanicalArm.ArmInteractionPoint.Mode; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmInteractionPoint.Mode;
@ -20,7 +15,6 @@ import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.NBTHelper;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.JukeboxBlock; import net.minecraft.block.JukeboxBlock;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -33,6 +27,10 @@ import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d; import net.minecraft.util.math.vector.Vector3d;
import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.common.util.Constants.NBT;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;
public class ArmTileEntity extends KineticTileEntity { public class ArmTileEntity extends KineticTileEntity {
// Server // Server
@ -70,6 +68,7 @@ public class ArmTileEntity extends KineticTileEntity {
super(typeIn); super(typeIn);
inputs = new ArrayList<>(); inputs = new ArrayList<>();
outputs = new ArrayList<>(); outputs = new ArrayList<>();
interactionPointTag = new ListNBT();
heldItem = ItemStack.EMPTY; heldItem = ItemStack.EMPTY;
phase = Phase.SEARCH_INPUTS; phase = Phase.SEARCH_INPUTS;
baseAngle = new InterpolatedAngle(); baseAngle = new InterpolatedAngle();

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",