Interface IPrefabBuffer

All Known Implementing Classes:
PrefabBuffer.PrefabBufferAccessor

public interface IPrefabBuffer
  • Field Details

  • Method Details

    • getAnchorX

      int getAnchorX()
    • getAnchorY

      int getAnchorY()
    • getAnchorZ

      int getAnchorZ()
    • getMinX

      int getMinX(@Nonnull PrefabRotation rotation)
    • getMinY

      int getMinY()
    • getMinZ

      int getMinZ(@Nonnull PrefabRotation rotation)
    • getMaxX

      int getMaxX(@Nonnull PrefabRotation rotation)
    • getMaxY

      int getMaxY()
    • getMaxZ

      int getMaxZ(@Nonnull PrefabRotation rotation)
    • getMinX

      default int getMinX()
    • getMinZ

      default int getMinZ()
    • getMaxX

      default int getMaxX()
    • getMaxZ

      default int getMaxZ()
    • getMinYAt

      int getMinYAt(@Nonnull PrefabRotation rotation, int x, int z)
    • getMaxYAt

      int getMaxYAt(@Nonnull PrefabRotation rotation, int x, int z)
    • getColumnCount

      int getColumnCount()
    • getChildPrefabs

      @Nonnull PrefabBuffer.ChildPrefab[] getChildPrefabs()
    • getMaximumExtend

      default int getMaximumExtend()
    • forEach

      <T extends PrefabBufferCall> void forEach(@Nonnull IPrefabBuffer.ColumnPredicate<T> columnPredicate, @Nonnull IPrefabBuffer.BlockConsumer<T> blockConsumer, @Nullable IPrefabBuffer.EntityConsumer<T> entityConsumer, @Nullable IPrefabBuffer.ChildConsumer<T> childConsumer, @Nonnull T t)
      This method is used for high performance, evaluated block chances usually during runtime when pasting prefabs.
      Type Parameters:
      T - Type of Meta Object
      Parameters:
      columnPredicate - Reports each column
      blockConsumer - Reports all blocks
      entityConsumer - Reprots all entity wrappers
      t - Meta Object
    • forEachEntity

      <T> void forEachEntity(@Nonnull IPrefabBuffer.EntityConsumer<T> entityConsumer, @Nullable T t)
    • forEachRaw

      <T> void forEachRaw(@Nonnull IPrefabBuffer.ColumnPredicate<T> columnPredicate, @Nonnull IPrefabBuffer.RawBlockConsumer<T> blockConsumer, @Nonnull IPrefabBuffer.FluidConsumer<T> fluidConsumer, @Nullable IPrefabBuffer.EntityConsumer<T> entityConsumer, @Nullable T t)
      This method is usually used for serialization. It fires all data, even if empty.
      Type Parameters:
      T - Type of Meta Object
      Parameters:
      columnPredicate - Reports each column
      blockConsumer - Reports all blocks
      entityConsumer - Reprots all entity wrappers
      t - Meta Object
    • forEachRaw

      <T> boolean forEachRaw(@Nonnull IPrefabBuffer.ColumnPredicate<T> columnPredicate, @Nonnull IPrefabBuffer.RawBlockPredicate<T> blockPredicate, @Nonnull IPrefabBuffer.FluidPredicate<T> fluidPredicate, @Nullable IPrefabBuffer.EntityPredicate<T> entityPredicate, @Nullable T t)
      This method reports all contents of the prefab buffer, but it also allows to stop iteration after every block / entity. It fires all data, even if empty.
      Type Parameters:
      T - Type of Meta Object
      Parameters:
      columnPredicate - Reports each column
      blockPredicate - Reports all blocks
      entityPredicate - Reprots all entity wrappers
      t - Meta Object
    • compare

      default <T extends PrefabBufferCall> boolean compare(@Nonnull IPrefabBuffer.BlockComparingPredicate<T> blockComparingPredicate, @Nonnull T t)
    • compare

      default <T extends PrefabBufferCall> boolean compare(@Nonnull IPrefabBuffer.BlockComparingPrefabPredicate<T> blockComparingIterator, @Nonnull T t, @Nonnull IPrefabBuffer secondPrefab)
    • getBlockId

      int getBlockId(int x, int y, int z)
    • getFiller

      int getFiller(int x, int y, int z)
    • getRotationIndex

      int getRotationIndex(int x, int y, int z)
    • iterateAllColumns

      @Nonnull static <T> IPrefabBuffer.ColumnPredicate<T> iterateAllColumns()