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). If you want to add support for other blocks
then you can use LOOKUP.
This is generally only useful if your block does NOT already have a BlockEntity.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BlockApiLookup<NativeMultipart,Void> Only used after checking if a targetBlockimplementsNativeMultipart. -
Method Summary
Modifier and TypeMethodDescriptiongetMultipartConversion(World world, BlockPos pos, BlockState state)
-
Field Details
-
LOOKUP
Only used after checking if a targetBlockimplementsNativeMultipart.
-
-
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 newAbstractPartbased 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
Functionthat this returns should modify theWorldin any way!
-