How to Use: Users - TheIllusiveC4/Curios GitHub Wiki

Creating a New Slot Type

Mods should be registering their own slot types, but sometimes you may want to register your own.

Go into your world save's serverconfig folder and open the curios-server.toml file.

You may see something like curiosSettings = []. We don't want that. Your format should be:

[[curiosSettings]]
  identifier = "ring"

The above will basically create a slot type with the ring identifier. Here are all the possible properties:

  • identifier - The unique identifier of the slot type. Please refer to this page for preset slot types that you could utilize if applicable, which will give you automatic localization and icon settings.
  • size - The number of slots to give by default.
  • icon - The location of the resource to use as the icon. The format is "modid:path" with path beginning after textures. If your icon is in textures/item/ then you would only include item/.
  • priority - The numbered priority of the slot type, to determine ordering when applicable. The lower the number, the closer it will be to the top of the GUI.
  • visible - (true or false) Determines if the slot type is visible by default, used by the Curios GUI to determine if the slot should be shown.
  • hasCosmetic - (true or false) Determines if the slot type has cosmetic slots next to the equipment slot.
  • override - (true or false) Determines if these settings should override previous settings instead of merging with them.

If you need to add multiple entries, you can keep adding them like so:

[[curiosSettings]]
  identifier = "ring"
  size = 2
[[curiosSettings]]
  identifier = "charm"
[[curiosSettings]]
  identifier = "necklace"

Language Keys

The default Curio GUI has hovered tooltips that identify the slots using lang file entries. The key format is curios.identifier.<name>. If you are not using one of the common curio identifiers included in Curios, you will likely want to make sure that you create a resource pack with the appropriate language key entry in order to format the tooltip correctly.

Marking Items with Curio Types

Curio item classification relies on the vanilla tag system, customizable by users with data packs. Read more about tags here and data packs here. Make sure you are using item tags, and not block tags or any others. In addition, make sure you use the curios namespace. So your file's path will look like data/curios/tags/items. The tag itself must be the same as the identifier of the curio type you want to classify it to. For instance, ring.json if the identifier is ring. Also, be sure that your tag file is all lowercased otherwise it may not be read accurately.

Guided Walkthrough

Let's go through the process step-by-step in order to understand how to make a new Curio slot and assign an item to that slot. For this walkthrough, we're going to make an "Eggs" slot and assign the egg item to that slot.

1. Open the config file

Go into the world save's serverconfig folder and open the curios-server.toml file. If you do not have this file, you likely have not entered the world yet so just run it once so that the config can generate. If you need to define these configs before worlds are created, you can instead make a new curios-server.toml file in the defaultconfigs folder of your instance's root folder. The file should look like this:

`curiosSettings = []`

2. Add the identifier for the slot

Think of a unique identifier for your slot, which should represent the types of items that are expected to be in there. In this case, we'll use "eggs". Add a new entry into curiosSettings with that as the identifier, quotes included. And that's pretty much it for making slots, Curios will take care of the rest. The updated config file should look like this now:

[[curiosSettings]]
  identifier = "eggs"

If you want to add multiple, you can keep adding entries like so:

[[curiosSettings]]
  identifier = "eggs"
[[curiosSettings]]
  identifier = "someotherslot"

You can verify that you've successfully added the slot by going into the game and checking your curio slots.

3. Create a data pack

In order to actually use the new slot, we need to assign items to them. For that, since we're not modding anything directly, we'll need to create a data pack. Navigate to the world save in your Minecraft root folder, probably at .minecraft/saves/(world-name) and then navigate to the datapacks folder (or create one if it's not already there). If you're not using any data packs, this folder will be empty. Create a new folder for your data pack, call it anything you want. Then go into that folder, so you should be in .minecraft/saves/(world-name)/datapacks/(datapack-name).

Once you're inside, create a pack.mcmeta file, named exactly like that. Open the file and fill it with this:

{
  "pack": {
    "pack_format": 4,
    "description": "put a description here, or not"
  }
}

Once you're done, save it. You should be back at the data pack's root folder at .minecraft/saves/(world-name)/datapacks/(datapack-name). Now we're going to build out a few nested folders. Create a new folder in here named data, then another folder in data called curios, then another folder in curios called tags, then another in tags called items.

By this point, you should be in the .minecraft/saves/(world-name)/datapacks/(datapack-name)/data/curios/tags/items folder. That's it for the folder structure.

4. Create a tag file.

Now create a new file here called (your-slot-name-here).json. In our eggs slot example, we would name it eggs.json. It's very important that the name matches the name you chose in step 2.

In this file, type this:

{
  "replace": "false",
  "values": []
}

This is the basic structure for a tag file. replace dictates whether or not you're just adding tags or completely overriding tags. I recommend leaving this at false unless you know what you're doing. values is the property we're most interested in. This is where you list alllll of the items that you want to be able to accept into your curio slot. In our example, we'd like to put eggs in the slot. Therefore, we find the registry name of the item, which is minecraft:egg for the egg item, and we type it into the values array. Like so:

{
  "replace": "false",
  "values": ["minecraft:egg"]
}

Remember, like in step 2, we can put as many values as we want here but they must all be comma separated inside of the brackets. Like so:

{
  "replace": "false",
  "values": ["minecraft:egg", "minecraft:someotheritem"]
}

If you do not know the registry name of the item you want to add, you can see it in-game by using F3+H to activate advanced tooltips and hovering over the item.

You can verify that you've added the item in properly by looking at the item's tooltip because all curio items will have a golden orange tooltip that states their curio type(s).

And that's it! If you've reached this point, you now have a new curio slot and a new item that can go into that slot. If you have any questions or need help troubleshooting, please feel free to contact the developer directly.

⚠️ **GitHub.com Fallback** ⚠️