Hey, I have some code that creates a simple villager trade shop, based on config.
If I set the input as any vanilla item, such as charcoal, it works perfectly as the first image shows. It shows up, I can trade no problem.
But if I change JUST the config "input" for the trade to test_item, it works visually but I cannot trade. Pictures added for clarity.
Config before (working with charcoal):
config:
type: data
main_shop:
one:
result: diamond
result_amount: 3
input: charcoal
input_cost: 5
Config after (not working with test_item, but shows the correct item visually I just cannot trade):
config:
type: data
main_shop:
one:
result: diamond
result_amount: 3
input: test_item
input_cost: 5
Also, here is the code used to generate the trade from the config:
get_config:
type: procedure
definitions: key
script:
- determine <script[config].data_key[<[key]>]>
test_shop:
type: task
definitions: player
script:
- define config_trades <map[<proc[get_config].context[main_shop]>]>
- define trades <list>
- foreach <[config_trades]> key:key as:trade_info:
- define trades:->:<trade[trade[result=<[trade_info].get[result]>[quantity=<[trade_info].get[result_amount]>];max_uses=999;inputs=<[trade_info].get[input]>[quantity=<[trade_info].get[input_cost]>]]]>
- opentrades players:<[player]> <[trades]>
Any ideas?
