Interface ObjectComponent.Builder

All Superinterfaces:
AbstractBuilder<ObjectComponent>, ComponentBuilder<ObjectComponent, ObjectComponent.Builder>, ComponentBuilderApplicable, ComponentLike, MutableStyleSetter<ObjectComponent.Builder>, StyleSetter<ObjectComponent.Builder>
Enclosing interface:
ObjectComponent

public static sealed interface ObjectComponent.Builder extends ComponentBuilder<ObjectComponent, ObjectComponent.Builder>
An object component builder.
Since:
4.25.0
  • Method Details

    • contents

      ObjectComponent.Builder contents(ObjectContents objectContents)
      Sets the contents of this object component builder.
      Parameters:
      objectContents - the contents to set
      Returns:
      this builder
      Since:
      4.25.0
    • fallback

      ObjectComponent.Builder fallback(@Nullable ComponentLike fallback)
      Sets the fallback component of this object component builder.

      The client displays this instead of this component in areas where object components are not supported, such as server MOTDs.

      Parameters:
      fallback - the fallback component, or null to clear the fallback
      Returns:
      this builder
      Since:
      5.0.0
      Since Minecraft:
      26.1