nahkd123/stonks

Question: Product with custom name/components

BrewDawg12 opened this issue · 3 comments

I want to add it so you can sell and buy a named product

Edit: My guess is that I need to edit the stonks give command ,but don't know how with the file being binary

When adding item to config file, you can use components with the format that is the same as /give command. For example: stick[item_name={"text":"Advanced stick"}] (or something else I don't remember).

So to add new product with custom name, you would add something like this under the category:

product product_id
    name Display name in menu
    construction item minecraft:stick[item_name={"text":"Advanced stick"}]

Further info can be found in https://nahkd123.github.io/stonks/References/Adapters/ItemsAdapter/. For adding products, refer to https://nahkd123.github.io/stonks/References/Services/IntegratedStonksService/.

Also the Stonks' give command can be used to obtain the product that was defined in config (or provided from remote service, assuming you have another mod adding remote service to Stonks). It was originally meant for troubleshooting.

If you managed to fix your issue, don't forget to close this, or if you have issue configuring the market, don't hesitate to ask here.