How to make an entity that can be harvested multiple times drop multiple items per harvest?
Simple adding a “resource_loot_table” node to the “stonehearth:renewable_resource_node” isn’t working. Actually, it is giving an error.
But, adding a “resource_loot_table” to a “stonehearth:resource_node” is possible and I’m actually using it in another item. The difference is that a “stonehearth:resource_node” (not the renewable) make it harvestable only once, destroying the item. Those zombie chests have this exactly behavior, you harvest them and it drops multiple items, and the chest is destroyed.
Example code:
Using “stonehearth:resource_node”. This works (but is a single harvest destroying the item after, like how a tree works):
"stonehearth:resource_node": {
"resource_loot_table": {
"entries": {
"default": {
"items": {
"log1": {
"uri": "stonehearth:resources:wood:oak_log",
"weight": 1.5
},
"log2": {
"uri": "stonehearth:resources:wood:acacia_log",
"weight": 1
}
}
}
}
}
},
Now, the same thing, but in the “stonehearth:renewable_resource_node”, doesn’t work.
"stonehearth:renewable_resource_node": {
"category": "harvest",
"harvest_overlay_effect": "stonehearth:effects:loot_effect",
"unripe_description": "empty",
"resource_loot_table": {
"entries": {
"default": {
"items": {
"log1": {
"uri": "stonehearth:resources:wood:oak_log",
"weight": 1.5
},
"log2": {
"uri": "stonehearth:resources:wood:acacia_log",
"weight": 1
}
}
}
}
},
"renewal_time": "2d"
},
So, there are items that you consume, like mining boulders or chopping trees, for them the “resource_loot_table” works and you can make them drop multiple items.
But for items that you can harvest multiple times, like berry bushes or silkweeds, using “resource_loot_table” doesn’t works and give errors.