Package org.bukkit
Interface Art
Represents the art on a painting.
The arts listed in this interface are present in the default server
or can be enabled via a FeatureFlag
.
There may be additional arts present in the server, for example from a Datapack
which can be accessed via RegistryAccess.registryAccess()
and RegistryKey.PAINTING_VARIANT
.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
static final Art
-
Method Summary
Modifier and TypeMethodDescription@NotNull Key
assetId()
Get the painting's asset id@Nullable Component
author()
Get the painting's author.static @NotNull Art
create
(@NotNull Consumer<RegistryBuilderFactory<Art, ? extends PaintingVariantRegistryEntry.Builder>> value) Create an inlined painting variant.int
Gets the height of the painting, in blocksint
Gets the width of the painting, in blocksstatic @Nullable Art
getById
(int id) Deprecated, for removal: This API element is subject to removal in a future version.Magic value that is based on inconsistent, data-driven registrystatic @Nullable Art
Deprecated.only for backwards compatibility, useRegistry.get(NamespacedKey)
instead.int
getId()
Deprecated, for removal: This API element is subject to removal in a future version.Magic value that is based on inconsistent, data-driven registry@NotNull NamespacedKey
getKey()
Deprecated, for removal: This API element is subject to removal in a future version.default @NotNull Key
key()
Deprecated, for removal: This API element is subject to removal in a future version.@Nullable Component
title()
Get the painting's title.static @NotNull Art
Deprecated, for removal: This API element is subject to removal in a future version.only for backwards compatibility, useRegistry.get(NamespacedKey)
instead.static @NotNull Art[]
values()
Deprecated, for removal: This API element is subject to removal in a future version.useIterable.iterator()
.
-
Field Details
-
ALBAN
-
AZTEC
-
AZTEC2
-
BACKYARD
-
BAROQUE
-
BOMB
-
BOUQUET
-
BURNING_SKULL
-
BUST
-
CAVEBIRD
-
CHANGING
-
COTAN
-
COURBET
-
CREEBET
-
DONKEY_KONG
-
EARTH
-
ENDBOSS
-
FERN
-
FIGHTERS
-
FINDING
-
FIRE
-
GRAHAM
-
HUMBLE
-
KEBAB
-
LOWMIST
-
MATCH
-
MEDITATIVE
-
ORB
-
OWLEMONS
-
PASSAGE
-
PIGSCENE
-
PLANT
-
POINTER
-
POND
-
POOL
-
PRAIRIE_RIDE
-
SEA
-
SKELETON
-
SKULL_AND_ROSES
-
STAGE
-
SUNFLOWERS
-
SUNSET
-
TIDES
-
UNPACKED
-
VOID
-
WANDERER
-
WASTELAND
-
WATER
-
WIND
-
WITHER
-
-
Method Details
-
create
@Experimental @NotNull static @NotNull Art create(@NotNull @NotNull Consumer<RegistryBuilderFactory<Art, ? extends PaintingVariantRegistryEntry.Builder>> value) Create an inlined painting variant.- Parameters:
value
- a consumer for the builder factory- Returns:
- the created painting variant
-
getBlockWidth
int getBlockWidth()Gets the width of the painting, in blocks- Returns:
- The width of the painting, in blocks
-
getBlockHeight
int getBlockHeight()Gets the height of the painting, in blocks- Returns:
- The height of the painting, in blocks
-
getId
Deprecated, for removal: This API element is subject to removal in a future version.Magic value that is based on inconsistent, data-driven registryGet the ID of this painting.- Returns:
- The ID of this painting
-
getKey
Deprecated, for removal: This API element is subject to removal in a future version.useRegistry.getKey(Keyed)
,RegistryAccess.getRegistry(io.papermc.paper.registry.RegistryKey)
, andRegistryKey.PAINTING_VARIANT
. Painting variants can exist without a key.Description copied from interface:Keyed
Return the namespaced identifier for this object. -
key
Deprecated, for removal: This API element is subject to removal in a future version.useRegistry.getKey(Keyed)
,RegistryAccess.getRegistry(io.papermc.paper.registry.RegistryKey)
, andRegistryKey.PAINTING_VARIANT
. Painting variants can exist without a key.Description copied from interface:Keyed
Returns the unique identifier for this object. -
title
@Nullable Component title()Get the painting's title.- Returns:
- the title
-
author
@Nullable Component author()Get the painting's author.- Returns:
- the author
-
assetId
@NotNull Key assetId()Get the painting's asset id- Returns:
- the asset id
-
getById
Deprecated, for removal: This API element is subject to removal in a future version.Magic value that is based on inconsistent, data-driven registryGet a painting by its numeric ID- Parameters:
id
- The ID- Returns:
- The painting
-
getByName
Deprecated.only for backwards compatibility, useRegistry.get(NamespacedKey)
instead.Get a painting by its unique nameThis ignores capitalization
- Parameters:
name
- The name- Returns:
- The painting
-
valueOf
@NotNull @Deprecated(since="1.21.3", forRemoval=true) @ScheduledForRemoval(inVersion="1.22") static @NotNull Art valueOf(@NotNull @NotNull String name) Deprecated, for removal: This API element is subject to removal in a future version.only for backwards compatibility, useRegistry.get(NamespacedKey)
instead.- Parameters:
name
- of the art.- Returns:
- the art with the given name.
-
values
@NotNull @Deprecated(since="1.21.3", forRemoval=true) @ScheduledForRemoval(inVersion="1.22") static @NotNull Art[] values()Deprecated, for removal: This API element is subject to removal in a future version.useIterable.iterator()
.- Returns:
- an array of all known arts.
-