Class SingleFakeBlock

java.lang.Object
cn.nukkit.block.fake.SingleFakeBlock
All Implemented Interfaces:
FakeBlock
Direct Known Subclasses:
DoubleFakeBlock, FakeStructBlock

@PowerNukkitXOnly @Since("1.19.60-r1") public class SingleFakeBlock extends Object implements FakeBlock
  • Field Details

    • blockId

      protected final int blockId
    • tileId

      protected final String tileId
    • lastPositions

      protected List<Vector3> lastPositions
  • Constructor Details

    • SingleFakeBlock

      public SingleFakeBlock(int blockId, String tileId)
  • Method Details

    • create

      public void create(Player player)
      Description copied from interface: FakeBlock
      给某玩家发送该假方块及其对应方块实体.

      Send the fake block and its corresponding BlockEntity to a player

      Specified by:
      create in interface FakeBlock
      Parameters:
      player - the player
    • create

      public void create(Player player, String titleName)
      Description copied from interface: FakeBlock
      给某玩家发送该假方块及其对应方块实体.

      Send the fake block and its corresponding BlockEntity to a player

      Specified by:
      create in interface FakeBlock
      Parameters:
      player - the player
      titleName - 该方块实体的名称
      the title name
    • remove

      public void remove(Player player)
      Description copied from interface: FakeBlock
      Remove it.
      Specified by:
      remove in interface FakeBlock
      Parameters:
      player - the player
    • getBlockEntityDataAt

      protected CompoundTag getBlockEntityDataAt(Vector3 position, String title)