Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Product with custom name/components #54

Open
BrewDawg12 opened this issue Jun 7, 2024 · 3 comments
Open

Question: Product with custom name/components #54

BrewDawg12 opened this issue Jun 7, 2024 · 3 comments

Comments

@BrewDawg12
Copy link

BrewDawg12 commented Jun 7, 2024

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

@nahkd123
Copy link
Owner

nahkd123 commented Jun 7, 2024

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/.

@nahkd123 nahkd123 changed the title Named Product Question: Product with custom name/components Jun 7, 2024
@nahkd123
Copy link
Owner

nahkd123 commented Jun 7, 2024

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.

@nahkd123
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants