Variants

Variants allow you to customize the appearance and spawn conditions of various entities and paintings in Minecraft. Kore provides type-safe DSL builders for creating custom variants for cats, cows, chickens, frogs, pigs, wolves, and paintings.

Entity Variants

Spawn Conditions

Most entity variants support spawn conditions that control when and where the variant appears. Available condition types:

  • add(priority): Base condition with just a priority
  • biome(priority, biomes...): Spawn in specific biomes or biome tags
  • moonBrightness(priority, value): Spawn based on moon brightness (single value)
  • moonBrightness(priority, min, max): Spawn based on moon brightness (range)
  • structures(priority, structures...): Spawn near specific structures or structure tags

Higher priority values take precedence when multiple conditions match.

Cat Variants

Cat variants define the texture and spawn conditions for cats. You can specify biomes, moon brightness, and structures as spawn conditions.

catVariant("test_cat_variant", Textures.Entity.Cat.TABBY) {
	spawnConditions {
		add(10)
		biome(5, Biomes.PLAINS)
		biome(2, Tags.Worldgen.Biome.IS_OVERWORLD)
		moonBrightness(1, 1.0)
		moonBrightness(1, 0.5, 0.75)
		structures(0, ConfiguredStructures.VILLAGE_PLAINS)
	}
}
Kotlin

Produces JSON:

{
	"asset_id": "minecraft:entity/cat/tabby",
	"spawn_conditions": [
		{
			"priority": 10
		},
		{
			"priority": 5,
			"condition": {
				"type": "minecraft:biome",
				"biomes": "minecraft:plains"
			}
		},
		{
			"priority": 2,
			"condition": {
				"type": "minecraft:biome",
				"biomes": "#minecraft:is_overworld"
			}
		},
		{
			"priority": 1,
			"condition": {
				"type": "minecraft:moon_brightness",
				"range": 1.0
			}
		},
		{
			"priority": 1,
			"condition": {
				"type": "minecraft:moon_brightness",
				"range": {
					"min": 0.5,
					"max": 0.75
				}
			}
		},
		{
			"priority": 0,
			"condition": {
				"type": "minecraft:structure",
				"structures": "minecraft:village_plains"
			}
		}
	]
}
JSON

Cow Variants

Cow variants define the texture, model, and spawn conditions for cows.

cowVariant("test_cow_variant", Textures.Entity.Cow.COLD_COW, CowModel.COLD) {
	spawnConditions {
		structures(0, Tags.Worldgen.Structure.MINESHAFT)
	}
}
Kotlin

Produces JSON:

{
	"asset_id": "minecraft:entity/cow/cold_cow",
	"model": "cold",
	"spawn_conditions": [
		{
			"priority": 0,
			"condition": {
				"type": "minecraft:structure",
				"structures": "#minecraft:mineshaft"
			}
		}
	]
}
JSON

Chicken Variants

Chicken variants define the texture, model, and spawn conditions for chickens.

chickenVariant("test_chicken_variant", Textures.Entity.Chicken.TEMPERATE_CHICKEN, ChickenModel.NORMAL) {
	spawnConditions {
		structures(0, Tags.Worldgen.Structure.VILLAGE)
	}
}
Kotlin

Produces JSON:

{
	"asset_id": "minecraft:entity/chicken/temperate_chicken",
	"model": "normal",
	"spawn_conditions": [
		{
			"priority": 0,
			"condition": {
				"type": "minecraft:structure",
				"structures": "#minecraft:village"
			}
		}
	]
}
JSON

Frog Variants

Frog variants define the texture and spawn conditions for frogs.

frogVariant("test_frog_variant", Textures.Entity.Frog.TEMPERATE_FROG) {
	spawnConditions {
		add(10)
		biome(5, Biomes.SNOWY_PLAINS)
		biome(2, Tags.Worldgen.Biome.SPAWNS_COLD_VARIANT_FROGS)
		moonBrightness(1, 1.0)
		moonBrightness(1, 0.5, 0.75)
		structures(0, ConfiguredStructures.END_CITY)
	}
}
Kotlin

Produces JSON:

{
	"asset_id": "minecraft:entity/frog/temperate_frog",
	"spawn_conditions": [
		{
			"priority": 10
		},
		{
			"priority": 5,
			"condition": {
				"type": "minecraft:biome",
				"biomes": "minecraft:snowy_plains"
			}
		},
		{
			"priority": 2,
			"condition": {
				"type": "minecraft:biome",
				"biomes": "#minecraft:spawns_cold_variant_frogs"
			}
		},
		{
			"priority": 1,
			"condition": {
				"type": "minecraft:moon_brightness",
				"range": 1.0
			}
		},
		{
			"priority": 1,
			"condition": {
				"type": "minecraft:moon_brightness",
				"range": {
					"min": 0.5,
					"max": 0.75
				}
			}
		},
		{
			"priority": 0,
			"condition": {
				"type": "minecraft:structure",
				"structures": "minecraft:end_city"
			}
		}
	]
}
JSON

Pig Variants

Pig variants define the texture, model, and spawn conditions for pigs.

pigVariant("test_pig_variant", Textures.Entity.Pig.COLD_PIG, PigModel.COLD) {
	spawnConditions {
		structures(0, Tags.Worldgen.Structure.ON_TREASURE_MAPS)
	}
}
Kotlin

Produces JSON:

{
	"asset_id": "minecraft:entity/pig/cold_pig",
	"model": "cold",
	"spawn_conditions": [
		{
			"priority": 0,
			"condition": {
				"type": "minecraft:structure",
				"structures": "#minecraft:on_treasure_maps"
			}
		}
	]
}
JSON

Wolf Variants

Wolf variants define separate textures for angry, tame, and wild states, along with spawn conditions.

wolfVariant("test_wolf_variant") {
	assets(
		angry = Textures.Entity.Wolf.WOLF_STRIPED,
		tame = Textures.Entity.Wolf.WOLF_RUSTY_ANGRY,
		wild = Textures.Entity.Wolf.WOLF_BLACK,
	)
	spawnConditions {
		biome(5, Biomes.OCEAN, Biomes.SNOWY_SLOPES)
	}
}
Kotlin

Produces JSON:

{
	"assets": {
		"angry": "minecraft:entity/wolf/wolf_striped",
		"tame": "minecraft:entity/wolf/wolf_rusty_angry",
		"wild": "minecraft:entity/wolf/wolf_black"
	},
	"spawn_conditions": [
		{
			"priority": 5,
			"condition": {
				"type": "minecraft:biome",
				"biomes": [
					"minecraft:ocean",
					"minecraft:snowy_slopes"
				]
			}
		}
	]
}
JSON

Wolf Sound Variants

Wolf sound variants define custom sounds for wolves. Sound variants are independent of color variants and spawning biome. Wolves will make the sounds associated with their variant when they bark, pant, whine, growl, die, or get hurt.

wolfSoundVariant("funny") {
	ambientSound = SoundEvents.Entity.Pig.AMBIENT
	deathSound = SoundEvents.Entity.Creeper.DEATH
	growlSound = SoundEvents.Entity.Player.LEVELUP
	hurtSound = SoundEvents.Entity.Zombie.HURT
	pantSound = SoundEvents.Entity.EnderDragon.FLAP
	whineSound = SoundEvents.Entity.Cat.PURR
}
Kotlin

Produces JSON:

{
	"ambient_sound": "minecraft:entity.pig.ambient",
	"death_sound": "minecraft:entity.creeper.death",
	"growl_sound": "minecraft:entity.player.levelup",
	"hurt_sound": "minecraft:entity.zombie.hurt",
	"pant_sound": "minecraft:entity.ender_dragon.flap",
	"whine_sound": "minecraft:entity.cat.purr"
}
JSON

Other Variants

Painting Variants

Painting variants define custom paintings with dimensions and optional metadata like author and title.

// Basic painting variant
paintingVariant(
	assetId = Textures.Painting.KEBAB,
	height = 16,
	width = 16
)
Kotlin

Produces JSON:

{
	"asset_id": "minecraft:kebab",
	"height": 16,
	"width": 16
}
JSON

With default dimensions (1x1):

paintingVariant(
	assetId = Textures.Painting.AZTEC
)
Kotlin

Produces JSON:

{
	"asset_id": "minecraft:aztec",
	"height": 1,
	"width": 1
}
JSON

With author and title:

paintingVariant(
	assetId = Textures.Painting.AZTEC,
) {
	author = textComponent("Ayfri")
	title = textComponent("Aztec")
}
Kotlin

Produces JSON:

{
	"asset_id": "minecraft:aztec",
	"height": 1,
	"width": 1,
	"author": "Ayfri",
	"title": "Aztec"
}
JSON

See Also

  • Chat Components - For painting title and author text formatting
  • Tags - Use variant tags for spawn conditions