Vampirism - Become a vampire!

Vampirism - Become a vampire!

16M Downloads

[Feature][Question][1.12.2] Blood vision outline color

Nuwbertron opened this issue ยท 4 comments

commented

I would like to ask if there is a way to change the color of the outline aplied by blood vision to mobs.

I'm asking because, on the server i play on, we have added the "Howling Moon" mod, which adds werewolves. Werewolf players get a black outline from blood vision while still having a blood value.

I am aware that minecreaft version 1.12.2 is no longer suported so I don't expect any update to the mod. I'm just asking for guidance in changing (or at least finding) the color values in the mod's code.

I apoligise for the non standard formating and, if by chance i shoud have posted this somewhere else, for posting this here.

commented

I am not entirely sure, but I think players are never rendered with red outlines regardless of their faction or blood value (not sure why actually).

Best solution would have been to add some compat with Howling Moon, but their author never responded to any of my messages and the mod is dead now I think.

There are three lists of entities for blood vision a) blood b) garlic c) normal.
They are collected here:

if (creature != null && creature.getBlood() > 0 && !creature.hasPoisonousBlood()) {
renderedEntitiesWithBlood.add(event.getEntity());
} else if (VampirePlayer.get(mc.player).getSpecialAttributes().garlic_blood_vision && ((creature != null && creature.hasPoisonousBlood()) || Helper.isHunter(entity))) {
renderedEntitiesWithGarlicInfused.add(event.getEntity());
} else {
renderedEntitiesWithoutBlood.add(event.getEntity());

Colors are set here:

blit1.getShaderManager().getShaderUniform("ColorModulate").set(1F, 0.1F, 0.1F, (1F * progress));
blit2.getShaderManager().getShaderUniform("ColorModulate").set(0.1F, 0.1F, 0.2F, (0.7F * progress));
blit3.getShaderManager().getShaderUniform("ColorModulate").set(0.1F, 0.1F, 1F, (1F * progress));

Blit1/2/3 are the three different shaders and the first three floats are the RGB values of the outlines. (1,0.1,0.1) for the blood entities.

commented

So if my assumption is correct (it probably isn't) a quick and dirty fix of this would be to change the color of the outline of non blooded entities to something like white (whatever the rgb value for that would be). Would that be the second float value?

commented

You can set the values for blit2 to something like 0.3,0.3,0.3 (and change 0.7 to 1). But that will affect all entities not just werewolf players

commented

With my limited knowledge that's the best i can hope for. Thank you for your help.