Minor cleanup

This commit is contained in:
modmuss50 2019-08-19 20:09:07 +01:00
parent e4c9005e23
commit a30e86b4cb

View file

@ -36,51 +36,51 @@ import java.util.stream.Stream;
public enum EGui implements IMachineGuiHandler { public enum EGui implements IMachineGuiHandler {
AESU(true), AESU,
ALLOY_FURNACE(true), ALLOY_FURNACE,
ALLOY_SMELTER(true), ALLOY_SMELTER,
ASSEMBLING_MACHINE(true), ASSEMBLING_MACHINE,
AUTO_CRAFTING_TABLE(true), AUTO_CRAFTING_TABLE,
BLAST_FURNACE(true), BLAST_FURNACE,
CENTRIFUGE(true), CENTRIFUGE,
CHARGEBENCH(true), CHARGEBENCH,
CHEMICAL_REACTOR(true), CHEMICAL_REACTOR,
CHUNK_LOADER(true), CHUNK_LOADER,
COMPRESSOR(true), COMPRESSOR,
DESTRUCTOPACK(false), DESTRUCTOPACK(false),
DIESEL_GENERATOR(true), DIESEL_GENERATOR,
DIGITAL_CHEST(true), DIGITAL_CHEST,
DISTILLATION_TOWER(true), DISTILLATION_TOWER,
ELECTRIC_FURNACE(true), ELECTRIC_FURNACE,
EXTRACTOR(true), EXTRACTOR,
FUSION_CONTROLLER(true), FUSION_CONTROLLER,
GAS_TURBINE(true), GAS_TURBINE,
GENERATOR(true), GENERATOR,
GRINDER(true), GRINDER,
HIGH_VOLTAGE_SU(true), HIGH_VOLTAGE_SU,
IDSU(true), IDSU,
IMPLOSION_COMPRESSOR(true), IMPLOSION_COMPRESSOR,
INDUSTRIAL_ELECTROLYZER(true), INDUSTRIAL_ELECTROLYZER,
INDUSTRIAL_GRINDER(true), INDUSTRIAL_GRINDER,
IRON_FURNACE(true), IRON_FURNACE,
LESU(true), LESU,
LOW_VOLTAGE_SU(true), LOW_VOLTAGE_SU,
MANUAL(false), MANUAL(false),
MATTER_FABRICATOR(true), MATTER_FABRICATOR,
MEDIUM_VOLTAGE_SU(true), MEDIUM_VOLTAGE_SU,
PLASMA_GENERATOR(true), PLASMA_GENERATOR,
QUANTUM_CHEST(true), QUANTUM_CHEST,
QUANTUM_TANK(true), QUANTUM_TANK,
RECYCLER(true), RECYCLER,
ROLLING_MACHINE(true), ROLLING_MACHINE,
SAWMILL(true), SAWMILL,
SCRAPBOXINATOR(true), SCRAPBOXINATOR,
SEMIFLUID_GENERATOR(true), SEMIFLUID_GENERATOR,
THERMAL_GENERATOR(true), THERMAL_GENERATOR,
VACUUM_FREEZER(true), VACUUM_FREEZER,
SOLID_CANNING_MACHINE(true), SOLID_CANNING_MACHINE,
WIRE_MILL(true), WIRE_MILL,
FLUID_REPLICATOR(true); FLUID_REPLICATOR;
private final boolean containerBuilder; private final boolean containerBuilder;
@ -88,6 +88,10 @@ public enum EGui implements IMachineGuiHandler {
this.containerBuilder = containerBuilder; this.containerBuilder = containerBuilder;
} }
EGui(){
this(true);
}
public static EGui byID(Identifier resourceLocation){ public static EGui byID(Identifier resourceLocation){
return Arrays.stream(values()) return Arrays.stream(values())
.filter(eGui -> eGui.name().toLowerCase().equals(resourceLocation.getPath())) .filter(eGui -> eGui.name().toLowerCase().equals(resourceLocation.getPath()))