[Feature request] Delivery Agreements with multiple requested item groups?
micka190 opened this issue ยท 3 comments
I'm working on a modpack where the player will be able to automate trade using Delivery Agreements. I'd like to let the player have a single Delivery Agreement that allows for the sale of multiple different groups of items.
This would work in a similar way to Create: Above and Beyond's trade permits, where the player can purchase a permit that has multiple trades associated with it. The "Lumber Permit" lets the player trade various logs for coins, the "Fishing Permit" lets them trade different fish for coins, etc.
Would it be possible to add an option to give Delivery Agreements multiple groups of requested items that would count towards an order?
For example:
{
ordered: 0,
title: '{"text": "Lumber Permit"}',
message: '{"text": "Allows you to sell stacks of logs for Emeralds"}',
groups: [
{
requested: [{id: "minecraft:oak_log", Count: 64}],
payment: [{id: "minecraft:emerald", Count: 1}]
},
{
requested: [{id: "minecraft:spruce_log", Count: 64}],
payment: [{id: "minecraft:emerald", Count: 1}]
},
{
requested: [{id: "minecraft:birch_log, Count: 64}],
payment: [{id: "minecraft:emerald", Count: 1}]
}
]
}
The above would only work if the player put in "64x Oak Logs", "64x Spruce Logs", or "64x Birch Logs". If the player entered multiple of these, the delivery table would wait until only one group is present before processing the delivery.
No, sorry. My example was kind of bad since it has tag-compatible items and the same quantities everywhere. It wouldn't be tag-based.
Here's a better example:
{
ordered: 0,
title: '{"text": "Mechanic Permit"}',
message: '{"text": "Allows you to sell various pieces of machinery for Emeralds"}',
groups: [
{
requested: [{id: "minecraft:piston", Count: 64}],
payment: [{id: "minecraft:emerald", Count: 3}]
},
{
requested: [{id: "minecraft:redstone", Count: 32}],
payment: [{id: "minecraft:emerald", Count: 2}]
},
{
requested: [{id: "minecraft:copper_ingot, Count: 45}],
payment: [{id: "minecraft:diamond", Count: 1}]
}
]
}
Using a single Delivery Agreement item, the player could either sell:
- 64 Pistons for 3 Emeralds
- 32 Redstone dust for 2 Emeralds
- 45 Copper Ingot for 1 Diamond
They can not mix these.
Am I understanding it correctly that it would work similar to a single item entry with '#minecraft:logs' tag, but it will not allow mixing items ie 32x Spruce Log + 32x Oak Log?