[EMF] Entity Model Features [Fabric & Forge]

[EMF] Entity Model Features [Fabric & Forge]

45M Downloads

[Idea] Armor trims and leather armor overlay fix

PixalThePixeled opened this issue ยท 0 comments

commented

Applying texture on armor part instead of using it on the whole model causes it to not apply armor trims and leather overlay texture, but I have an idea how to fix it:

  • For overlay: Instead of using the texture, it will be possible to use equipment layer, vanilla function added in 1.21.2. "layer" can be used instead of "texture" in model part
  • For trims: New file ("assets/minecraft/emf/trims.json") that will control what textures will be used for each armor trim. All used textures should be added in "armor_trims.json" atlas

How it will look like in .jem file:

...
	{
		"id": "top_hat",
		"invertAxis": "xy",
		"translate": [0, 0, 0],
		"layer": "top_hat", ----- refers to "top_hat" layer in "assets/<namespace>/equipment/<material>.json", used instead of "texture", texture depends on asset_id component
		"trims": "custom_top_hat", ----- refers to "custom_top_hat" variant in "assets/minecraft/emf/trims.json" that will control what trim textures will be applied
		"textureSize": [32, 32],
		"boxes": [
			{
				"coordinates": [-4, 2, -4, 8, 10, 8],
				"uvNorth": [8, 8, 16, 18],
				"uvEast": [0, 8, 8, 18],
				"uvSouth": [24, 8, 32, 18],
				"uvWest": [16, 8, 24, 18],
				"uvUp": [16, 8, 8, 0]
			},
			{
				"coordinates": [-7, 2, -7, 14, 0, 14],
				"uvUp": [14, 32, 0, 18]
			}
		]
	},
...

Equipment Layer:

{
	"layers": {
		"top_hat": [
			{
				"texture": "custom:top_hat", ----- refers to "top_hat.png" texture in "assets/custom/textures/entity/equipment/top_hat"
				"dyeable": {
					"color_when_undyed": -6265536
				}
			},
			{
				"texture": "custom:top_hat_overlay"
			}
		],
		"custom_beanie": [
			{
				"texture": "custom:helmet/beanie/base", ----- same, but with additional folders "assets/custom/textures/entity/equipment/helmet/beanie/base.png" (yes, this can be done in vanilla too)
				"dyeable": {
					"color_when_undyed": -6265536
				}
			},
			{
				"texture": "custom:helmet/beanie/overlay"
			}
		]
	}
}

Trims:

{
	"variants": {
		"custom_top_hat": [
			{
				"minecraft:sentry": "custom:trims/entity/top_hat/sentry", ----- trim id and texture path for it, texture should be added in "armor_trims.json" atlas
				"minecraft:dune":   "custom:trims/entity/top_hat/dune",
				"minecraft:coast":  "custom:trims/entity/top_hat/coast"
			}
		],
		"beanie": [
			{
				"minecraft:sentry": "custom:entity/equipment/helmet/beanie/sentry",
				"minecraft:dune":   "custom:entity/equipment/helmet/beanie/dune",
				"minecraft:coast":  "custom:entity/equipment/helmet/beanie/coast"
			}
		]
	}
}