@ApiStatus.NonExtendable public interface Model extends ResourcePackPart, net.kyori.adventure.key.Keyed, net.kyori.examination.Examinable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Model.Builder |
static class |
Model.GuiLight
Enum of possible "gui_light" property
values
|
| Modifier and Type | Field and Description |
|---|---|
static net.kyori.adventure.key.Key |
BUILT_IN_ENTITY
A
Model can be set to extend this key to load
a model from an entity file. |
static net.kyori.adventure.key.Key |
BUILT_IN_GENERATED |
static boolean |
DEFAULT_AMBIENT_OCCLUSION |
static net.kyori.adventure.key.Key |
ITEM_GENERATED
A
Model can be set to extend this key to use
a model that is created out of the specified icon |
static net.kyori.adventure.key.Key |
ITEM_HANDHELD |
| Modifier and Type | Method and Description |
|---|---|
default void |
addTo(@NotNull ResourceContainer resourceContainer)
Adds this model to the given resource container.
|
boolean |
ambientOcclusion()
Returns the boolean that determines whether
to use ambient occlusion or not for this block
|
static @NotNull Model.Builder |
builder()
Deprecated.
|
@NotNull @Unmodifiable java.util.Map<ItemTransform.Type,ItemTransform> |
display()
Returns a map of the different places
where the model can be displayed
|
@NotNull @Unmodifiable java.util.List<Element> |
elements()
Returns an unmodifiable list containing all
the model elements, which can only have cubic
forms
|
@Nullable Model.GuiLight |
guiLight()
Returns the way how the item is rendered, can be "side"
or "front"
|
@NotNull net.kyori.adventure.key.Key |
key() |
static @NotNull Model.Builder |
model() |
@NotNull java.util.List<ItemOverride> |
overrides()
Returns a list of item overrides, item overrides determine cases
in which a different model should be used based on item tags
|
@Nullable net.kyori.adventure.key.Key |
parent()
Returns the parent model of this
model object
|
@NotNull ModelTextures |
textures()
Returns this model textures
|
default @NotNull Model.Builder |
toBuilder()
Converts this model object to a
Model.Builder
with all the model-properties in this object. |
compound, compoundstatic final net.kyori.adventure.key.Key ITEM_GENERATED
Model can be set to extend this key to use
a model that is created out of the specified iconstatic final net.kyori.adventure.key.Key ITEM_HANDHELD
static final net.kyori.adventure.key.Key BUILT_IN_ENTITY
Model can be set to extend this key to load
a model from an entity file. As you cannot specify the entity,
this does not work for all items (only for chests, ender chests,
mob heads, shields, banners and tridents)static final net.kyori.adventure.key.Key BUILT_IN_GENERATED
static final boolean DEFAULT_AMBIENT_OCCLUSION
@Contract(value="-> new") @NotNull static @NotNull Model.Builder model()
@Deprecated @ApiStatus.ScheduledForRemoval(inVersion="2.0.0") @Contract(value="-> new") @NotNull static @NotNull Model.Builder builder()
@NotNull @NotNull net.kyori.adventure.key.Key key()
key in interface net.kyori.adventure.key.Keyed@Nullable @Nullable net.kyori.adventure.key.Key parent()
boolean ambientOcclusion()
@NotNull @NotNull @Unmodifiable java.util.Map<ItemTransform.Type,ItemTransform> display()
@NotNull @NotNull ModelTextures textures()
@Nullable @Nullable Model.GuiLight guiLight()
If set to "side", the model is rendered like a block. If set to "front", model is shaded like a flat item
@NotNull @NotNull @Unmodifiable java.util.List<Element> elements()
@NotNull @NotNull java.util.List<ItemOverride> overrides()
All cases are evaluated in order from top to bottom and last predicate that matches overrides. However, overrides are ignored if it has been already overridden once, for example this avoids recursion on overriding to the same model
@Contract(value="-> new") @NotNull default @NotNull Model.Builder toBuilder()
Model.Builder
with all the model-properties in this object.default void addTo(@NotNull
@NotNull ResourceContainer resourceContainer)
addTo in interface ResourcePackPartresourceContainer - The resource container