Farming for Blockheads

Farming for Blockheads

76M Downloads

Unable to add a category/tab in the Market?

Dragon911XX opened this issue ยท 8 comments

commented

I'm using the market to add some tradable items in the game. I'm using the DataPack.json as an example and building from there. However, it seems like it isn't doing anything.

I copied and pasted the text from the DataPack.json to a Custom.json file. Nothing shows up in game. There isn't any stick or oak wood for sale at all. It doesn't seem to make it's own new category "Wooden Stuff" like it indicates in the text either.

I've googled and looked around for more info or a guide, and can't seem to find any documentation on how to go about building this json file.

I'd also like to add in specific items that have multiple item types for item name/number. For example, Quark has the colored runes (quark:rune), and avaritia has a lot of their items (avaritia:resource). There's usually an NBT item number differentiating them like #111/1, #111/2, etc... I'd also like to include Quark's ancient tomes, which are just (quark:ancient_tome).

EDIT: Maybe there could be a way to use an ingame GUI to modify the market? have a tab on the right with a '+' symbol to add additional categories. Then put the specified item in (stack or single) for the bought item, and the same thing for the purchase price.

commented

I've been struggling with adding custom categories/tabs also, either via the MarketRegistry.json file or a custom datapack file in \data\farmingforblockheads\farmingforblockheads_compat\. Adding custom items with either method works all day long, but they end up appearing in the default categories instead of the specified custom ones. Can you take a look at these example configs and let me know if my syntax is wrong?

To create custom categories (also had this config in MarketRegistry.json initially):
https://www.dropbox.com/s/bt3psjet7du5yns/market_custom.json?dl=0
I also originally had a groupOverrides section disabling Vanilla Saplings, Vanilla Seeds, and Bone Meal, but it only ever worked for Bone Meal.

A custom group and a vanilla group I overrode:
https://www.dropbox.com/s/5idhcsdo8mvhryo/ie_seeds.json?dl=0
https://www.dropbox.com/s/4n3nza0tbp6srun/vanilla_saplings.json?dl=0
I also set all default enabled groups to use my custom categories instead of the vanilla ones (even ones where the mod isn't present), but haven't been able to check since I made that change.

Thanks for any help you can provide!

commented

The key for custom categories is a namespaced name (e.g. mydatapack:common_seeds). If no namespace is given, it defaults to "minecraft". So the categories from your example can be referenced either as common_seeds or minecraft:common_seeds, but not as farmingforblockheads:common_seeds.

commented

Okay, I thought something like that might be the problem. I wasn't sure since I was defining them in the FFB namespace folder that they would inherit that namespace.

Could I define the namespace I want, regardless of what namespace the file is sitting in? e.g. my_datapack :

        "my_datapack:exotic_seeds": {
            "name": "Exotic Seeds",
            "icon": {
                "item": "thermal:frost_melon_seeds"
            }
        },

Thanks for responding! I'll test it out soon.

commented

Yup, you should be able to use any namespace for them.

commented

That worked. Thanks!

commented

Version is: FarmingForBlockheads_1.12.2-3.1.28.jar

Placed in [...]\config\FarmingForBlockheads

commented

Data packs have only existed since 1.13, before that custom market configuration was done in the MarketRegistry.json file with a different format.

commented

What version are you on and where did you place the JSON file?