Interface WorldNativeAccess<NC,NBS,NP>

Type Parameters:
NC - the native chunk type
NBS - the native block state type
NP - the native position type

public interface WorldNativeAccess<NC,NBS,NP>
Natively access and perform operations on the world.
  • Method Details

    • setBlock

      default <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 position, B block, SideEffectSet sideEffects) throws WorldEditException
      Throws:
      WorldEditException
    • applySideEffects

      default void applySideEffects(BlockVector3 position, BlockState previousType, SideEffectSet sideEffectSet)
    • setCurrentSideEffectSet

      default void setCurrentSideEffectSet(SideEffectSet sideEffectSet)
      Receive the current side-effect set from the high level call.

      This allows the implementation to branch on the side-effects internally.

      Parameters:
      sideEffectSet - the set of side-effects
    • getChunk

      NC getChunk(int x, int z)
    • toNative

      NBS toNative(BlockState state)
    • getBlockState

      NBS getBlockState(NC chunk, NP position)
    • setBlockState

      @Nullable NBS setBlockState(NC chunk, NP position, NBS state)
    • getValidBlockForPosition

      NBS getValidBlockForPosition(NBS block, NP position)
    • getPosition

      NP getPosition(int x, int y, int z)
    • updateLightingForBlock

      void updateLightingForBlock(NP position)
    • updateTileEntity

      boolean updateTileEntity(NP position, org.enginehub.linbus.tree.LinCompoundTag tag)
    • notifyBlockUpdate

      void notifyBlockUpdate(NC chunk, NP position, NBS oldState, NBS newState)
    • isChunkTicking

      boolean isChunkTicking(NC chunk)
    • markBlockChanged

      void markBlockChanged(NC chunk, NP position)
    • notifyNeighbors

      void notifyNeighbors(NP pos, NBS oldState, NBS newState)
    • updateBlock

      default void updateBlock(NP pos, NBS oldState, NBS newState)
    • updateNeighbors

      void updateNeighbors(NP pos, NBS oldState, NBS newState, int recursionLimit)
    • onBlockStateChange

      void onBlockStateChange(NP pos, NBS oldState, NBS newState)
    • markAndNotifyBlock

      default void markAndNotifyBlock(NP pos, NC chunk, NBS oldState, NBS newState, SideEffectSet sideEffectSet)
      This is a heavily modified function stripped from MC to apply WorldEdit-modifications.

      See Forge's World.markAndNotifyBlock