Interface ObjectContents

All Known Subinterfaces:
PlayerHeadObjectContents, SpriteObjectContents

public sealed interface ObjectContents permits SpriteObjectContents, PlayerHeadObjectContents
An object component contents.
Since:
4.25.0
Since Minecraft:
1.21.9
  • Method Details

    • sprite

      @Contract(value="_, _ -> new", pure=true) static SpriteObjectContents sprite(Key atlas, Key sprite)
      Creates a sprite contents with the given atlas and sprite.
      Parameters:
      atlas - the atlas
      sprite - the sprite
      Returns:
      a sprite contents
      Since:
      4.25.0
    • sprite

      @Contract(value="_ -> new", pure=true) static SpriteObjectContents sprite(Key sprite)
      Creates a sprite contents with the given sprite and the default atlas.
      Parameters:
      sprite - the sprite
      Returns:
      a sprite contents
      Since:
      4.25.0
    • playerHead

      @Contract(value="-> new", pure=true) static PlayerHeadObjectContents.Builder playerHead()
      Creates a player head contents builder.
      Returns:
      a player head contents builder
      Since:
      4.25.0
    • playerHead

      @Contract(value="_ -> new", pure=true) static PlayerHeadObjectContents playerHead(String name)
      Creates a player head contents with the given name.
      Parameters:
      name - the player name
      Returns:
      a player head contents
      Since:
      4.25.0
    • playerHead

      @Contract(value="_ -> new", pure=true) static PlayerHeadObjectContents playerHead(UUID id)
      Creates a player head contents with the given id.
      Parameters:
      id - the player UUID
      Returns:
      a player head contents
      Since:
      4.25.0
    • playerHead

      @Contract(value="_ -> new", pure=true) static PlayerHeadObjectContents playerHead(PlayerHeadObjectContents.SkinSource skinSource)
      Creates a player head contents with the given parameters.
      Parameters:
      skinSource - the skin source
      Returns:
      a player head contents
      Since:
      4.25.0