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 @Nullable
ICraftingTask create(ItemStack stack, int quantity); ICraftingTask create(ItemStack stack, int quantity);
/**
* @return a new pattern chain list
*/
ICraftingPatternChainList createPatternChainList(); ICraftingPatternChainList createPatternChainList();
/** /**

View File

@@ -66,7 +66,14 @@ public interface ICraftingPattern {
*/ */
String getId(); 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); boolean canBeInChainWith(ICraftingPattern other);
/**
* @return the hashcode used to store the pattern chains
*/
int getChainHashCode(); int getChainHashCode();
} }

View File

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

View File

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