mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-27 23:33:08 +00:00
More work in the quest for greater recipe efficiency.
This commit is contained in:
1 parent
c6a77f9cfa
commit
c7a429177b
87 files changed
+1416
-1106
No files matched your search
@@ -1,7 +1,11 @@
|
||||
package mekanism.common.recipe.inputs;
|
||||
|
||||
public abstract class MachineInput
|
||||
public abstract class MachineInput<INPUT extends MachineInput<INPUT>>
|
||||
{
|
||||
public abstract boolean isValid();
|
||||
|
||||
public abstract INPUT copy();
|
||||
|
||||
public abstract int hashIngredients();
|
||||
|
||||
/**
|
||||
@@ -12,7 +16,7 @@ public abstract class MachineInput
|
||||
* @param other
|
||||
* @return
|
||||
*/
|
||||
public abstract boolean testEquality(MachineInput other);
|
||||
public abstract boolean testEquality(INPUT other);
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
@@ -23,12 +27,12 @@ public abstract class MachineInput
|
||||
@Override
|
||||
public boolean equals(Object other)
|
||||
{
|
||||
if(other instanceof MachineInput)
|
||||
if(isInstance(other))
|
||||
{
|
||||
return testEquality((MachineInput)other);
|
||||
return testEquality((INPUT)other);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public abstract boolean isInstance(Object other);
|
||||
}
|
||||
Reference in new issue
Block a user