Class FallingBlock

java.lang.Object
com.hypixel.hytale.builtin.fallingblocks.FallingBlock
All Implemented Interfaces:
Component<EntityStore>, Cloneable

public class FallingBlock extends Object implements Component<EntityStore>
  • Field Details

  • Constructor Details

    • FallingBlock

      public FallingBlock()
  • Method Details

    • getComponentType

      @Nonnull public static ComponentType<EntityStore, FallingBlock> getComponentType()
      Returns:
      The FallingBlock component 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:
      true if the block was successfully made to fall, false otherwise.
    • 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

      public Component<EntityStore> clone()
      Specified by:
      clone in interface Component<EntityStore>
      Returns:
      a clone instance of the original component instance.