Add docs.

This commit is contained in:
raoulvdberge
2018-06-14 14:52:05 +02:00
parent ce8b86aea7
commit 5387bd00e3
4 changed files with 28 additions and 0 deletions

View File

@@ -49,6 +49,9 @@ public interface ICraftingManager {
@Nullable
ICraftingTask create(ItemStack stack, int quantity);
/**
* @return a new pattern chain list
*/
ICraftingPatternChainList createPatternChainList();
/**

View File

@@ -66,7 +66,14 @@ public interface ICraftingPattern {
*/
String getId();
/**
* @param other the other pattern
* @return true if this pattern chain be in a chain with the other pattern, false otherwise
*/
boolean canBeInChainWith(ICraftingPattern other);
/**
* @return the hashcode used to store the pattern chains
*/
int getChainHashCode();
}

View File

@@ -1,7 +1,18 @@
package com.raoulvdberge.refinedstorage.api.autocrafting;
/**
* A crafting pattern chain, which stores equivalent patterns.
*/
public interface ICraftingPatternChain {
/**
* @return the current pattern in the chain
*/
ICraftingPattern current();
/**
* Cycles the pattern in the chain.
*
* @return the cycled (and now current) pattern
*/
ICraftingPattern cycle();
}

View File

@@ -1,5 +1,12 @@
package com.raoulvdberge.refinedstorage.api.autocrafting;
/**
* A list of pattern chains per pattern.
*/
public interface ICraftingPatternChainList {
/**
* @param pattern the pattern
* @return a chain for the pattern
*/
ICraftingPatternChain getChain(ICraftingPattern pattern);
}