Interface Op

All Known Implementing Classes:
AddOp, LogOp, RemoveOp

public interface Op
Interface for operations that can be applied to ModifyEvents to inject changes to the world generation content.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ArrayCodec<Op>
    Array codec for Op arrays
    static final Op[]
    Empty array of Ops
    static final CodecMapCodec<Op>
    Type dispatch codec for Op implementations
    static final String
    Type dispatch key for the Op TYPE_CODEC
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> void
    apply(ModifyEvent<T> event)
    Generic interface for applying operations to all ModifyEvent types.
     
  • Field Details

    • EMPTY_ARRAY

      static final Op[] EMPTY_ARRAY
      Empty array of Ops
    • TYPE_KEY

      static final String TYPE_KEY
      Type dispatch key for the Op TYPE_CODEC
      See Also:
    • TYPE_CODEC

      static final CodecMapCodec<Op> TYPE_CODEC
      Type dispatch codec for Op implementations
    • ARRAY_CODEC

      static final ArrayCodec<Op> ARRAY_CODEC
      Array codec for Op arrays
  • Method Details

    • apply

      <T> void apply(@Nonnull ModifyEvent<T> event) throws Error
      Generic interface for applying operations to all ModifyEvent types.
      Type Parameters:
      T - The type of content being modified.
      Parameters:
      event - The ModifyEvent to apply the operation to.
      Throws:
      Error
    • type

      Content.Type type()