Class GhostMultiblockShape.Builder
java.lang.Object
com.portingdeadmods.portingdeadlibs.api.ghost.GhostMultiblockShape.Builder
- Enclosing class:
GhostMultiblockShape
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()controllerChar(char c) Define the character for the controller position
At most there can be only one controllerexposeHandlers(char c, net.minecraft.resources.ResourceLocation... handlers) It's recommended to only expose AT MOST 1 handler per typeThe multiblock definition itself.onPlaceOffset(int x, int y, int z) Taking the controller as an anchor, add an offset for placing following the idea that North is forward.withMenu(char c, @Nullable GhostPartMenuFactory factory) Lets you open custom menus per block instead of a centralised controller BE menu
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
layer
The multiblock definition itself.
Alayercall defines a single multiblock layer by continuous string params of the same length
Eg.layer( "AAAAA", "AAAAA", "AACAA", ) -
controllerChar
Define the character for the controller position
At most there can be only one controller- Parameters:
c- Character used in the Layer
-
exposeHandlers
public GhostMultiblockShape.Builder exposeHandlers(char c, net.minecraft.resources.ResourceLocation... handlers) It's recommended to only expose AT MOST 1 handler per type- Parameters:
c- Character used in the Layerhandlers- Resource Location of the handler as defined inContainerBlockEntity.handlers
-
withMenu
public GhostMultiblockShape.Builder withMenu(char c, @Nullable @Nullable GhostPartMenuFactory factory) Lets you open custom menus per block instead of a centralised controller BE menu- Parameters:
c- Character used in the Layerfactory- Lambda followingGhostPartMenuFactory
-
onPlaceOffset
Taking the controller as an anchor, add an offset for placing following the idea that North is forward.
It is generally recommended to offset the multiblock in such way that placing it is centered and all of the blocks are in the back of the place position.- Parameters:
x- offsety- offsetz- offset
-
build
-