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 chosen
ContainerType
.
When done use completeStructure()
to finalize the inventory.
-
Method Summary
Modifier and TypeMethodDescriptionCompletes the inventory structure.Adds a grid of dummy-slots to the inventory.Adds a grid of dummy-slots to the inventory.dummySlots
(int count, int offset) Adds dummy-slots to the inventory.dummySlots
(int count, Vector2i offset) Adds dummy-slots to the inventory.Adds all undefined slots as dummy slots.Adds given slots to the inventory in a grid.Adds given slots to the inventory in a grid.Adds given slots to the inventory.Adds given slots to the inventory.slotsAtIndizes
(List<Slot> source, List<Integer> at) Adds given slots to the inventory at given indizes.slotsAtPositions
(List<Slot> source, List<Vector2i> at) Adds given slots to the inventory at given positions
-
Method Details
-
dummySlots
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
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
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
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
Adds given slots to the inventory.- Parameters:
source
- the source slots.offset
- the offset for adding the slots- Returns:
- the building step
-
slots
Adds given slots to the inventory.- Parameters:
source
- the source slots.offset
- the offset for adding the slots- Returns:
- the building step
-
grid
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
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
Adds given slots to the inventory at given indizes.- Parameters:
source
- the source slotsat
- the indizes- Returns:
- the building step
-
slotsAtPositions
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
-