Interface ViewableInventory.Builder.BuildingStep
-
- All Known Subinterfaces:
ViewableInventory.Builder.DummyStep
- Enclosing interface:
- ViewableInventory.Builder
public static interface ViewableInventory.Builder.BuildingStep
The building step. Define all slots needed for the chosenContainerType
.When done use
completeStructure()
to finalize the inventory.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ViewableInventory.Builder.EndStep
completeStructure()
Completes the inventory structure.ViewableInventory.Builder.DummyStep
dummyGrid(Vector2i size, int offset)
Adds a grid of dummy-slots to the inventory.ViewableInventory.Builder.DummyStep
dummyGrid(Vector2i size, Vector2i offset)
Adds a grid of dummy-slots to the inventory.ViewableInventory.Builder.DummyStep
dummySlots(int count, int offset)
Adds dummy-slots to the inventory.ViewableInventory.Builder.DummyStep
dummySlots(int count, Vector2i offset)
Adds dummy-slots to the inventory.ViewableInventory.Builder.DummyStep
fillDummy()
Adds all undefined slots as dummy slots.ViewableInventory.Builder.BuildingStep
grid(List<Slot> source, Vector2i size, int offset)
Adds given slots to the inventory in a grid.ViewableInventory.Builder.BuildingStep
grid(List<Slot> source, Vector2i size, Vector2i offset)
Adds given slots to the inventory in a grid.ViewableInventory.Builder.BuildingStep
slots(List<Slot> source, int offset)
Adds given slots to the inventory.ViewableInventory.Builder.BuildingStep
slots(List<Slot> source, Vector2i offset)
Adds given slots to the inventory.ViewableInventory.Builder.BuildingStep
slotsAtIndizes(List<Slot> source, List<Integer> at)
Adds given slots to the inventory at given indizes.ViewableInventory.Builder.BuildingStep
slotsAtPositions(List<Slot> source, List<Vector2i> at)
Adds given slots to the inventory at given positions
-
-
-
Method Detail
-
dummySlots
ViewableInventory.Builder.DummyStep dummySlots(int count, int offset)
Adds dummy-slots to the inventory.- Parameters:
count
- the amount of slots to addoffset
- the offset for adding the slots- Returns:
- the dummy building step
-
dummySlots
ViewableInventory.Builder.DummyStep dummySlots(int count, Vector2i offset)
Adds dummy-slots to the inventory.- Parameters:
count
- the amount of slots to addoffset
- the offset for adding the slots- Returns:
- the dummy building step
-
dummyGrid
ViewableInventory.Builder.DummyStep dummyGrid(Vector2i size, int offset)
Adds a grid of dummy-slots to the inventory.- Parameters:
size
- the size of the gridoffset
- the offset for adding the slots- Returns:
- the dummy building step
-
dummyGrid
ViewableInventory.Builder.DummyStep dummyGrid(Vector2i size, Vector2i offset)
Adds a grid of dummy-slots to the inventory.- Parameters:
size
- the size of the gridoffset
- the offset for adding the slots- Returns:
- the dummy building step
-
slots
ViewableInventory.Builder.BuildingStep slots(List<Slot> source, int offset)
Adds given slots to the inventory.- Parameters:
source
- the source slots.offset
- the offset for adding the slots- Returns:
- the building step
-
slots
ViewableInventory.Builder.BuildingStep slots(List<Slot> source, Vector2i offset)
Adds given slots to the inventory.- Parameters:
source
- the source slots.offset
- the offset for adding the slots- Returns:
- the building step
-
grid
ViewableInventory.Builder.BuildingStep grid(List<Slot> source, Vector2i size, int offset)
Adds given slots to the inventory in a grid.- Parameters:
source
- the source slots.size
- the size if the gridoffset
- the offset for adding the slots.- Returns:
- the building step
-
grid
ViewableInventory.Builder.BuildingStep grid(List<Slot> source, Vector2i size, Vector2i offset)
Adds given slots to the inventory in a grid.- Parameters:
source
- the source slots.size
- the size if the gridoffset
- the offset for adding the slots.- Returns:
- the building step
-
slotsAtIndizes
ViewableInventory.Builder.BuildingStep slotsAtIndizes(List<Slot> source, List<Integer> at)
Adds given slots to the inventory at given indizes.- Parameters:
source
- the source slotsat
- the indizes- Returns:
- the building step
-
slotsAtPositions
ViewableInventory.Builder.BuildingStep slotsAtPositions(List<Slot> source, List<Vector2i> at)
Adds given slots to the inventory at given positions- Parameters:
source
- the source slotsat
- the indizes- Returns:
- the building step
-
fillDummy
ViewableInventory.Builder.DummyStep fillDummy()
Adds all undefined slots as dummy slots.- Returns:
- the building step.
-
completeStructure
ViewableInventory.Builder.EndStep completeStructure()
Completes the inventory structure.If no slots are defined this will create the structure mirroring the vanilla type.
If some but not all slots are defined undefined slots will be defined using
fillDummy()
- Returns:
- the end step
-
-