Package alexiil.mc.lib.multipart.api
Interface NativeMultipart
public interface NativeMultipart
A
Block
that can be converted (in-place) to an AbstractPart
. (Usually called in
MultipartUtil.offerNewPart(World, BlockPos, MultipartCreator)
.
This is generally only useful if your block does NOT already have a BlockEntity
.
-
Method Summary
Modifier and Type Method Description List<MultipartContainer.MultipartCreator>
getMultipartConversion(World world, BlockPos pos, BlockState state)
-
Method Details
-
getMultipartConversion
@Nullable List<MultipartContainer.MultipartCreator> getMultipartConversion(World world, BlockPos pos, BlockState state)- Returns:
- A List of
MultipartContainer.MultipartCreator
's that can create a newAbstractPart
based on the current state at the given position, or null if the current state cannot be converted into anAbstractPart
. An empty list will let this block be replaced with multiparts.Note that neither this function call, nor the
Function
that this returns should modify theWorld
in any way!
-