Package alexiil.mc.lib.multipart.api
Class MultipartUtil
java.lang.Object
alexiil.mc.lib.multipart.api.MultipartUtil
Contains various utilities for creating, accessing, or interacting with
MultipartContainer's in a
World.-
Method Summary
Modifier and TypeMethodDescriptionstatic MultipartContainerChecks to see if the block at the given position currently contains a fullMultipartContainer.static MultipartContainerChecks to see if the block at the given position currently contains a fullMultipartContainer.static MultipartContainer.PartOfferofferNewPart(World world, BlockPos pos, MultipartContainer.MultipartCreator creator) Offers the givenAbstractPartinto the block at the given position, respecting nearby entities' bounding boxes.static MultipartContainer.PartOfferofferNewPart(World world, BlockPos pos, MultipartContainer.MultipartCreator creator, boolean respectEntityBBs) Offers the givenAbstractPartinto the block at the given position.static MultipartContainerturnIntoMultipart(World world, BlockPos pos)
-
Method Details
-
get
Checks to see if the block at the given position currently contains a fullMultipartContainer. This does not take into accountNativeMultipart. -
get
Checks to see if the block at the given position currently contains a fullMultipartContainer. This does not take into accountNativeMultipart. -
offerNewPart
@Nullable public static MultipartContainer.PartOffer offerNewPart(World world, BlockPos pos, MultipartContainer.MultipartCreator creator) Offers the givenAbstractPartinto the block at the given position, respecting nearby entities' bounding boxes. This may return a non-nullMultipartContainer.PartOfferif -
offerNewPart
@Nullable public static MultipartContainer.PartOffer offerNewPart(World world, BlockPos pos, MultipartContainer.MultipartCreator creator, boolean respectEntityBBs) Offers the givenAbstractPartinto the block at the given position. This may return a non-nullMultipartContainer.PartOfferif -
turnIntoMultipart
Turns an existingNativeMultipartblock into aBlockEntitybasedMultipartContainer. This is only useful for updating old blocks, as adding new parts can be done viaofferNewPart(World, BlockPos, MultipartCreator).
-