[ETF] Entity Texture Features - [Fabric & Forge]

[ETF] Entity Texture Features - [Fabric & Forge]

57M Downloads

Mob textures based on max hp not applying immediately

Closed this issue ยท 8 comments

commented

Basically what my problem is that textures I made for specific mob health pools are not applying immediately after they spawn in. Instead, I have to either reload the resource pack or walk back far enough for them to leave render distance in order for the textures to update and properly apply. I've tried setting the update speed of both textures and models to "instant" in the config, but that only seems to affect how quickly they update out of render distance. Is this acting as intended and is there a way to achieve what I'm after? I don't seem to have this issue with textures based on name or held/equipped items.

commented

are you on singleplayer or a server?
some highly performance focused servers wont send data like health until it needs to update

commented

also show me the properties file you use

commented

I'm on a multiplayer server, so I managed to get the max hp values with a mod that shows nbt data.

This is the properties I used for a zombie villager.
skins.1=4
weights.1=1 1
maxHealth.1= 600

skins.2=1-3
weights.2=1 1

This one for zombified piglins.
skins.1=7
weights.1=1 1
items.1=minecraft:golden_helmet minecraft:golden_chestplate minecraft:golden_leggings minecraft:golden_boots minecraft:wooden_axe minecraft:iron_axe

maxHealth.2= 100
skins.2=7
weights.2=1 1

skins.3=6
weights.3=1 1
items.3=minecraft:iron_boots minecraft:golden_hoe minecraft:diamond_pickaxe minecraft:iron_leggings

maxHealth.4= 75
skins.4=6
weights.4=1 1

skins.5=5
weights.5=1 1
items.5=minecraft:stone_pickaxe minecraft:diamond_axe minecraft:iron_hoe minecraft:iron_helmet minecraft:iron_chestplate minecraft:wooden_pickaxe

maxHealth.6= 50
skins.6=5
weights.6=1 1

skins.7=1-4
weights.7=1 1
items.7=minecraft:iron_pickaxe minecraft:iron_shovel minecraft:wooden_shovel minecraft:wooden_hoe minecraft:chainmail_helmet minecraft:chainmail_chestplate minecraft:diamond_shovel minecraft:golden_pickaxe minecraft:golden_shovel

maxHealth.8= 30
skins.8=1-4
weights.8=1 1

skins.9=1-4

The intention was to assign each health pool its own texture, and a random set of skins in the case they don't meet that criteria. For the piglins, I set some associated items that must be held/equipped to apply the skin instead as a test. I found that it did not have the same issue as max hp, and I know that the health values check out because they work after the skin gets updated. The issue is that it does not apply on first spawning in, but does after the pack gets reloaded or the mob leaves and comes back into render distance. The original piglin properties were the same but without the items added.

commented

Also, I should mention that what happens is that it falls back to the random set of skins initially before updating. It also seems that them spawning in while I'm on the move seems to somehow cause this, whereas standing still and letting them spawn in the vicinity applies the texture properly most of the time.

commented

hmm

does adding print: at the start of the test print their max hp values to the log?

e.g. maxHealth.8=print:30

commented

Sorry for the late reply, but I think I figured out what the issue was. Apparently in the property settings there is an option for properties to be "locked to spawn conditions", which is on by default. I tried turning it off and now the issue seems to be gone. I suppose there is a reason it is on by default, maybe the server I play on spawns mobs differently from how the game handles natural spawns normally. Thank you for responding as quick as you did at least. as well as trying to help me troubleshoot this,

commented

ah yeah hadn't even thought of that, i suppose given what commands can ddo i should change that ones default, but then again this si the only times its ever come up as an issue

commented

Alright so sorry to rehash this topic, but now it seems I'm getting the issue with the overlay texture of strays. Basically what happens is that while the inner texture applies properly, the outer layer seems to be randomized. And once again it doesn't apply properly until I either leave render distance or reload the pack. I've tried using a properties file specifically for the outer model to force the overlay texture to match the base texture, but it doesn't seem to work.

skins.1=2 17-22
textureSuffix.1=2 17-22
weights.1=1 1

skins.2=1
textureSuffix.2=1
weights.2=1 1

skins.3=14
textureSuffix.3=14
weights.3=1 1

skins.4=12
textureSuffix.4=12
weights.4=1 1

skins.5=16
textureSuffix.5=16
weights.5=1 1

skins.6=9-11 13 15
textureSuffix.6=9-11 13 15
weights.6=1 1

skins.7=8
textureSuffix.7=8
weights.7=1 1

skins.8=3-7
textureSuffix.8=3-7
weights.8=1 1

Basically sometimes overlay skins 11, 13, 15, and 16 apply over the base textures 17-22 instead of their respective overlays. However, the problem currently is not present for literally every other entity. As far as I'm aware. Is there a better way to force the overlays to match their base textures to the number?