Blockbench Reference Docs
    Preparing search index...

    Creates a new property on the specified target class

    Type Parameters

    • T extends keyof IPropertyType

    Implements

    Index

    Constructors

    • Type Parameters

      • T extends keyof IPropertyType

      Parameters

      • target_class: any
      • type: T
      • name: string
      • Optionaloptions: PropertyOptions

      Returns Property<T>

    Properties

    class: any
    copy_value?: boolean
    default: IPropertyType[T]
    description?: string
    enum_values?: string[]
    export?: boolean
    exposed: boolean
    inputs?: any
    isArray: boolean
    isBoolean: boolean
    isEnum: boolean
    isInstance: boolean
    isMolang: boolean
    isNumber: boolean
    isObject: boolean
    isString: boolean
    isVector: boolean
    isVector2: boolean
    label: any
    merge_validation: (value: IPropertyType[T]) => boolean
    name: string
    options?: Record<string, string>
    placeholder?: string
    type: T
    resetUniqueValues: (type: any, instance: any) => void

    Methods

    • Parameters

      • instance: IPropertyType[T]
      • target: IPropertyType[T]

      Returns void

    • Returns void

    • Parameters

      • instance: IPropertyType[T]

      Returns IPropertyType[T]

    • Parameters

      • instance: IPropertyType[T]
      • data: IPropertyType[T]

      Returns void

    • Parameters

      • instance: IPropertyType[T]
      • Optionalforce: boolean

      Returns void