-
Notifications
You must be signed in to change notification settings - Fork 0
Variant Features
This is a list of features that you variant can use. Features are initialized on the server, and then sent to and handled by the client. So you probably shouldn't use them to reference classes that are only on the client.
Features are defined in the features array in the variant json. They will look something like this:
{
"type": <feature id>,
... feature args
}
type: The id of the feature.
ID: variantapi:custom_eyes_feature
Args:
-
texture(Identifier): The texture to render as part of theEyesFeatureRenderer
This feature is only to be used on entities that have the EyesFeatureRenderer (Which is currently Spiders, Endermen, and Phantoms)
to specify their eye texture, if you would like custom eyes on another entity use a variant overlay.
ID: variantapi:slime_overlay
Args:
-
texture(Identifier): The texture to render as over the slime (its gel stuff)
This feature is only to be used on entities that have the SlimeOverlayFeatureRenderer (Which is just the slime)
to specify their goop texture, otherwise its just normal green.
ID: variantapi:custom_lighting_feature
Args:
-
light(Integer): The light level the variant texture should render as. (Can be used to basically make it emissive)
ID: variantapi:custom_render_layer_feature
Args:
-
layer(String to Enum): Accepts the following values:-
"EYES": Will render the texture using the eyes layer -
"ENTITY_ALPHA": Renders the texture without shading -
"ENTITY_CUTOUT_NO_CULL": This is the default
-
ID: variantapi:custom_sheared_wool_feature
Args:
-
texture(Identifier): The texture that will be color according to the sheeps color
This is used to give sheeps their dyed color even when they are sheared.
ID: variantapi:custom_wool_feature
Args:
-
texture(Identifier): The texture to use for custom wool (as the default is the vanilla one)
ID: variantapi:horns_feature
Args:
-
texture(Identifier): The texture to be applied to the sheeps horn -
color(Integer): Optional. Defaults to -1 to use texture color. The color for the horn
ID: variantapi:wolf_textures
Args:
-
tame(Identifier): Texture for the tamed wolf -
angry(Identifier): Texture for the angry wolf
When specifying a variant for a wolf, the default texture will be used as the wild texture.
ID: variantapi:display_name
Args:
-
translate_key(String): This is the translation key that will be used for the new name of the mob (Shows up in Death messages and mods like jade)
ID: variantapi:daylight_immune
No arguments for this one. It will tell the server not to set the entity on fire if they are in the sun.
ID: variantapi:water_affinity
Args:
-
sensitive_to_water(Boolean): Can be used to specify whether the variant should take damage on contact with water
ID: variantapi:fire_affinity
Args:
-
immune_to_fire(Boolean): Can be used to specify whether the variant should take damage on contact with fire
ID: variantapi:explosion_radius
Args:
-
radius(float): The radius in blocks for the explosion.
ID: variantapi:attributes
Args:
-
attributes(Object Array): These are the attributes to be applied to the entity when it is spawned (or synced).-
type(Identifier): The id of the attributes (e.g.minecraft:generic.armor) -
value(Integer): The value to modify the attribute by. -
operation(String):ADDITION,MULTIPLY_BASE, orMULTIPLY_TOTAL. Tells the server how to handle thevalue.
-
ID: variantapi:custom_sounds
Args:
-
sound_map(Object Array): This is a map of what to replace the default sound with.-
from: The vanilla (or default) sound (e.g.minecraft:entity.zombie.ambient) -
to: The new sound event -
volume(Optional float): The volume to play the sound at, defaults to whatever vanilla was going to do -
pitch(Optional float): The pitch to play the sound at, defaults to whatever vanilla was going to do
-
Note: Not all sounds can be replaced, if the entity calls the sound from its own class and not the Entity class this will not work
ID: variantapi:custom_loot_table
Args:
-
loot_table_id(Identifier): The location of the loot table to drop when the variant is killed.