Interface SpriteObjectContents

All Superinterfaces:
ObjectContents

public sealed interface SpriteObjectContents extends ObjectContents
A sprite contents.

Represents a sprite in an atlas, such as a block texture.

Since:
4.25.0
Since Minecraft:
1.21.9
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Key
    The default atlas key for sprites, used by vanilla when the atlas is not specified in a serialized object component.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the atlas key.
    Gets the sprite key.
  • Field Details

    • DEFAULT_ATLAS

      static final Key DEFAULT_ATLAS
      The default atlas key for sprites, used by vanilla when the atlas is not specified in a serialized object component.
      Since:
      4.25.0
  • Method Details

    • atlas

      Key atlas()
      Gets the atlas key.
      Returns:
      the atlas key
      Since:
      4.25.0
    • sprite

      Key sprite()
      Gets the sprite key.
      Returns:
      the sprite key
      Since:
      4.25.0