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 MultipartContainer
Checks to see if the block at the given position currently contains a fullMultipartContainer
.static MultipartContainer
Checks to see if the block at the given position currently contains a fullMultipartContainer
.static MultipartContainer.PartOffer
offerNewPart
(World world, BlockPos pos, MultipartContainer.MultipartCreator creator) Offers the givenAbstractPart
into the block at the given position, respecting nearby entities' bounding boxes.static MultipartContainer.PartOffer
offerNewPart
(World world, BlockPos pos, MultipartContainer.MultipartCreator creator, boolean respectEntityBBs) Offers the givenAbstractPart
into the block at the given position.static MultipartContainer
turnIntoMultipart
(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 givenAbstractPart
into the block at the given position, respecting nearby entities' bounding boxes. This may return a non-nullMultipartContainer.PartOffer
if -
offerNewPart
@Nullable public static MultipartContainer.PartOffer offerNewPart(World world, BlockPos pos, MultipartContainer.MultipartCreator creator, boolean respectEntityBBs) Offers the givenAbstractPart
into the block at the given position. This may return a non-nullMultipartContainer.PartOffer
if -
turnIntoMultipart
Turns an existingNativeMultipart
block into aBlockEntity
basedMultipartContainer
. This is only useful for updating old blocks, as adding new parts can be done viaofferNewPart(World, BlockPos, MultipartCreator)
.
-