@ApiStatus.Internal public class ResourceContainerImpl extends java.lang.Object implements ResourceContainer
| Constructor and Description |
|---|
ResourceContainerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
atlas(@NotNull Atlas atlas)
Adds/updates an atlas to this resource container.
|
@Nullable Atlas |
atlas(@NotNull net.kyori.adventure.key.Key key)
Gets the atlas with the given key.
|
@NotNull java.util.Collection<Atlas> |
atlases()
Gets all the atlases in this resource container.
|
void |
blockState(@NotNull BlockState state)
Adds/updates a block state to this resource container.
|
@Nullable BlockState |
blockState(@NotNull net.kyori.adventure.key.Key key)
Gets the block state with the given key.
|
@NotNull java.util.Collection<BlockState> |
blockStates()
Gets all the block states in this resource container.
|
void |
font(@NotNull Font font)
Adds/updates a font to this resource container.
|
@Nullable Font |
font(@NotNull net.kyori.adventure.key.Key key)
Gets the font with the given key.
|
@NotNull java.util.Collection<Font> |
fonts()
Gets all the fonts in this resource container.
|
@Nullable Language |
language(@NotNull net.kyori.adventure.key.Key key)
Gets the language with the given key.
|
void |
language(@NotNull Language language)
Adds/updates a language to this resource container.
|
@NotNull java.util.Collection<Language> |
languages()
Gets all the languages in this resource container.
|
void |
merge(@NotNull ResourceContainer other,
@NotNull MergeStrategy strategy)
Merges the given
other resource container
with this resource container. |
@Nullable Model |
model(@NotNull net.kyori.adventure.key.Key key)
Gets the model with the given key.
|
void |
model(@NotNull Model model)
Adds/updates a model to this resource container.
|
@NotNull java.util.Collection<Model> |
models()
Gets all the models in this resource container.
|
boolean |
removeAtlas(@NotNull net.kyori.adventure.key.Key key)
Removes the atlas with the given key.
|
boolean |
removeBlockState(@NotNull net.kyori.adventure.key.Key key)
Removes the block state with the given key.
|
boolean |
removeFont(@NotNull net.kyori.adventure.key.Key key)
Removes the font with the given key.
|
boolean |
removeLanguage(@NotNull net.kyori.adventure.key.Key key)
Removes the language with the given key.
|
boolean |
removeModel(@NotNull net.kyori.adventure.key.Key key)
Removes the model with the given key.
|
boolean |
removeSound(@NotNull net.kyori.adventure.key.Key key)
Removes the sound with the given key.
|
boolean |
removeSoundRegistry(@NotNull java.lang.String namespace)
Removes the sound registry with the given namespace.
|
boolean |
removeTexture(@NotNull net.kyori.adventure.key.Key key)
Removes the texture with the given key.
|
boolean |
removeUnknownFile(@NotNull java.lang.String path)
Removes the unknown file with the given path.
|
@Nullable Sound |
sound(@NotNull net.kyori.adventure.key.Key key)
Gets the sound with the given key.
|
void |
sound(@NotNull Sound sound)
Adds/updates a sound to this resource container.
|
@NotNull java.util.Collection<SoundRegistry> |
soundRegistries()
Gets all the sound registries in this resource container.
|
void |
soundRegistry(@NotNull SoundRegistry soundRegistry)
Adds/updates a sound registry to this resource container.
|
@Nullable SoundRegistry |
soundRegistry(@NotNull java.lang.String namespace)
Gets the sound registry with the given namespace.
|
@NotNull java.util.Collection<Sound> |
sounds()
Gets all the sounds in this resource container.
|
@Nullable Texture |
texture(@NotNull net.kyori.adventure.key.Key key)
Gets the texture with the given key.
|
void |
texture(@NotNull Texture texture)
Adds/updates a texture to this resource container.
|
@NotNull java.util.Collection<Texture> |
textures()
Gets all the textures in this resource container.
|
@Nullable Writable |
unknownFile(@NotNull java.lang.String path)
Gets the unknown file with the given path.
|
void |
unknownFile(@NotNull java.lang.String path,
@NotNull Writable data)
Adds/updates an unknown file to this resource container.
|
@NotNull java.util.Map<java.lang.String,Writable> |
unknownFiles()
Gets all the unknown files in this resource container.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfont, font, part, removeSoundEvent, sound, soundEvent, soundEvent, soundEvents, texture, texturepublic void atlas(@NotNull
@NotNull Atlas atlas)
ResourceContainerNote that there can't be two atlases with the same key, so if there was an atlas with the same key as the new given atlas, it will be replaced by the given one.
atlas in interface ResourceContaineratlas - The atlas to add/update@Nullable public @Nullable Atlas atlas(@NotNull @NotNull net.kyori.adventure.key.Key key)
ResourceContaineratlas in interface ResourceContainerkey - The atlas keypublic boolean removeAtlas(@NotNull
@NotNull net.kyori.adventure.key.Key key)
ResourceContainerremoveAtlas in interface ResourceContainerkey - The atlas key@NotNull public @NotNull java.util.Collection<Atlas> atlases()
ResourceContaineratlases in interface ResourceContainerpublic void blockState(@NotNull
@NotNull BlockState state)
ResourceContainerNote that there can't be two block states with the same key, so if there was a block state with the same key as the new given block state, it will be replaced by the given one.
blockState in interface ResourceContainerstate - The block state to add/update@Nullable public @Nullable BlockState blockState(@NotNull @NotNull net.kyori.adventure.key.Key key)
ResourceContainerblockState in interface ResourceContainerkey - The block state keypublic boolean removeBlockState(@NotNull
@NotNull net.kyori.adventure.key.Key key)
ResourceContainerremoveBlockState in interface ResourceContainerkey - The block state key@NotNull public @NotNull java.util.Collection<BlockState> blockStates()
ResourceContainerblockStates in interface ResourceContainerpublic void font(@NotNull
@NotNull Font font)
ResourceContainerNote that there can't be two fonts with the same key, so if there was a font with the same key as the new given font, it will be replaced by the given one.
font in interface ResourceContainerfont - The font to add/update@Nullable public @Nullable Font font(@NotNull @NotNull net.kyori.adventure.key.Key key)
ResourceContainerfont in interface ResourceContainerkey - The font keypublic boolean removeFont(@NotNull
@NotNull net.kyori.adventure.key.Key key)
ResourceContainerremoveFont in interface ResourceContainerkey - The font key@NotNull public @NotNull java.util.Collection<Font> fonts()
ResourceContainerfonts in interface ResourceContainerpublic void language(@NotNull
@NotNull Language language)
ResourceContainerNote that there can't be two languages with the same key, so if there was a language with the same key as the new given language, it will be replaced by the given one.
language in interface ResourceContainerlanguage - The language to add/update@Nullable public @Nullable Language language(@NotNull @NotNull net.kyori.adventure.key.Key key)
ResourceContainerlanguage in interface ResourceContainerkey - The language keypublic boolean removeLanguage(@NotNull
@NotNull net.kyori.adventure.key.Key key)
ResourceContainerremoveLanguage in interface ResourceContainerkey - The language key@NotNull public @NotNull java.util.Collection<Language> languages()
ResourceContainerlanguages in interface ResourceContainerpublic void model(@NotNull
@NotNull Model model)
ResourceContainerNote that there can't be two models with the same key, so if there was a model with the same key as the new given model, it will be replaced by the given one.
model in interface ResourceContainermodel - The model to add/update@Nullable public @Nullable Model model(@NotNull @NotNull net.kyori.adventure.key.Key key)
ResourceContainermodel in interface ResourceContainerkey - The model keypublic boolean removeModel(@NotNull
@NotNull net.kyori.adventure.key.Key key)
ResourceContainerremoveModel in interface ResourceContainerkey - The model key@NotNull public @NotNull java.util.Collection<Model> models()
ResourceContainermodels in interface ResourceContainerpublic void soundRegistry(@NotNull
@NotNull SoundRegistry soundRegistry)
ResourceContainerNote that there can't be two sound registries with the same namespace, so if there was a sound registry with the same namespace as the new given sound registry, it will be replaced by the given one.
soundRegistry in interface ResourceContainersoundRegistry - The sound registry to add/update@Nullable public @Nullable SoundRegistry soundRegistry(@NotNull @NotNull java.lang.String namespace)
ResourceContainersoundRegistry in interface ResourceContainernamespace - The sound registry namespacepublic boolean removeSoundRegistry(@NotNull
@NotNull java.lang.String namespace)
ResourceContainerremoveSoundRegistry in interface ResourceContainernamespace - The sound registry namespace@NotNull public @NotNull java.util.Collection<SoundRegistry> soundRegistries()
ResourceContainersoundRegistries in interface ResourceContainerpublic void sound(@NotNull
@NotNull Sound sound)
ResourceContainerNote that there can't be two sounds with the same key, so if there was a sound with the same key as the new given sound, it will be replaced by the given one.
sound in interface ResourceContainersound - The sound to add/update@Nullable public @Nullable Sound sound(@NotNull @NotNull net.kyori.adventure.key.Key key)
ResourceContainersound in interface ResourceContainerkey - The sound keypublic boolean removeSound(@NotNull
@NotNull net.kyori.adventure.key.Key key)
ResourceContainerremoveSound in interface ResourceContainerkey - The sound key@NotNull public @NotNull java.util.Collection<Sound> sounds()
ResourceContainersounds in interface ResourceContainerpublic void texture(@NotNull
@NotNull Texture texture)
ResourceContainerNote that there can't be two textures with the same key, so if there was a texture with the same key as the new given texture, it will be replaced by the given one.
texture in interface ResourceContainertexture - The texture to add/update@Nullable public @Nullable Texture texture(@NotNull @NotNull net.kyori.adventure.key.Key key)
ResourceContainertexture in interface ResourceContainerkey - The texture keypublic boolean removeTexture(@NotNull
@NotNull net.kyori.adventure.key.Key key)
ResourceContainerremoveTexture in interface ResourceContainerkey - The texture key@NotNull public @NotNull java.util.Collection<Texture> textures()
ResourceContainertextures in interface ResourceContainerpublic void unknownFile(@NotNull
@NotNull java.lang.String path,
@NotNull
@NotNull Writable data)
ResourceContainerNote that there can't be two unknown files with the same path, so if there was an unknown file with the same path as the new given unknown file, it will be replaced by the given one.
unknownFile in interface ResourceContainerpath - The unknown file pathdata - The unknown file data@Nullable public @Nullable Writable unknownFile(@NotNull @NotNull java.lang.String path)
ResourceContainerunknownFile in interface ResourceContainerpath - The unknown file pathpublic boolean removeUnknownFile(@NotNull
@NotNull java.lang.String path)
ResourceContainerremoveUnknownFile in interface ResourceContainerpath - The unknown file path@NotNull public @NotNull java.util.Map<java.lang.String,Writable> unknownFiles()
ResourceContainerunknownFiles in interface ResourceContainerpublic void merge(@NotNull
@NotNull ResourceContainer other,
@NotNull
@NotNull MergeStrategy strategy)
ResourceContainerother resource container
with this resource container.merge in interface ResourceContainerother - The other resource containerstrategy - The merge strategy