Added Item Routing ritual.
Added performance improvements to magnetism ritual!
This commit is contained in:
parent
2f0a1c9909
commit
1b4879ad64
25 changed files with 429 additions and 149 deletions
src/main/java/WayofTime/alchemicalWizardry/api
|
@ -0,0 +1,41 @@
|
|||
package WayofTime.alchemicalWizardry.api;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class RoutingFocusParadigm
|
||||
{
|
||||
public List<RoutingFocusLogic> logicList = new LinkedList();
|
||||
|
||||
public List<RoutingFocusPosAndFacing> locationList = new LinkedList();
|
||||
|
||||
public void addRoutingFocusPosAndFacing(RoutingFocusPosAndFacing facing)
|
||||
{
|
||||
locationList.add(facing);
|
||||
}
|
||||
|
||||
public void addLogic(RoutingFocusLogic logic)
|
||||
{
|
||||
logicList.add(logic);
|
||||
}
|
||||
|
||||
public boolean doesItemMatch(ItemStack keyStack, ItemStack checkedStack)
|
||||
{
|
||||
boolean isGood = false;
|
||||
for(RoutingFocusLogic logic : logicList)
|
||||
{
|
||||
isGood = logic.doesItemMatch(isGood, keyStack, checkedStack);
|
||||
if(isGood){return true;}
|
||||
}
|
||||
|
||||
return isGood;
|
||||
}
|
||||
|
||||
public void clear()
|
||||
{
|
||||
logicList.clear();
|
||||
locationList.clear();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue