public class CraftingGridDummy extends java.lang.Object implements CraftingGrid
| Modifier and Type | Field and Description |
|---|---|
static CraftingGrid |
instance |
TOPOLOGY_SQUARE, TYPE_CRAFTING| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<Item> |
getCrafting(int slot)
Gets the item in a specified slot.
|
java.util.Optional<Item> |
getCrafting(int x,
int y)
Gets the item at the given (x, y) position.
|
int |
getHeight()
Gets the height of the crafting grid.
|
java.util.Optional<Player> |
getPlayer()
Represents the player that is currently using this crafting grid.
|
java.lang.String |
getTopology()
Gets the topology of the crafting grid.
|
java.lang.String |
getType()
Gets the type of crafting grid.
|
int |
getWidth()
Gets the width of the crafting grid.
|
void |
giveBack(Item Item)
Gives back a certain item.
|
boolean |
setCrafting(int x,
int y,
java.util.Optional<Item> Item)
Sets the item at the given (x, y) position.
|
boolean |
setCrafting(int slot,
java.util.Optional<Item> Item)
Modifies the item in the given slot.
|
int |
size()
Returns the total size of this crafting grid.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcountFilledStacks, getFirstNonEmptyItem, getFirstNonEmptyPosition, iterator, removeCrafting, removeCrafting, spliterator, streampublic static final CraftingGrid instance
public java.util.Optional<Player> getPlayer()
CraftingGridgetPlayer in interface CraftingGridpublic int size()
CraftingGridsize in interface CraftingGridpublic java.util.Optional<Item> getCrafting(int slot)
CraftingGridgetCrafting in interface CraftingGridslot - slot indexCraftingGrid.getCrafting(int, int)public boolean setCrafting(int slot,
java.util.Optional<Item> Item)
CraftingGridsetCrafting in interface CraftingGridslot - slot to be modifiedItem - the item to be setCraftingCraftingGrid.setCrafting(int, int, Optional)public int getWidth()
CraftingGridgetWidth in interface CraftingGridpublic int getHeight()
CraftingGridgetHeight in interface CraftingGridpublic java.util.Optional<Item> getCrafting(int x, int y)
CraftingGridgetCrafting in interface CraftingGridx - x positiony - y positionCraftingGrid.getCrafting(int)public boolean setCrafting(int x,
int y,
java.util.Optional<Item> Item)
CraftingGridsetCrafting in interface CraftingGridx - x positiony - y positionItem - the item to be setCraftingCraftingGrid.setCrafting(int, Optional)public void giveBack(Item Item)
CraftingGridgiveBack in interface CraftingGridItem - The Item to give back.public java.lang.String getTopology()
CraftingGridCraftingGrid.TOPOLOGY_SQUARE. Other
kinds of grids may return a different value.getTopology in interface CraftingGridpublic java.lang.String getType()
CraftingGridCraftingGrid.TYPE_CRAFTING. Other
machines or crafting tables (with a separate setCrafting of recipes) may return a different value.getType in interface CraftingGrid