java.lang.Object
org.geysermc.geyser.level.block.type.Block
Direct Known Subclasses:
BannerBlock, BedBlock, ButtonBlock, CauldronBlock, ChestBlock, DoorBlock, FlowerPotBlock, FurnaceBlock, LecternBlock, MovingPistonBlock, PistonBlock, SkullBlock, TrapDoorBlock, WaterBlock

public class Block extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • updateBlock

      public void updateBlock(GeyserSession session, BlockState state, org.cloudburstmc.math.vector.Vector3i position)
    • sendBlockUpdatePacket

      protected void sendBlockUpdatePacket(GeyserSession session, BlockState state, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition definition, org.cloudburstmc.math.vector.Vector3i position)
    • checkForEmptySkull

      protected void checkForEmptySkull(GeyserSession session, BlockState state, org.cloudburstmc.math.vector.Vector3i position)
    • asItem

      public Item asItem()
    • setDefaultState

      protected BlockState setDefaultState(BlockState firstState)
      Should only be ran on block creation. Can be overridden.
      Parameters:
      firstState - the first state created from this block
    • javaIdentifier

      public @NonNull net.kyori.adventure.key.Key javaIdentifier()
    • requiresCorrectToolForDrops

      public boolean requiresCorrectToolForDrops()
    • hasBlockEntity

      public boolean hasBlockEntity()
    • blockEntityType

      public @Nullable org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType blockEntityType()
    • destroyTime

      public float destroyTime()
    • pushReaction

      public @NonNull PistonBehavior pushReaction()
    • defaultBlockState

      public BlockState defaultBlockState()
    • javaId

      public int javaId()
    • setJavaId

      public void setJavaId(int javaId)
    • is

      public boolean is(GeyserSession session, Tag<Block> tag)
    • is

      public boolean is(GeyserSession session, org.geysermc.mcprotocollib.protocol.data.game.item.component.HolderSet set)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • propertyKeys

      public Property<?>[] propertyKeys()
    • builder

      public static Block.Builder builder()