Contents
Class FallingBlock
java.lang.Object
com.hypixel.hytale.builtin.fallingblocks.FallingBlock
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
-
Field Summary
FieldsFields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static booleanfallBlock(World world, Store<EntityStore> store, int blockX, int blockY, int blockZ) Makes a block at the specified position fall by breaking it and spawning a falling block entity.static Holder<EntityStore> generateFallingBlock(BlockType blockType, org.joml.Vector3d position, RotationTuple rotation, FallingBlockSettings fallingBlockSettings) Generates a falling block entity holder.static ComponentType<EntityStore, FallingBlock> Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Field Details
-
CODEC
-
-
Constructor Details
-
FallingBlock
public FallingBlock()
-
-
Method Details
-
getComponentType
- Returns:
- The
FallingBlockcomponent type.
-
fallBlock
public static boolean fallBlock(@Nonnull World world, @Nonnull Store<EntityStore> store, int blockX, int blockY, int blockZ) Makes a block at the specified position fall by breaking it and spawning a falling block entity.- Parameters:
world- The world the block is in.store- The entity store.blockX- The block X coordinate.blockY- The block Y coordinate.blockZ- The block Z coordinate.- Returns:
trueif the block was successfully made to fall,falseotherwise.
-
generateFallingBlock
@Nullable public static Holder<EntityStore> generateFallingBlock(@Nullable BlockType blockType, @Nonnull org.joml.Vector3d position, @Nonnull RotationTuple rotation, @Nullable FallingBlockSettings fallingBlockSettings) Generates a falling block entity holder.- Parameters:
blockType- The type of block.position- The initial position.rotation- The initial rotation.fallingBlockSettings- The falling block settings.- Returns:
- The entity holder, or null if the block type is invalid.
-
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-