The indestructible Tree

Hi! :merry:

So, I’ve been kinda successfully trying to mod in my one and only tree. I’ve encountered an issue, though… The tree is probably so breathtaking my hearthlings refuse to cut it down.

I did set the mixins to identify it and it’s working, because the scale is correct. I’m pretty sure my problem is somewhere between mob : model origin and region collision shape. I’ve stolen some code from the oak tree and played around with it, but I’m maybe too dumb to see the logic in it :thinking:

If somebody could give me a little push in the right direction?

Here’s what I have so far:

{

   "mixins": "stonehearth:mixins:tree",
   "type": "entity",
   "components": {
      "model_variants": {
         "default": {
            "models": [
               "file(phase6.qb)"
            ]
         }
      }
   },

     "stonehearth:resource_node": {
         "resource": "stonehearth:resources:wood:oak_log",
         "durability": 31,
         "resource_loot_table": {
            "entries": {
               "optional": {
                  "num_rolls": {
                     "min": 1,
                     "max": 1
                  },
                  "items": {
                     "none": {
                        "uri": "",
                        "weight": 6
                     },
                     "pelt": {
                        "uri": "stonehearth:trees:oak:seed",
                        "weight": 1
                     }
                  }
               }
            }
         }
      },

"mob": {
         "model_origin": { "x": 0, "y": 0, "z": 0},
         "region_origin": { "x": 0, "y": 0, "z": 0 },
         "align_to_grid": [
            "x",
            "z"
         ]
      },
      "destination": {
         "region": [
            {
               "min": { "x": -4, "y": 0, "z": -4 },
               "max": { "x": 5, "y": 1, "z": 5 }
            }
         ]
      },
      "region_collision_shape": {
         "region": [
            {
               "min": { "x": -4, "y": 0, "z": -4 },
               "max": { "x": 5, "y": 24, "z": 5 }
            }
         ]
      },

   "entity_data": {
      "stonehearth:catalog": {
         "description": "A mystical tree from distant lands!",
         "icon": "file(ancient_wisteria.png)",
         "display_name": "Ancient Wisteria"
      },

      "stonehearth:appeal": {
         "appeal": 5   }
    }
}

Your resource_node is outside the components (and many other things)

It should be:

{
	"components": {
		...all your components...
	},
	"entity_data": {
		...
	}
}
2 Likes

Yay! It’s fixed now! Thanks BrunoSupremo!

3 Likes