Class VillagerClothingFeatureRenderer<T extends LivingEntity & VillagerDataContainer,M extends EntityModel<T> & ModelWithHat>
java.lang.Object
net.minecraft.client.render.entity.feature.FeatureRenderer<T,M>
net.minecraft.client.render.entity.feature.VillagerClothingFeatureRenderer<T,M>
- All Implemented Interfaces:
ResourceReloadListener,SynchronousResourceReloadListener
@Environment(CLIENT) public class VillagerClothingFeatureRenderer<T extends LivingEntity & VillagerDataContainer,M extends EntityModel<T> & ModelWithHat> extends FeatureRenderer<T,M> implements SynchronousResourceReloadListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloadListener
ResourceReloadListener.Synchronizer -
Field Summary
Fields Modifier and Type Field Description private StringentityTypeprivate static Int2ObjectMap<Identifier>LEVEL_TO_IDprivate Object2ObjectMap<VillagerProfession,VillagerResourceMetadata.HatType>professionToHatprivate ReloadableResourceManagerresourceManagerprivate Object2ObjectMap<VillagerType,VillagerResourceMetadata.HatType>villagerTypeToHat -
Constructor Summary
Constructors Constructor Description VillagerClothingFeatureRenderer(FeatureRendererContext<T,M> context, ReloadableResourceManager resourceManager, String entityType) -
Method Summary
Modifier and Type Method Description voidapply(ResourceManager manager)private IdentifierfindTexture(String keyType, Identifier keyId)<K> VillagerResourceMetadata.HatTypegetHatType(Object2ObjectMap<K,VillagerResourceMetadata.HatType> hatLookUp, String keyType, DefaultedRegistry<K> registry, K key)voidrender(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int int2, T t, float float2, float float3, float float4, float float5, float float6, float float7)Methods inherited from class net.minecraft.client.render.entity.feature.FeatureRenderer
getContextModel, getTexture, render, renderModelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.resource.ResourceReloadListener
getNameMethods inherited from interface net.minecraft.resource.SynchronousResourceReloadListener
reload
-
Field Details
-
LEVEL_TO_ID
-
villagerTypeToHat
-
professionToHat
private final Object2ObjectMap<VillagerProfession,VillagerResourceMetadata.HatType> professionToHat -
resourceManager
-
entityType
-
-
Constructor Details
-
VillagerClothingFeatureRenderer
public VillagerClothingFeatureRenderer(FeatureRendererContext<T,M> context, ReloadableResourceManager resourceManager, String entityType)
-
-
Method Details
-
render
public void render(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int int2, T t, float float2, float float3, float float4, float float5, float float6, float float7)- Specified by:
renderin classFeatureRenderer<T extends LivingEntity & VillagerDataContainer,M extends EntityModel<T> & ModelWithHat>
-
findTexture
-
getHatType
public <K> VillagerResourceMetadata.HatType getHatType(Object2ObjectMap<K,VillagerResourceMetadata.HatType> hatLookUp, String keyType, DefaultedRegistry<K> registry, K key) -
apply
- Specified by:
applyin interfaceSynchronousResourceReloadListener
-