Skip to content

Commit

Permalink
clean up components, make constructor public
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss committed Aug 16, 2021
1 parent 77ce62e commit 13b7827
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/main/java/gregtech/loaders/recipe/CraftingComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;

import static gregtech.common.blocks.HermeticCasings.HermeticCasingsType.*;

public class CraftingComponent {

public static Component CIRCUIT;
Expand Down Expand Up @@ -50,7 +48,6 @@ public class CraftingComponent {
public static Component STICK_ELECTROMAGNETIC;
public static Component STICK_RADIOACTIVE;
public static Component PIPE_REACTOR;
public static Component HERMETIC_CASINGS;


public static void initializeComponents() {
Expand Down Expand Up @@ -462,31 +459,14 @@ public static void initializeComponents() {
{GTValues.FALLBACK, new UnificationEntry(OrePrefix.pipeNormalFluid, Materials.Polyethylene)},

}).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1])));


HERMETIC_CASINGS = new Component(Stream.of(new Object[][]{

{1, MetaBlocks.HERMETIC_CASING.getItemVariant(HERMETIC_LV)},
{2, MetaBlocks.HERMETIC_CASING.getItemVariant(HERMETIC_MV)},
{3, MetaBlocks.HERMETIC_CASING.getItemVariant(HERMETIC_HV)},
{4, MetaBlocks.HERMETIC_CASING.getItemVariant(HERMETIC_EV)},
{5, MetaBlocks.HERMETIC_CASING.getItemVariant(HERMETIC_IV)},
{6, MetaBlocks.HERMETIC_CASING.getItemVariant(HERMETIC_LUV)},
{7, MetaBlocks.HERMETIC_CASING.getItemVariant(HERMETIC_ZPM)},
{8, MetaBlocks.HERMETIC_CASING.getItemVariant(HERMETIC_UV)},
{14, MetaBlocks.HERMETIC_CASING.getItemVariant(HERMETIC_MAX)},

{GTValues.FALLBACK, new UnificationEntry(OrePrefix.pipeNormalFluid, Materials.Polyethylene)},

}).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1])));
}


public static class Component {

private final Map<Integer, Object> ingredients;

private Component(Map<Integer, Object> craftingComponents) {
public Component(Map<Integer, Object> craftingComponents) {
ingredients = craftingComponents;
}

Expand Down

0 comments on commit 13b7827

Please sign in to comment.