1414import mezz .jei .api .recipe .IRecipeCategory ;
1515import mezz .jei .gui .recipes .RecipeLayout ;
1616import net .minecraft .client .resources .I18n ;
17+ import org .jetbrains .annotations .NotNull ;
1718
18- import java .util .HashMap ;
19+ import java .util .LinkedHashMap ;
1920import java .util .Map ;
2021
2122public class MultiblockInfoCategory implements IRecipeCategory <MultiblockInfoRecipeWrapper > {
@@ -30,46 +31,52 @@ public MultiblockInfoCategory(IJeiHelpers helpers) {
3031 this .icon = guiHelper .drawableBuilder (GuiTextures .MULTIBLOCK_CATEGORY .imageLocation , 0 , 0 , 18 , 18 ).setTextureSize (18 , 18 ).build ();
3132 }
3233
33- public static final Map <String , MultiblockInfoRecipeWrapper > multiblockRecipes = new HashMap <String , MultiblockInfoRecipeWrapper >() {{
34- put ("primitive_blast_furnace" , new MultiblockInfoRecipeWrapper (new PrimitiveBlastFurnaceInfo ()));
35- put ("coke_oven" , new MultiblockInfoRecipeWrapper (new CokeOvenInfo ()));
36- put ("vacuum_freezer" , new MultiblockInfoRecipeWrapper (new VacuumFreezerInfo ()));
37- put ("implosion_compressor" , new MultiblockInfoRecipeWrapper (new ImplosionCompressorInfo ()));
38- put ("pyrolyze_oven" , new MultiblockInfoRecipeWrapper (new PyrolyzeOvenInfo ()));
39- put ("cracker_unit" , new MultiblockInfoRecipeWrapper (new CrackerUnitInfo ()));
40- put ("diesel_engine" , new MultiblockInfoRecipeWrapper (new DieselEngineInfo ()));
41- put ("distillation_tower" , new MultiblockInfoRecipeWrapper (new DistillationTowerInfo ()));
42- put ("electric_blast_furnace" , new MultiblockInfoRecipeWrapper (new ElectricBlastFurnaceInfo ()));
43- put ("multi_smelter" , new MultiblockInfoRecipeWrapper (new MultiSmelterInfo ()));
44- put ("large_bronze_boiler" , new MultiblockInfoRecipeWrapper (new LargeBoilerInfo (MetaTileEntities .LARGE_BRONZE_BOILER )));
45- put ("large_steel_boiler" , new MultiblockInfoRecipeWrapper (new LargeBoilerInfo (MetaTileEntities .LARGE_STEEL_BOILER )));
46- put ("large_titanium_boiler" , new MultiblockInfoRecipeWrapper (new LargeBoilerInfo (MetaTileEntities .LARGE_TITANIUM_BOILER )));
47- put ("large_tungstensteel_boiler" , new MultiblockInfoRecipeWrapper (new LargeBoilerInfo (MetaTileEntities .LARGE_TUNGSTENSTEEL_BOILER )));
48- put ("large_steam_turbine" , new MultiblockInfoRecipeWrapper (new LargeTurbineInfo (MetaTileEntities .LARGE_STEAM_TURBINE )));
49- put ("large_gas_turbine" , new MultiblockInfoRecipeWrapper (new LargeTurbineInfo (MetaTileEntities .LARGE_GAS_TURBINE )));
50- put ("large_plasma_turbine" , new MultiblockInfoRecipeWrapper (new LargeTurbineInfo (MetaTileEntities .LARGE_PLASMA_TURBINE )));
51- }};
34+ public static final Map <String , MultiblockInfoRecipeWrapper > multiblockRecipes = new LinkedHashMap <>();
35+ static {
36+ var map = multiblockRecipes ;
37+ map .put ("primitive_blast_furnace" , new MultiblockInfoRecipeWrapper (new PrimitiveBlastFurnaceInfo ()));
38+ map .put ("coke_oven" , new MultiblockInfoRecipeWrapper (new CokeOvenInfo ()));
39+ map .put ("vacuum_freezer" , new MultiblockInfoRecipeWrapper (new VacuumFreezerInfo ()));
40+ map .put ("implosion_compressor" , new MultiblockInfoRecipeWrapper (new ImplosionCompressorInfo ()));
41+ map .put ("pyrolyze_oven" , new MultiblockInfoRecipeWrapper (new PyrolyzeOvenInfo ()));
42+ map .put ("cracker_unit" , new MultiblockInfoRecipeWrapper (new CrackerUnitInfo ()));
43+ map .put ("diesel_engine" , new MultiblockInfoRecipeWrapper (new DieselEngineInfo ()));
44+ map .put ("distillation_tower" , new MultiblockInfoRecipeWrapper (new DistillationTowerInfo ()));
45+ map .put ("electric_blast_furnace" , new MultiblockInfoRecipeWrapper (new ElectricBlastFurnaceInfo ()));
46+ map .put ("multi_smelter" , new MultiblockInfoRecipeWrapper (new MultiSmelterInfo ()));
47+ map .put ("large_bronze_boiler" , new MultiblockInfoRecipeWrapper (new LargeBoilerInfo (MetaTileEntities .LARGE_BRONZE_BOILER )));
48+ map .put ("large_steel_boiler" , new MultiblockInfoRecipeWrapper (new LargeBoilerInfo (MetaTileEntities .LARGE_STEEL_BOILER )));
49+ map .put ("large_titanium_boiler" , new MultiblockInfoRecipeWrapper (new LargeBoilerInfo (MetaTileEntities .LARGE_TITANIUM_BOILER )));
50+ map .put ("large_tungstensteel_boiler" , new MultiblockInfoRecipeWrapper (new LargeBoilerInfo (MetaTileEntities .LARGE_TUNGSTENSTEEL_BOILER )));
51+ map .put ("large_steam_turbine" , new MultiblockInfoRecipeWrapper (new LargeTurbineInfo (MetaTileEntities .LARGE_STEAM_TURBINE )));
52+ map .put ("large_gas_turbine" , new MultiblockInfoRecipeWrapper (new LargeTurbineInfo (MetaTileEntities .LARGE_GAS_TURBINE )));
53+ map .put ("large_plasma_turbine" , new MultiblockInfoRecipeWrapper (new LargeTurbineInfo (MetaTileEntities .LARGE_PLASMA_TURBINE )));
54+ }
5255
5356 public static void registerRecipes (IModRegistry registry ) {
5457 registry .addRecipes (multiblockRecipes .values (), "gregtech:multiblock_info" );
5558 }
5659
5760 @ Override
61+ @ NotNull
5862 public String getUid () {
5963 return "gregtech:multiblock_info" ;
6064 }
6165
6266 @ Override
67+ @ NotNull
6368 public String getTitle () {
6469 return I18n .format ("gregtech.multiblock.title" );
6570 }
6671
6772 @ Override
73+ @ NotNull
6874 public String getModName () {
6975 return GTValues .MODID ;
7076 }
7177
7278 @ Override
79+ @ NotNull
7380 public IDrawable getBackground () {
7481 return background ;
7582 }
@@ -80,10 +87,13 @@ public IDrawable getIcon() {
8087 }
8188
8289 @ Override
83- public void setRecipe (IRecipeLayout recipeLayout , MultiblockInfoRecipeWrapper recipeWrapper , IIngredients ingredients ) {
90+ public void setRecipe (IRecipeLayout recipeLayout ,
91+ MultiblockInfoRecipeWrapper recipeWrapper ,
92+ @ NotNull IIngredients ingredients )
93+ {
8494 recipeWrapper .setRecipeLayout ((RecipeLayout ) recipeLayout , this .guiHelper );
8595
8696 IGuiItemStackGroup itemStackGroup = recipeLayout .getItemStacks ();
87- itemStackGroup .addTooltipCallback (recipeWrapper :: addBlockTooltips );
97+ itemStackGroup .addTooltipCallback (recipeWrapper );
8898 }
8999}
0 commit comments