u/TheStarGamer1

Store Entity Type / Merge two Strings

So I'm trying to rework my Health Bars Datapack to add new features and update to newer versions. I need a method to grab the entity type of a mob.

I managed to get it to store the correct name, however I would like to make the first letter a capital letter. Storing the first letter and checking for the right one is not a problem but I don't know how I can actually merge two strings into one if that even is possible.

Is there a better way to get the mob type (other than checking for every single mob in the game (which I really don't want to do) or to merge two strings into one?

Currently I'm getting the mob type by spawning in a text display and using the "selector" of the nearest mob (which is always the one spawning it).

u/TheStarGamer1 — 2 days ago