This is a proposal for a way to include the loot table that is being overwritten by the new data pack. This can be useful if you want to partially overwrite a vanilla loot table, but want it to be future proof. Or if you also want other data packs to be able to overwrite the same vanilla loot table. This is currently not possible.
The first data pack loads the initial loot table.
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "stone"
}
]
}
]
}
A later data pack overwrites the loot table with the same name, but because it uses the inherit
entry type,
it will include the original loot table.
In this example we want to drop a diamond if it's raining, otherwise drop the original loot table.
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "alternative",
"terms": [
{
"type": "item",
"name": "diamond",
"conditions": [
{
"condition": "weather_check",
"raining": true
}
]
},
{
"type": "inherit"
}
]
}
]
}
]
}
Just after loading, you can interpret the loot table as having the following structure.
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "alternative",
"terms": [
{
"type": "item",
"name": "diamond",
"conditions": [
{
"condition": "weather_check",
"raining": true
}
]
},
{
"type": "inherit",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "stone"
}
]
}
]
}
]
}
]
}
]
}