Path: blob/1.21.x/patches/minecraft/net/minecraft/client/renderer/blockentity/SkullBlockRenderer.java.patch
7710 views
--- a/net/minecraft/client/renderer/blockentity/SkullBlockRenderer.java1+++ b/net/minecraft/client/renderer/blockentity/SkullBlockRenderer.java2@@ -36,6 +_,7 @@34@OnlyIn(Dist.CLIENT)5public class SkullBlockRenderer implements BlockEntityRenderer<SkullBlockEntity, SkullBlockRenderState> {6+ private static Map<SkullBlock.Type, Function<EntityModelSet, SkullModelBase>> customModels;7private final Function<SkullBlock.Type, SkullModelBase> modelByType;8public static final Map<SkullBlock.Type, ResourceLocation> SKIN_BY_TYPE = Util.make(Maps.newHashMap(), p_340906_ -> {9p_340906_.put(SkullBlock.Types.SKELETON, ResourceLocation.withDefaultNamespace("textures/entity/skeleton/skeleton.png"));10@@ -61,7 +_,9 @@11case PIGLIN -> new PiglinHeadModel(p_376421_.bakeLayer(ModelLayers.PIGLIN_HEAD));12});13} else {14- return null;15+ if (customModels == null)16+ customModels = net.minecraftforge.client.event.ForgeEventFactoryClient.onCreateSkullModels();17+ return customModels.getOrDefault(p_377655_, k -> null).apply(p_376421_);18}19}20212223