use of com.infinityraider.agricraft.utility.CustomWoodType in project AgriCraft by AgriCraft.
the class CustomWoodShapedRecipe method inferMaterial.
public Optional<CustomWoodType> inferMaterial(InventoryCrafting ic) {
for (int r = 0; r < ic.getWidth(); r++) {
for (int c = 0; c < ic.getHeight(); c++) {
final ItemStack stack = ic.getStackInRowAndColumn(r, c);
final Optional<CustomWoodType> material = CustomWoodTypeRegistry.getFromStack(stack);
if (material.isPresent()) {
return material;
}
}
}
return Optional.empty();
}
Aggregations