Class VillagerProfessionLayer<T extends LivingEntity & VillagerDataHolder,M extends EntityModel<T> & VillagerHeadModel>
java.lang.Object
net.minecraft.client.renderer.entity.layers.RenderLayer<T,M>
net.minecraft.client.renderer.entity.layers.VillagerProfessionLayer<T,M>
public class VillagerProfessionLayer<T extends LivingEntity & VillagerDataHolder,M extends EntityModel<T> & VillagerHeadModel>
extends RenderLayer<T,M>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final it.unimi.dsi.fastutil.ints.Int2ObjectMap<ResourceLocation> private final Stringprivate final it.unimi.dsi.fastutil.objects.Object2ObjectMap<VillagerProfession, VillagerMetaDataSection.Hat> private final ResourceManagerprivate final it.unimi.dsi.fastutil.objects.Object2ObjectMap<VillagerType, VillagerMetaDataSection.Hat> -
Constructor Summary
ConstructorsConstructorDescriptionVillagerProfessionLayer(RenderLayerParent<T, M> pRenderer, ResourceManager pResourceManager, String pPath) -
Method Summary
Modifier and TypeMethodDescriptiongetHatData(it.unimi.dsi.fastutil.objects.Object2ObjectMap<K, VillagerMetaDataSection.Hat> pCache, String pFolder, DefaultedRegistry<K> pVillagerTypeRegistry, K pKey) private ResourceLocationgetResourceLocation(String pFolder, ResourceLocation pLocation) voidrender(PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, T pLivingEntity, float pLimbSwing, float pLimbSwingAmount, float pPartialTicks, float pAgeInTicks, float pNetHeadYaw, float pHeadPitch) Methods inherited from class net.minecraft.client.renderer.entity.layers.RenderLayer
coloredCutoutModelCopyLayerRender, getParentModel, getTextureLocation, renderColoredCutoutModel
-
Field Details
-
LEVEL_LOCATIONS
-
typeHatCache
private final it.unimi.dsi.fastutil.objects.Object2ObjectMap<VillagerType,VillagerMetaDataSection.Hat> typeHatCache -
professionHatCache
private final it.unimi.dsi.fastutil.objects.Object2ObjectMap<VillagerProfession,VillagerMetaDataSection.Hat> professionHatCache -
resourceManager
-
path
-
-
Constructor Details
-
VillagerProfessionLayer
public VillagerProfessionLayer(RenderLayerParent<T, M> pRenderer, ResourceManager pResourceManager, String pPath)
-
-
Method Details
-
render
public void render(PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, T pLivingEntity, float pLimbSwing, float pLimbSwingAmount, float pPartialTicks, float pAgeInTicks, float pNetHeadYaw, float pHeadPitch) - Specified by:
renderin classRenderLayer<T extends LivingEntity & VillagerDataHolder,M extends EntityModel<T> & VillagerHeadModel>
-
getResourceLocation
-
getHatData
public <K> VillagerMetaDataSection.Hat getHatData(it.unimi.dsi.fastutil.objects.Object2ObjectMap<K, VillagerMetaDataSection.Hat> pCache, String pFolder, DefaultedRegistry<K> pVillagerTypeRegistry, K pKey)
-