mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-28 07:36:01 +00:00
NEI Support for GasifyableAPI
Adds NEI Support for mods that use the new Gasifyable API
This commit is contained in:
1 parent
1d671e7594
commit
ec828a3d4a
4 files changed
+31
-41
No files matched your search
@@ -4,13 +4,13 @@ import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class GasifyableItems {
|
||||
|
||||
static HashMap<String, GasStack> gasifyableItems = new HashMap<String, GasStack>();
|
||||
static HashMap<String, GasStack> gasifyableItems = new HashMap<>();
|
||||
static List<Gas> validGases = new ArrayList<>();
|
||||
|
||||
/**
|
||||
@@ -51,9 +51,23 @@ public class GasifyableItems {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the oredict associated to a gas.
|
||||
* @param gas type of gas to check its paired oredict
|
||||
* @return oredict associated to this gas
|
||||
*/
|
||||
public static String getItemFromGas(Gas gas) {
|
||||
|
||||
for (Map.Entry<String, GasStack> map : gasifyableItems.entrySet()) {
|
||||
if(map.getValue().getGas() == gas)
|
||||
return map.getKey();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* defines which gases the Chemical Injection Chamber can accept.
|
||||
* Defines which gases the Chemical Injection Chamber can accept.
|
||||
* @param gas type of gas to check validity
|
||||
* @return if block accepts gas
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user