mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
Don't hard code some machines to specific gas types
This commit is contained in:
1 parent
f8b162bc31
commit
d8b6dfbb78
21 files changed
+181
-282
No files matched your search
@@ -685,6 +685,7 @@ public final class RecipeHandler {
|
||||
}
|
||||
|
||||
public boolean containsRecipe(ItemStack input) {
|
||||
//TODO: Support other input types
|
||||
for (Object obj : get().entrySet()) {
|
||||
if (obj instanceof Map.Entry) {
|
||||
Map.Entry entry = (Map.Entry) obj;
|
||||
@@ -713,6 +714,7 @@ public final class RecipeHandler {
|
||||
}
|
||||
|
||||
public boolean containsRecipe(Fluid input) {
|
||||
//TODO: Support other input types
|
||||
for (Object obj : get().entrySet()) {
|
||||
if (obj instanceof Map.Entry) {
|
||||
Map.Entry entry = (Map.Entry) obj;
|
||||
@@ -729,14 +731,19 @@ public final class RecipeHandler {
|
||||
}
|
||||
|
||||
public boolean containsRecipe(Gas input) {
|
||||
//TODO: Support other input types
|
||||
for (Object obj : get().entrySet()) {
|
||||
if (obj instanceof Map.Entry) {
|
||||
Map.Entry entry = (Map.Entry) obj;
|
||||
|
||||
Gas toCheck = null;
|
||||
if (entry.getKey() instanceof GasInput) {
|
||||
if (((GasInput) entry.getKey()).ingredient.getGas() == input) {
|
||||
return true;
|
||||
}
|
||||
toCheck = ((GasInput) entry.getKey()).ingredient.getGas();
|
||||
} else if (entry.getKey() instanceof AdvancedMachineInput) {
|
||||
toCheck = ((AdvancedMachineInput) entry.getKey()).gasType;
|
||||
}
|
||||
if (toCheck == input) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user