1
0
mirror of https://github.com/GeyserMC/GeyserOptionalPack.git synced 2025-12-19 14:59:14 +00:00

Zombie villager textures (#18)

This PR:

    Implements zombie villager biomes and professions
    Utilizes the minecraft:zombie_villager_v2 entity

Main Geyser will need to be updated to send profession data for zombie villagers. Users without optional pack will still be able to take advantage of biome specific zombie villager textures with such an update.

Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
This commit is contained in:
Kas-tle
2021-05-28 16:55:36 -07:00
committed by GitHub
parent 59796f7c95
commit e87fb96cb8
4 changed files with 155 additions and 2 deletions

View File

@@ -15,6 +15,7 @@
* [Player skin parts](#Player-skin-parts) * [Player skin parts](#Player-skin-parts)
* [Shulkers](#Shulkers) * [Shulkers](#Shulkers)
* [Spectral arrow entities](#Spectral-arrow-entities) * [Spectral arrow entities](#Spectral-arrow-entities)
* [Zombie villager textures](#Zombie-villager-textures)
<!--te--> <!--te-->
### Introduction ### Introduction
@@ -238,3 +239,8 @@ The glowing effect and the spectral arrow item and entities do not exist on Bedr
``` ```
The texture required for this to be displayed can be retrieved during the build process. The texture required for this to be displayed can be retrieved during the build process.
### Zombie villager textures
Like villagers, zombie villagers in Java Edition have visible biome and profession variants. It appears that initial implementation of this was started in the Bedrock vanilla resources, given the presence of the entity with the identifier `minecraft:zombie_villager_v2`. However, the textures specified in this vanilla entity definition appear to be entirely blank TGA files. Luckily, the profession textures of zombie villagers and villagers are essentially identical, so the entity definition was updated to reference the villager profession textures.
Zombie villagers, like villagers, have a profession level. This is implemented by adding the same vanilla render controller used to create this effect in the villager entity, `controller.render.villager_v2_level`. The remainder of the entity definition is unchanged.

View File

@@ -0,0 +1,102 @@
{
"format_version": "1.8.0",
"minecraft:client_entity": {
"description": {
"identifier": "minecraft:zombie_villager_v2",
"materials": {
"default": "zombie_villager_v2",
"masked": "zombie_villager_v2_masked"
},
"textures": {
"default": "textures/entity/zombie_villager2/zombie-villager",
"desert": "textures/entity/zombie_villager2/biomes/biome-desert-zombie",
"jungle": "textures/entity/zombie_villager2/biomes/biome-jungle-zombie",
"plains": "textures/entity/zombie_villager2/biomes/biome-plains-zombie",
"savanna": "textures/entity/zombie_villager2/biomes/biome-savanna-zombie",
"snow": "textures/entity/zombie_villager2/biomes/biome-snow-zombie",
"swamp": "textures/entity/zombie_villager2/biomes/biome-swamp-zombie",
"taiga": "textures/entity/zombie_villager2/biomes/biome-taiga-zombie",
"armorer": "textures/entity/villager2/professions/armorer",
"butcher": "textures/entity/villager2/professions/butcher",
"cartographer": "textures/entity/villager2/professions/cartographer",
"cleric": "textures/entity/villager2/professions/cleric",
"farmer": "textures/entity/villager2/professions/farmer",
"fisherman": "textures/entity/villager2/professions/fisherman",
"fletcher": "textures/entity/villager2/professions/fletcher",
"leatherworker": "textures/entity/villager2/professions/leatherworker",
"librarian": "textures/entity/villager2/professions/librarian",
"shepherd": "textures/entity/villager2/professions/shepherd",
"tool_smith": "textures/entity/villager2/professions/toolsmith",
"weapon_smith": "textures/entity/villager2/professions/weaponsmith",
"stonemason": "textures/entity/villager2/professions/stonemason",
"nitwit": "textures/entity/villager2/professions/nitwit",
"unskilled": "textures/entity/zombie_villager2/professions/armorer",
"level_stone": "textures/entity/villager2/levels/level_stone",
"level_iron": "textures/entity/villager2/levels/level_iron",
"level_gold": "textures/entity/villager2/levels/level_gold",
"level_emerald": "textures/entity/villager2/levels/level_emerald",
"level_diamond": "textures/entity/villager2/levels/level_diamond"
},
"geometry": {
"default": "geometry.zombie.villager_v2"
},
"scripts": {
"pre_animation": [
"v.num_professions = 14;",
"v.profession_index = ((q.variant < v.num_professions) ? q.variant : 0);",
"v.tcos0 = (Math.cos(q.modified_distance_moved * 38.17) * q.modified_move_speed / v.gliding_speed_value) * 57.3;",
"v.level_index = (q.trade_tier);"
]
},
"animations": {
"humanoid_big_head": "animation.humanoid.big_head",
"humanoid_base_pose": "animation.humanoid.base_pose",
"look_at_target_default": "animation.humanoid.look_at_target.default",
"look_at_target_gliding": "animation.humanoid.look_at_target.gliding",
"look_at_target_swimming": "animation.humanoid.look_at_target.swimming",
"move": "animation.humanoid.move",
"riding.arms": "animation.humanoid.riding.arms",
"riding.legs": "animation.humanoid.riding.legs",
"holding": "animation.humanoid.holding",
"brandish_spear": "animation.humanoid.brandish_spear",
"charging": "animation.humanoid.charging",
"attack.rotations": "animation.humanoid.attack.rotations",
"sneaking": "animation.humanoid.sneaking",
"bob": "animation.humanoid.bob",
"damage_nearby_mobs": "animation.humanoid.damage_nearby_mobs",
"bow_and_arrow": "animation.humanoid.bow_and_arrow",
"use_item_progress": "animation.humanoid.use_item_progress",
"zombie_attack_bare_hand": "animation.zombie.attack_bare_hand",
"swimming": "animation.zombie.swimming"
},
"animation_controllers": [
{ "humanoid_baby_big_head": "controller.animation.humanoid.baby_big_head" },
{ "humanoid_base_pose": "controller.animation.humanoid.base_pose" },
{ "look_at_target": "controller.animation.humanoid.look_at_target" },
{ "move": "controller.animation.humanoid.move" },
{ "riding": "controller.animation.humanoid.riding" },
{ "holding": "controller.animation.humanoid.holding" },
{ "brandish_spear": "controller.animation.humanoid.brandish_spear" },
{ "charging": "controller.animation.humanoid.charging" },
{ "attack": "controller.animation.humanoid.attack" },
{ "sneaking": "controller.animation.humanoid.sneaking" },
{ "bob": "controller.animation.humanoid.bob" },
{ "damage_nearby_mobs": "controller.animation.humanoid.damage_nearby_mobs" },
{ "bow_and_arrow": "controller.animation.humanoid.bow_and_arrow" },
{ "use_item_progress": "controller.animation.humanoid.use_item_progress" },
{ "zombie_attack_bare_hand": "controller.animation.zombie.attack_bare_hand" },
{ "swimming": "controller.animation.zombie.swimming" }
],
"render_controllers": [
"controller.render.zombie_villager_v2_base",
"controller.render.zombie_villager_v2_masked",
"controller.render.villager_v2_level"
],
"enable_attachables": true,
"spawn_egg": {
"texture": "spawn_egg",
"texture_index": 42
}
}
}
}

View File

@@ -4,7 +4,7 @@
"description": "Optional Bedrock resource pack to extend Geyser functionality", "description": "Optional Bedrock resource pack to extend Geyser functionality",
"name": "GeyserOptionalPack", "name": "GeyserOptionalPack",
"uuid": "e5f5c938-a701-11eb-b2a3-047d7bb283ba", "uuid": "e5f5c938-a701-11eb-b2a3-047d7bb283ba",
"version": [1, 0, 2], "version": [1, 0, 3],
"min_engine_version": [ 1, 16, 0 ] "min_engine_version": [ 1, 16, 0 ]
}, },
"modules": [ "modules": [
@@ -12,7 +12,7 @@
"description": "GeyserOptionalPack", "description": "GeyserOptionalPack",
"type": "resources", "type": "resources",
"uuid": "eebb4ea8-a701-11eb-95ba-047d7bb283ba", "uuid": "eebb4ea8-a701-11eb-95ba-047d7bb283ba",
"version": [1, 0, 2] "version": [1, 0, 3]
} }
] ]
} }

View File

@@ -0,0 +1,45 @@
{
"format_version": "1.8.0",
"render_controllers": {
"controller.render.zombie_villager_v2_masked": {
"arrays": {
"textures": {
"Array.biomes": [
"Texture.plains",
"Texture.desert",
"Texture.jungle",
"Texture.savanna",
"Texture.snow",
"Texture.swamp",
"Texture.taiga"
],
"Array.professions": [
"Texture.unskilled",
"Texture.farmer",
"Texture.fisherman",
"Texture.shepherd",
"Texture.fletcher",
"Texture.librarian",
"Texture.cartographer",
"Texture.cleric",
"Texture.armorer",
"Texture.weapon_smith",
"Texture.tool_smith",
"Texture.butcher",
"Texture.leatherworker",
"Texture.stonemason",
"Texture.nitwit"
]
}
},
"geometry": "Geometry.default",
"materials": [
{ "*": "query.is_baby ? Material.default : Material.masked" }
],
"textures": [
"Array.biomes[q.mark_variant]",
"Array.professions[v.profession_index]"
]
}
}
}