SuperMartijn642 / Fusion

20 stars 3 forks source link

[Question] How would I configure multiple overlays for the same block type? #29

Closed natpalmer-e4o4 closed 7 months ago

natpalmer-e4o4 commented 7 months ago

Question

How would I configure multiple overlays for the same block type?

Using the wiki example for overlays, if I wanted a sand and grass overlay for gravel, how would I add the additional grass overlay to the example?

SuperMartijn642 commented 7 months ago

Just have to add one quad for each texture:

{
   "loader": "fusion:model",
   "type": "connecting",
   "parent": "block/block",
   "textures": {
      "particle": "#all",
      "all": "block/gravel",
      "sand_overlay": "example:sand_overlay",
      "grass_overlay": "example:grass_overlay"
   },
   "connections": {
      "sand_overlay": [
         {
            "type": "match_block",
            "block": "minecraft:sand"
         }
      ],
      "grass_overlay": [
         {
            "type": "match_block",
            "block": "minecraft:grass_block"
         }
      ]
   },
   "elements": [
      {
         "from": [ 0, 0, 0 ],
         "to": [ 16, 16, 16 ],
         "faces": {
            "down":  { "texture": "#all", "cullface": "down" },
            "up":   { "texture": "#all", "cullface": "up" },
            "north": { "texture": "#all", "cullface": "north" },
            "south": { "texture": "#all", "cullface": "south" },
            "west":  { "texture": "#all", "cullface": "west" },
            "east":  { "texture": "#all", "cullface": "east" }
         }
      },
      {
         "from": [ 0, 0, 0 ],
         "to": [ 16, 16, 16 ],
         "faces": {
            "up":   { "texture": "#sand_overlay", "cullface": "up" }
         }
      }
      {
         "from": [ 0, 0, 0 ],
         "to": [ 16, 16, 16 ],
         "faces": {
            "up":   { "texture": "#grass_overlay", "cullface": "up" }
         }
      }
   ]
}