@ApiStatus.NonExtendable
public interface ResourceContainer
| 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.
|
default void |
font(@NotNull net.kyori.adventure.key.Key key,
FontProvider... providers)
Adds/updates a font to this resource container.
|
default void |
font(@NotNull net.kyori.adventure.key.Key key,
@NotNull java.util.List<FontProvider> providers)
Adds/updates a font to this resource container.
|
@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.
|
default void |
part(@NotNull ResourcePackPart part)
Adds the given resource pack part to 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.
|
default boolean |
removeSoundEvent(@NotNull net.kyori.adventure.key.Key key)
Removes the sound event 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.
|
default void |
sound(@NotNull net.kyori.adventure.key.Key key,
@NotNull Writable data)
Adds/updates a sound to this resource container.
|
void |
sound(@NotNull Sound sound)
Adds/updates a sound to this resource container.
|
default @Nullable SoundEvent |
soundEvent(@NotNull net.kyori.adventure.key.Key key)
Gets the sound event with the given key.
|
default void |
soundEvent(@NotNull SoundEvent soundEvent)
Adds/updates a sound event to this resource container.
|
default @NotNull java.util.Collection<SoundEvent> |
soundEvents()
Gets all the sound events in 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.
|
default void |
texture(@NotNull net.kyori.adventure.key.Key key,
@NotNull Writable data)
Adds/updates a texture to this resource container.
|
default void |
texture(@NotNull net.kyori.adventure.key.Key key,
@NotNull Writable data,
@NotNull Metadata meta)
Adds/updates a texture to this resource container.
|
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.
|
void atlas(@NotNull
@NotNull Atlas atlas)
Note 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 - The atlas to add/update@Nullable @Nullable Atlas atlas(@NotNull @NotNull net.kyori.adventure.key.Key key)
key - The atlas keyboolean removeAtlas(@NotNull
@NotNull net.kyori.adventure.key.Key key)
key - The atlas key@NotNull @NotNull java.util.Collection<Atlas> atlases()
void blockState(@NotNull
@NotNull BlockState state)
Note 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.
state - The block state to add/update@Nullable @Nullable BlockState blockState(@NotNull @NotNull net.kyori.adventure.key.Key key)
key - The block state keyboolean removeBlockState(@NotNull
@NotNull net.kyori.adventure.key.Key key)
key - The block state key@NotNull @NotNull java.util.Collection<BlockState> blockStates()
void font(@NotNull
@NotNull Font font)
Note 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 - The font to add/update@Nullable @Nullable Font font(@NotNull @NotNull net.kyori.adventure.key.Key key)
key - The font keyboolean removeFont(@NotNull
@NotNull net.kyori.adventure.key.Key key)
key - The font key@NotNull @NotNull java.util.Collection<Font> fonts()
default void font(@NotNull
@NotNull net.kyori.adventure.key.Key key,
@NotNull
FontProvider... providers)
Note 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.
key - The font keyproviders - The font providersdefault void font(@NotNull
@NotNull net.kyori.adventure.key.Key key,
@NotNull
@NotNull java.util.List<FontProvider> providers)
Note 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.
key - The font keyproviders - The font providersvoid language(@NotNull
@NotNull Language language)
Note 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 - The language to add/update@Nullable @Nullable Language language(@NotNull @NotNull net.kyori.adventure.key.Key key)
key - The language keyboolean removeLanguage(@NotNull
@NotNull net.kyori.adventure.key.Key key)
key - The language key@NotNull @NotNull java.util.Collection<Language> languages()
void model(@NotNull
@NotNull Model model)
Note 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 - The model to add/update@Nullable @Nullable Model model(@NotNull @NotNull net.kyori.adventure.key.Key key)
key - The model keyboolean removeModel(@NotNull
@NotNull net.kyori.adventure.key.Key key)
key - The model key@NotNull @NotNull java.util.Collection<Model> models()
void soundRegistry(@NotNull
@NotNull SoundRegistry soundRegistry)
Note 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 - The sound registry to add/update@Nullable @Nullable SoundRegistry soundRegistry(@NotNull @NotNull java.lang.String namespace)
namespace - The sound registry namespaceboolean removeSoundRegistry(@NotNull
@NotNull java.lang.String namespace)
namespace - The sound registry namespace@NotNull @NotNull java.util.Collection<SoundRegistry> soundRegistries()
default void soundEvent(@NotNull
@NotNull SoundEvent soundEvent)
Note that there can't be two sound events with the same key, so if there was a sound event with the same key as the new given sound event, it will be replaced by the given one.
soundEvent - The sound event to add/update@Nullable default @Nullable SoundEvent soundEvent(@NotNull @NotNull net.kyori.adventure.key.Key key)
key - The sound event keydefault boolean removeSoundEvent(@NotNull
@NotNull net.kyori.adventure.key.Key key)
key - The sound event key@NotNull default @NotNull java.util.Collection<SoundEvent> soundEvents()
void sound(@NotNull
@NotNull Sound sound)
Note 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 - The sound to add/update@Nullable @Nullable Sound sound(@NotNull @NotNull net.kyori.adventure.key.Key key)
key - The sound keyboolean removeSound(@NotNull
@NotNull net.kyori.adventure.key.Key key)
key - The sound key@NotNull @NotNull java.util.Collection<Sound> sounds()
default void sound(@NotNull
@NotNull net.kyori.adventure.key.Key key,
@NotNull
@NotNull Writable data)
Note 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.
key - The sound keydata - The sound datavoid texture(@NotNull
@NotNull Texture texture)
Note 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 - The texture to add/update@Nullable @Nullable Texture texture(@NotNull @NotNull net.kyori.adventure.key.Key key)
key - The texture keyboolean removeTexture(@NotNull
@NotNull net.kyori.adventure.key.Key key)
key - The texture key@NotNull @NotNull java.util.Collection<Texture> textures()
default void texture(@NotNull
@NotNull net.kyori.adventure.key.Key key,
@NotNull
@NotNull Writable data)
Note 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.
key - The texture keydata - The texture datadefault void texture(@NotNull
@NotNull net.kyori.adventure.key.Key key,
@NotNull
@NotNull Writable data,
@NotNull
@NotNull Metadata meta)
Note 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.
key - The texture keydata - The texture datameta - The texture metadatadefault void part(@NotNull
@NotNull ResourcePackPart part)
part - The resource pack partvoid unknownFile(@NotNull
@NotNull java.lang.String path,
@NotNull
@NotNull Writable data)
Note 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.
path - The unknown file pathdata - The unknown file data@Nullable @Nullable Writable unknownFile(@NotNull @NotNull java.lang.String path)
path - The unknown file pathboolean removeUnknownFile(@NotNull
@NotNull java.lang.String path)
path - The unknown file path@NotNull @NotNull java.util.Map<java.lang.String,Writable> unknownFiles()
void merge(@NotNull
@NotNull ResourceContainer other,
@NotNull
@NotNull MergeStrategy strategy)
other resource container
with this resource container.other - The other resource containerstrategy - The merge strategyMergeException - If the merge fails