Interface JavaBlockState


public interface JavaBlockState
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @org.checkerframework.checker.index.qual.NonNegative float
    Gets the block hardness of the block state
    Creates a new JavaBlockState.Builder instance
    boolean
    Gets whether the block state can be broken with hand
    Gets the collision of the block state
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 2.4.0: does not have an effect.
    Gets the identifier of the block state
    @org.checkerframework.checker.index.qual.NonNegative int
    Gets the Java ID of the block state
    @Nullable String
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 2.9.0: the pick item is sent by the Java server since Java Edition 1.21.9
    @Nullable String
    Gets the piston behavior of the block state
    @org.checkerframework.checker.index.qual.NonNegative int
    Gets the state group ID of the block state
    boolean
    Gets whether the block state is waterlogged
  • Method Details

    • identifier

      String identifier()
      Gets the identifier of the block state
      Returns:
      the identifier of the block state
    • javaId

      @org.checkerframework.checker.index.qual.NonNegative int javaId()
      Gets the Java ID of the block state
      Returns:
      the Java ID of the block state
    • stateGroupId

      @org.checkerframework.checker.index.qual.NonNegative int stateGroupId()
      Gets the state group ID of the block state
      Returns:
      the state group ID of the block state
    • blockHardness

      @org.checkerframework.checker.index.qual.NonNegative float blockHardness()
      Gets the block hardness of the block state
      Returns:
      the block hardness of the block state
    • waterlogged

      boolean waterlogged()
      Gets whether the block state is waterlogged
      Returns:
      whether the block state is waterlogged
    • collision

      JavaBoundingBox[] collision()
      Gets the collision of the block state
      Returns:
      the collision of the block state
    • canBreakWithHand

      boolean canBreakWithHand()
      Gets whether the block state can be broken with hand
      Returns:
      whether the block state can be broken with hand
    • pickItem

      @Deprecated(since="2.9.0", forRemoval=true) @Nullable String pickItem()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 2.9.0: the pick item is sent by the Java server since Java Edition 1.21.9
      Gets the pick item of the block state

      This method is deprecated for removal and will be removed in Geyser 2.13.0.

      Returns:
      the pick item of the block state
    • pistonBehavior

      @Nullable String pistonBehavior()
      Gets the piston behavior of the block state
      Returns:
      the piston behavior of the block state
    • hasBlockEntity

      @Deprecated(since="2.4.0", forRemoval=true) boolean hasBlockEntity()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 2.4.0: does not have an effect. If you were using this to set piston behavior, use pistonBehavior() instead.
      Gets whether the block state has a block entity

      This method is deprecated for removal and will be removed in Geyser 2.13.0.

      Returns:
      whether the block state has block entity
    • builder

      static JavaBlockState.Builder builder()
      Creates a new JavaBlockState.Builder instance
      Returns:
      a new JavaBlockState.Builder instance