mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-27 15:23:16 +00:00
Port 5d205e725 put recipe values as an immutable list (#5366)
This commit is contained in:
1 parent
ec7144b493
commit
7e3cfb8d02
1 file changed
+6
-1
@@ -1,5 +1,6 @@
|
||||
package mekanism.common.recipe;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -590,7 +591,7 @@ public final class RecipeHandler {
|
||||
|
||||
public static class Recipe<INPUT extends MachineInput<INPUT>, OUTPUT extends MachineOutput<OUTPUT>, RECIPE extends MachineRecipe<INPUT, OUTPUT, RECIPE>> {
|
||||
|
||||
private static final List<Recipe> values = new ArrayList<>();
|
||||
private static List<Recipe> values = new ArrayList<>();
|
||||
|
||||
public static final Recipe<ItemStackInput, ItemStackOutput, SmeltingRecipe> ENERGIZED_SMELTER = new Recipe<>(
|
||||
MachineType.ENERGIZED_SMELTER.blockName, "ENERGIZED_SMELTER", ItemStackInput.class, ItemStackOutput.class,
|
||||
@@ -668,6 +669,10 @@ public final class RecipeHandler {
|
||||
MachineType.SOLAR_NEUTRON_ACTIVATOR.blockName, "SOLAR_NEUTRON_ACTIVATOR", GasInput.class, GasOutput.class,
|
||||
SolarNeutronRecipe.class);
|
||||
|
||||
static {
|
||||
values = ImmutableList.copyOf(values);
|
||||
}
|
||||
|
||||
//TODO: Replace this with Recipe being Iterable
|
||||
public static List<Recipe> values() {
|
||||
return values;
|
||||
|
||||
Reference in new issue
Block a user