Interface BlockModifier

All Known Subinterfaces:
InstanceBatch
All Known Implementing Classes:
BlockBatch, ChunkBatch, Instance, InstanceContainer, SharedInstance

public interface BlockModifier
Represents an element which can place blocks at position.

Notably used by Instance, BlockBatch and ChunkBatch.

  • Field Details

  • Method Details

    • setBlockStateId

      void setBlockStateId​(int x, int y, int z, short blockStateId, @Nullable Data data)
      Sets a block at a position.

      You can use setBlock(int, int, int, Block) if you want it to be more explicit.

      Parameters:
      x - the block X
      y - the block Y
      z - the block Z
      blockStateId - the block state id
      data - the block Data, can be null
    • setCustomBlock

      void setCustomBlock​(int x, int y, int z, short customBlockId, @Nullable Data data)
      Sets a CustomBlock at a position.

      The custom block id should be the one returned by CustomBlock.getCustomBlockId().

      Parameters:
      x - the block X
      y - the block Y
      z - the block Z
      customBlockId - the custom block id
      data - the block Data, can be null
    • setSeparateBlocks

      void setSeparateBlocks​(int x, int y, int z, short blockStateId, short customBlockId, @Nullable Data data)
      Sets a CustomBlock at a position with a custom state id.

      The custom block id should be the one returned by CustomBlock.getCustomBlockId(), and the block state id can be anything you want, state id can be retrieved using Block.getBlockId().

      Parameters:
      x - the block X
      y - the block Y
      z - the block Z
      blockStateId - the block state id
      customBlockId - the custom block id
      data - the block Data, can be null
    • setBlockStateId

      default void setBlockStateId​(int x, int y, int z, short blockStateId)
    • setBlock

      default void setBlock​(int x, int y, int z, @NotNull Block block)
    • setBlock

      default void setBlock​(@NotNull BlockPosition blockPosition, @NotNull Block block)
    • setBlockStateId

      default void setBlockStateId​(@NotNull BlockPosition blockPosition, short blockStateId)
    • setCustomBlock

      default void setCustomBlock​(int x, int y, int z, short customBlockId)
    • setCustomBlock

      default void setCustomBlock​(int x, int y, int z, @NotNull java.lang.String customBlockId, @Nullable Data data)
    • setCustomBlock

      default void setCustomBlock​(int x, int y, int z, @NotNull java.lang.String customBlockId)
    • setCustomBlock

      default void setCustomBlock​(@NotNull BlockPosition blockPosition, @NotNull java.lang.String customBlockId)
    • setSeparateBlocks

      default void setSeparateBlocks​(int x, int y, int z, short blockStateId, short customBlockId)
    • setSeparateBlocks

      default void setSeparateBlocks​(@NotNull BlockPosition blockPosition, short blockStateId, short customBlockId)