Living Entity Feature Renderer Registration Callback
public interface LivingEntityFeatureRendererRegistrationCallback
Content copied to clipboard
Called when feature renderers for a living entity renderer are registered.
Feature renderers are typically used for rendering additional objects on an entity, such as armor, an elytra or Deadmau5's ears. This callback lets developers add additional feature renderers for use in entity rendering. Listeners should filter out the specific entity renderer they want to hook into, usually through {@code instanceof}
checks or filtering by entity type. Once listeners find a suitable entity renderer, they should register their feature renderer via the registration helper.
For example, to register a feature renderer for a player model, the example below may used:
LivingEntityFeatureRendererRegistrationCallback.EVENT.register((entityType, entityRenderer, registrationHelper) -> {
if (entityRenderer instanceof PlayerEntityModel) {
registrationHelper.register(new MyFeatureRenderer((PlayerEntityModel) entityRenderer));
}
});
Types
RegistrationHelper
Link copied to clipboard
public interface RegistrationHelper
Content copied to clipboard
Functions
registerRenderers
Link copied to clipboard
abstract void registerRenderers(EntityType<? extends LivingEntity> entityType, LivingEntityRenderer<? extends Object, ? extends Object> entityRenderer, LivingEntityFeatureRendererRegistrationCallback.RegistrationHelper registrationHelper, EntityRendererFactory.Context context)
Content copied to clipboard
Sources
jvm source
Link copied to clipboard