CraftingGridInventory now delegates Grid access
*/
package org.spongepowered.api.item.inventory.crafting;
+import org.spongepowered.api.item.inventory.Inventory;
import org.spongepowered.api.item.inventory.type.GridInventory;
import org.spongepowered.api.item.recipe.crafting.CraftingRecipe;
import org.spongepowered.api.world.server.ServerWorld;
* A CraftingGridInventory represents the inventory of something that can craft
* items. This is excluding the Result slot.
*/
-public interface CraftingGridInventory extends GridInventory {
+public interface CraftingGridInventory extends Inventory {
/**
* Retrieves the recipe formed by this CraftingGridInventory, if any.
*
* @return The recipe or {@link Optional#empty()} if no recipe is formed
*/
Optional<CraftingRecipe> getRecipe(ServerWorld world);
+
+ /**
+ * Returns this inventory as a grid.
+ *
+ * @return the grid inventory
+ */
+ GridInventory asGrid();
}
