Closed LTCatt closed 2 years ago
This is a good idea, I will add it in the next update.
Perhaps a check could be added by the way to not show the marker if the entity is invisible. Invisible wandering merchants has a marker on top of his head is quite funny...
if (entity.isInvisible()) return;
I have just released version 1.3 which allows any entity to have a marker. I've also added built-in markers for merchants added in the Goblin Traders mod and made it so invisible entities will not render their markers. Thanks for the suggestions.
https://github.com/AHilyard/MerchantMarkers/blob/1.16.5/src/main/java/com/anthonyhilyard/merchantmarkers/render/Markers.java
At line 150: if (entity instanceof AbstractVillagerEntity)
If you detect IMerchant instead of AbstractVillagerEntity, this mod can support merchants from more mods. For example, the Goblin Merchant, whose goblin entity does not inherit AbstractVillagerEntity because it does not have Age, but goblin implements IMerchant.
In fact, after I modified this code with mixin, the whole mod worked quite well...