@Environment(value=CLIENT) public class VillagerClothingFeatureRenderer<T extends LivingEntity & VillagerDataContainer,M extends EntityModel<T> & ModelWithHat> extends FeatureRenderer<T,M> implements SynchronousResourceReloadListener
ResourceReloadListener.Synchronizer
Modifier and Type | Field and Description |
---|---|
private String |
entityType |
private static it.unimi.dsi.fastutil.ints.Int2ObjectMap<Identifier> |
LEVEL_TO_ID |
private it.unimi.dsi.fastutil.objects.Object2ObjectMap<VillagerProfession,VillagerResourceMetadata.HatType> |
professionToHat |
private ReloadableResourceManager |
resourceManager |
private it.unimi.dsi.fastutil.objects.Object2ObjectMap<VillagerType,VillagerResourceMetadata.HatType> |
villagerTypeToHat |
Constructor and Description |
---|
VillagerClothingFeatureRenderer(FeatureRendererContext<T,M> context,
ReloadableResourceManager resourceManager,
String entityType) |
Modifier and Type | Method and Description |
---|---|
void |
apply(ResourceManager manager) |
private Identifier |
findTexture(String keyType,
Identifier keyId) |
<K> VillagerResourceMetadata.HatType |
getHatType(it.unimi.dsi.fastutil.objects.Object2ObjectMap<K,VillagerResourceMetadata.HatType> hatLookUp,
String keyType,
DefaultedRegistry<K> registry,
K key) |
void |
render(MatrixStack matrixStack,
VertexConsumerProvider vertexConsumerProvider,
int int2,
T t,
float float2,
float float3,
float float4,
float float5,
float float6,
float float7) |
getContextModel, getTexture, render, renderModel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
reload
getName
private static final it.unimi.dsi.fastutil.ints.Int2ObjectMap<Identifier> LEVEL_TO_ID
private final it.unimi.dsi.fastutil.objects.Object2ObjectMap<VillagerType,VillagerResourceMetadata.HatType> villagerTypeToHat
private final it.unimi.dsi.fastutil.objects.Object2ObjectMap<VillagerProfession,VillagerResourceMetadata.HatType> professionToHat
private final ReloadableResourceManager resourceManager
private final String entityType
public VillagerClothingFeatureRenderer(FeatureRendererContext<T,M> context, ReloadableResourceManager resourceManager, String entityType)
public void render(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int int2, T t, float float2, float float3, float float4, float float5, float float6, float float7)
render
in class FeatureRenderer<T extends LivingEntity & VillagerDataContainer,M extends EntityModel<T> & ModelWithHat>
private Identifier findTexture(String keyType, Identifier keyId)
public <K> VillagerResourceMetadata.HatType getHatType(it.unimi.dsi.fastutil.objects.Object2ObjectMap<K,VillagerResourceMetadata.HatType> hatLookUp, String keyType, DefaultedRegistry<K> registry, K key)
public void apply(ResourceManager manager)
apply
in interface SynchronousResourceReloadListener