AppleSkin

AppleSkin

236M Downloads

Hardcore heart icons don't work when Colorful Hearts is installed

RoyalReject opened this issue ยท 7 comments

commented

While in hardcore change the visualization of potential heath restored to match hardcore hearts
2024-03-17_20 57 49

commented

What version of AppleSkin/what version of Minecraft are you using? This functionality already exists in the code:

Identifier backgroundSprite = TextureHelper.getHeartTexture(isHardcore, HeartType.CONTAINER);

but it may have regressed/not be working in certain versions.

commented

I just noticed that as I was looking through the source to create a PR.
Minecraft: 1.20.4
NeoForge: 20.4.200
AppleSkin: 1.20.4-2.5.1

commented

Sounds like one of two things is going wrong:

boolean isHardcore = mc.player.level() != null && mc.player.level().getLevelData().isHardcore();

ends up with the value false instead of true

or

public static ResourceLocation getHeartTexture(boolean hardcore, HeartType type)
{
return switch (type)
{
case CONTAINER -> hardcore ? HEART_HARDCORE_CONTAINER : HEART_CONTAINER;
case FULL -> hardcore ? HEART_HARDCORE_FULL : HEART_FULL;
case HALF -> hardcore ? HEART_HARDCORE_HALF : HEART_HALF;
};
}

is returning the wrong texture

commented

Still looking at it but it seems to be returning true.
image

commented

Actually its working in the dev environment, It might be a conflict with another mod
2024-03-17_21 19 06

commented