Infection Conversions (Datapack support) - SmileycorpMC/The-Hordes GitHub Wiki

Prior to 1.3.+ this option is located in the hordes-common.toml file.

In 1.3.+ there is a new file for this located at data/<identifier>/horde_data/infection_conversions.json in your datapack.

Below are the settings for the default datapack:

Default Conversions
[
	{
		"entity": "minecraft:horse",
		"converts_to": "minecraft:zombie_horse",
		"chance": 0.65
	},
	{
		"entity": "minecraft:piglin",
		"converts_to": "minecraft:zombified_piglin",
		"chance": 0.75
	},
	{
		"entity": "minecraft:piglin_brute",
		"converts_to": "minecraft:zombified_piglin",
		"chance": 0.35,
		"nbt": "{Attributes:[{Name:\"generic.max_health\",Base:50f}], texture:\"hordes:textures/entity/zombified_piglin_brute.png\", chat_name:\"entity.hordes.ZombifiedPiglinBrute.name\"}"
	},
	{
		"entity": "minecraft:hoglin",
		"converts_to": "minecraft:zoglin",
		"chance": 0.15
	},
	{
		"entity": "minecraft:wandering_trader",
		"converts_to": "minecraft:zombie_villager",
		"chance": 0.75,
		"nbt": "{texture:\"hordes:textures/entity/zombie_wandering_trader.png\", chat_name:\"entity.hordes.ZombieWanderingTrader.name\", VillagerData:{type:none}}"
	},
	{
		"entity": "minecraft:pillager",
		"converts_to": "minecraft:zombie_villager",
		"chance": 0.75,
		"nbt": "{Attributes:[{Name:\"generic.max_health\",Base:24f}], texture:\"hordes:textures/entity/zombie_pillager.png\", chat_name:\"entity.hordes.ZombiePillager.name\", VillagerData:{type:none}}"
	},
	{
		"entity": "minecraft:vindicator",
		"converts_to": "minecraft:zombie_villager",
		"chance": 0.35,
		"nbt": "{Attributes:[{Name:\"generic.max_health\",Base:24f}], texture:\"hordes:textures/entity/zombie_vindicator.png\", chat_name:\"entity.hordes.ZombieVindicator.name\", VillagerData:{type:none}}"
	},
	{
		"entity": "minecraft:evoker",
		"converts_to": "minecraft:zombie_villager",
		"chance": 0.5,
		"nbt": "{Attributes:[{Name:\"generic.max_health\",Base:24f}], texture:\"hordes:textures/entity/zombie_evoker.png\", chat_name:\"entity.hordes.ZombieEvoker.name\", VillagerData:{type:none}}"
	},
	{
		"entity": "minecraft:illusioner",
		"converts_to": "minecraft:zombie_villager",
		"chance": 0.15,
		"nbt": "{Attributes:[{Name:\"generic.max_health\",Base:32f}], texture:\"hordes:textures/entity/zombie_illusioner.png\", chat_name:\"entity.hordes.ZombieIllusioner.name\", VillagerData:{type:none}}"
	},
	{
		"entity": "minecraft:witch",
		"converts_to": "minecraft:zombie_villager",
		"chance": 0.25,
		"nbt": "{Attributes:[{Name:\"generic.max_health\",Base:26f}], texture:\"hordes:textures/entity/zombie_witch.png\", chat_name:\"entity.hordes.ZombieWitch.name\", VillagerData:{type:none}}"
	}
]

There are a few options here entity is the registry name of the entity that should be converted and converts_to is the name of the entity it becomes after infection. The registry name is the same name used in the hordes table files and the /summon command.

chance is a decimal chance for the entity to gain the infected potion effect on being hit by an infectious entity. With 0.25 being a 25% chance and 1.0 being 100%.

nbt defines any custom nbt that the entity should spawn with.

Extra NBT values

The hordes adds two unique nbt options used throughout this file:

texture can be used to specify a unique texture mobs spawned with this nbt tag are given.

chat_name changes the entities name in chat to the specified name, useful for hiding the fact that this isn't a custom entity in kill messages without forcing the mob to have a nametag.

These nbt options can be used at any point in entity nbt, and are not just restricted to conversions.

Example
{
		"entity": "minecraft:piglin_brute",
		"converts_to": "minecraft:zombified_piglin",
		"chance": 0.35,
		"nbt": "{Attributes:[{Name:\"generic.max_health\",Base:50f}], texture:\"hordes:textures/entity/zombified_piglin_brute.png\", chat_name:\"entity.hordes.ZombifiedPiglinBrute.name\"}"
	}

In the example you can see that the zombified piglin brute is just a zombified piglin with it's texture set and an entry set in the lang file, both found in the assets folder of the attached resource pack, and it's health set to 50 to reflect the health of real piglin brutes.

⚠️ **GitHub.com Fallback** ⚠️