Mob Text Bubbles
This mod adds text bubbles that will display randomly above mobs. The content of the text bubbles can be modified as well as the mobs that display by simply using a datapack.
The mod will also display text bubbles on different situations, for example it will display a custom text bubble when its raining, when its in danger etc... (this option can be turned off), also the mod has many other customizable elements such as the scale of the bubbles, text width, display ticks, fade in and fade out ticks, etc... The mod also has different colors of text bubbles (white for passive mobs, green for villagers and red for hostile mobs), the color of the bubbles can be easily changed with a simple texturepack.
Datapack tutorial
Zombies text bubbles example:
{
"entries": [
{
"weight": 10,
"entity": "minecraft:zombie",
"text": "Hungry."
},
{
"weight": 10,
"entity": "minecraft:zombie",
"text": "Need brains."
},
{
"weight": 10,
"entity": "minecraft:zombie",
"text": "Cold..."
},
{
"weight": 10,
"entity": "minecraft:zombie",
"text": "Where am I?"
},
{
"weight": 2,
"entity": "minecraft:zombie",
"rare": true,
"text": "I used to be an adventurer."
},
{
"weight": 10,
"entity": "minecraft:zombie_villager",
"text": "Hungry."
},
{
"weight": 10,
"entity": "minecraft:husk",
"text": "So thirsty..."
},
{
"weight": 10,
"entity": "minecraft:drowned",
"text": "Join us."
}
]
}
Custom text bubbles example:
{
"entries": [
{ "entity": "examplemod:example_entity_id", "text": "Does anyone else feel that way?" },
{ "entity": "examplemod:example_entity_id", "text": "Don't look at me like that." },
{ "entity": "examplemod:example_entity_id", "text": "Today is a good day to exist." },
{ "entity": "examplemod:example_entity_id", "text": "This is weird, even for me." },
{ "entity": "examplemod:example_entity_id", "text": "Did you hear that?", "conditions": { "time": "night" } },
{ "entity": "examplemod:example_entity_id", "text": "It's raining!", "conditions": { "weather": "rain" } },
{ "entity": "examplemod:example_entity_id", "text": "Hey! that hurts.", "conditions": { "health": "critical" } },
{ "entity": "examplemod:example_entity_id", "text": "Run, run, run!", "conditions": { "nearby": ["hostile"] } },
{ "entity": "examplemod:example_entity_id", "text": "No one really understands me.", "rare": true }
]
}
The name of the json doesnt matter for adding custom text bubbles for different mobs, as you can see in the zombies.json example there are also other mobs like zombie villagers and drowneds in the same json file. So you can easily add all the mobs you want to display custom text bubbles separatetly in just one json file.
Credits
-The main idea comes originally from Dynamic Surroundings made by Orecruncher
-The main code comes from the mod RLBubbles made by EmeryTheModder
-The bubbles texture comes from the mod Notable Bubble Text (NBT) made by Mrbysco