Record Class ObjectContents

java.lang.Object
java.lang.Record
net.minecraft.network.chat.contents.ObjectContents
All Implemented Interfaces:
ComponentContents

public record ObjectContents(ObjectInfo contents, Optional<Component> fallback) extends Record implements ComponentContents
  • Field Details

    • contents

      private final ObjectInfo contents
      The field for the contents record component.
    • fallback

      private final Optional<Component> fallback
      The field for the fallback record component.
    • PLACEHOLDER

      private static final String PLACEHOLDER
    • MAP_CODEC

      public static final MapCodec<ObjectContents> MAP_CODEC
  • Constructor Details

    • ObjectContents

      public ObjectContents(ObjectInfo contents, Optional<Component> fallback)
      Creates an instance of a ObjectContents record class.
      Parameters:
      contents - the value for the contents record component
      fallback - the value for the fallback record component
  • Method Details