diff --git a/1.18.x.html b/1.18.x.html index 8801b29..8a7e80c 100644 --- a/1.18.x.html +++ b/1.18.x.html @@ -4,13 +4,13 @@ Overview | Illusive Soulworks - +
Skip to main content
Version: 1.18.x

Overview

WIP! Check back later for updates.

- + \ No newline at end of file diff --git a/1.18.x/category/champions.html b/1.18.x/category/champions.html index d2b878c..dadf358 100644 --- a/1.18.x/category/champions.html +++ b/1.18.x/category/champions.html @@ -4,13 +4,13 @@ Champions | Illusive Soulworks - +
Skip to main content
- + \ No newline at end of file diff --git a/1.18.x/category/mod-integrations.html b/1.18.x/category/mod-integrations.html index a101382..c6aa8bb 100644 --- a/1.18.x/category/mod-integrations.html +++ b/1.18.x/category/mod-integrations.html @@ -4,13 +4,13 @@ Mod Integrations | Illusive Soulworks - +
Skip to main content
- + \ No newline at end of file diff --git a/1.18.x/champions/commands.html b/1.18.x/champions/commands.html index 6010259..2ac1249 100644 --- a/1.18.x/champions/commands.html +++ b/1.18.x/champions/commands.html @@ -4,13 +4,13 @@ Commands | Illusive Soulworks - +
Skip to main content
Version: 1.18.x

Commands

All the Champions commands are available through /champions.

Command Guide

SyntaxMeaning
plain textEnter this literally, exactly as shown.
<argumentsName>An argument that should be replaced with an appropriate value.
[entry]This entry is optional.

Syntax


There are three instructions for /champion which are summon, egg, and summonpos.

  • summon <entity> [<tier>] [<affix>]
    • Summons a champion entity.
  • egg <entity> [<tier>] [<affix>]
    • Gives the command sender a spawn egg that spawns a champion entity.
  • summonpos <pos> <entity> [<tier>] [<affix>]
    • Summons a champion entity at a location.

In order to summon a champion with NBT tags, use /summon in combination with the Champions NBT tags.

Arguments


  • <entity>: entity_summon

    • Specifies the entity to be summoned.
    • Must be an ID of a summonable entity type.
  • <tier>: int

    • Specifies the champion tier of the entity to be summoned.
    • Must be a valid tier from a rank as specified in the champions-rank.toml configuration file.
  • <affix>: [affix_identifier]

    • Specifies an affix to attach to the entity to be summoned.
    • Must be an identifier of a registered [affix].
    • Multiple space-delimited affixes can be specified.
  • <pos>: vec3

    • Specifies the position to summon the entity. If not specified, defaults to the position of the command's execution.
    • Must be a three-dimensional coordinates with floating-point number elements. Accepts tilde and caret notations.

Examples


  • To summon a tier 3 champion spider entity with the Enkindling affix:
    • champion summon spider 3 enkindling
  • To give a spawn egg that summons a tier 2 champion skeleton entity with random affixes:
    • champion egg skeleton 2
  • To summon a tier 1 champion zombie entity with random affixes 10 blocks west of the current position of the executing sender:
    • champion summonpos ~-10 ~ ~ zombie 1
- + \ No newline at end of file diff --git a/1.18.x/champions/integration/gamestages.html b/1.18.x/champions/integration/gamestages.html index a361664..e3340dd 100644 --- a/1.18.x/champions/integration/gamestages.html +++ b/1.18.x/champions/integration/gamestages.html @@ -4,14 +4,14 @@ Game Stages | Illusive Soulworks - +
Skip to main content
Version: 1.18.x

Game Stages

Champions supports staging champions and ranks using the Game Stages mod.

This allows users and modpack developers to gate certain entities from becoming champions or champions from achieving certain ranks until the configured stage has been unlocked by a nearby player.

A nearby player is considered to be any player within 256 blocks of the entity.

Configuration

Staging configuration can be modified through the champions-gamestages.toml configuration file located in the world folder's or the saves/<World Name> folder's serverconfig folder.

info

The configuration file will only generate if Champions detects Game Stages during mod loading. The configuration file will not be present until the two mods have been loaded together.

Entity Stages

Entity stages can be used to gate specific entities from becoming champions until a nearby player has unlocked the required stages.

By default, the configuration is empty.

#A list of entity stages in the format: "stage;modid:entity" or "stage;modid:entity;modid:dimension"
#Example: "test_stage;minecraft:zombie" or "test_stage;minecraft:spider;minecraft:the_nether"
entityStages = []

Syntax

There are two different formats:

  • stage;entity
    • The specified entity will not become a champion unless a nearby player has unlocked the specified stage.
  • stage;entity;dimension
    • The specified entity in the specified dimension will not become a champion unless a nearby player has unlocked the specified stage.

Examples

entityStages = ["first_stage;minecraft:spider"]

A spider cannot become a champion unless a nearby player has the first_stage stage unlocked.

entityStages = ["first_stage;minecraft:spider", "second_stage;minecraft:ghast;minecraft:the_nether"]

The same as the previous example except with the addition that a ghast cannot become a champion in the Nether unless a nearby player has the second_stage stage unlocked.

Tier Stages

Tier stages can be used to gate champions from becoming a specific rank until a nearby player has unlocked the required stages.

By default, the configuration is empty.

#A list of tier stages in the format: "stage;tier" or "stage;tier;modid:dimension"
#Example: "test_stage;2" or "test_stage;3;minecraft:the_nether"
tierStages = []

Syntax

There are two different formats:

  • stage;tier
    • Champions will not become the rank of the specified tier unless a nearby player has unlocked the specified stage.
  • stage;tier;dimension
    • Champions in the specified dimension will not become the rank of the specified tier unless a nearby player has unlocked the specified stage.

Examples

tierStages = ["first_stage;2"]

Champions cannot become ranks of tier 2 or above unless a nearby player has the first_stage stage unlocked.

tierStages = ["first_stage;2", "second_stage;3;minecraft:the_nether"]

The same as the previous example except with the addition that champions in the Nether cannot become ranks of tier 3 or above unless a nearby player has the second_stage unlocked.

Arguments

  • stage: basic_string

    • Specifies the name of the stage required for this entry.
  • entity: entity_summon

    • Specifies the entity to be summoned.
    • Must be a ID of a entity type.
  • tier: int

    • Specifies the champion tier of the entity.
    • Must be a valid tier from a rank as specified in the champions-rank.toml configuration file.
  • dimension: dimension

    • Specifies the dimension of the entity.
    • Must be a ID for a registered dimension.
note

Specifying multiple stages for a specific tier or entity will require any nearby player to have all of those stages before the requirements are met.

- + \ No newline at end of file diff --git a/1.18.x/champions/integration/scalinghealth.html b/1.18.x/champions/integration/scalinghealth.html index 374e492..da05337 100644 --- a/1.18.x/champions/integration/scalinghealth.html +++ b/1.18.x/champions/integration/scalinghealth.html @@ -4,13 +4,13 @@ Scaling Health | Illusive Soulworks - +
Skip to main content
Version: 1.18.x

Scaling Health

Champions supports increasing champion spawn chances when using the Scaling Health mod.

This allows users and modpack developers to scale champion spawn chances with the difficulty of the region, working with the difficulty scaling configurations in the Scaling Health mod.

Spawn Modifiers

Scaling Health spawn modifiers can be modified through the champions-server.toml configuration file located in the world folder's or the saves/<World Name> folder's serverconfig folder.

#Scaling Health
#List of tiers with numbers to multiply spawn rates by difficulty
#Format: [tier];[percent increase]
scalingHealthSpawnModifiers = []

Syntax

tier;modifier

The modifier will be multiplied by the difficulty rating from Scaling Health and then added directly to the spawn chance for the tier as defined by the champions-ranks.toml configuration file.

Arguments

  • tier: int
    • Specifies the champion tier of the entity.
    • Must be a valid tier from a rank as specified in the champions-rank.toml configuration file.
  • modifier: float
    • Specifies modifier for the spawn chance increase.

Examples

scalingHealthSpawnModifiers = ["1;0.005"]

If the difficulty rating from Scaling Health is 100 and the default spawn chance for a tier 1 champion is 0.2 (or 20%), then the final spawn chance is 0.7 (or 70%):

(difficulty * modifier) + chance = result
(100 * 0.005) + 0.2 = 0.7
tip

Careful consideration will need to be made when selecting modifier values. Be sure to run calculations for each modifier against expected difficulty ratings to ensure the spawn chances do not increase further than intended.

- + \ No newline at end of file diff --git a/1.18.x/champions/loottable.html b/1.18.x/champions/loottable.html index e4a819e..44ca83f 100644 --- a/1.18.x/champions/loottable.html +++ b/1.18.x/champions/loottable.html @@ -4,7 +4,7 @@ Loot | Illusive Soulworks - + @@ -15,7 +15,7 @@ first for an introduction.

Default Loot Table


By default, Champions provides the following loot table:

champion_loot.json
{
"pools": [
{
"name": "tier#1",
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:book",
"weight": 1,
"conditions": [
{
"condition": "champions:champion_properties",
"entity": "this"
},
{
"condition": "killed_by_player"
}
],
"functions": [
{
"function": "enchant_randomly"
}
]
}
]
},
{
"name": "tier#2",
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:book",
"weight": 1,
"conditions": [
{
"condition": "champions:champion_properties",
"entity": "this",
"tier": {
"min": 2
}
},
{
"condition": "killed_by_player"
}
],
"functions": [
{
"function": "enchant_randomly"
}
]
}
]
},
{
"name": "tier#3",
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:book",
"weight": 1,
"conditions": [
{
"condition": "champions:champion_properties",
"entity": "this",
"tier": {
"min": 3
}
},
{
"condition": "killed_by_player"
}
],
"functions": [
{
"function": "enchant_randomly"
}
]
}
]
},
{
"name": "tier#4",
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:book",
"weight": 1,
"conditions": [
{
"condition": "champions:champion_properties",
"entity": "this",
"tier": {
"min": 4
}
},
{
"condition": "killed_by_player"
}
],
"functions": [
{
"function": "enchant_randomly"
}
]
}
]
}
]
}

The result is that killing a champion drops a book with a random enchantment, dropping an additional book for each higher rank.

Loot Condition


In order to specify loot drops for champions, Champions provides a new loot condition: "champions:champion_properties".

With this, loot tables can provide conditions for loot drops and specify various properties from Champions such as champion rank or affixes that need to be present.

The condition can be added as part of a loot entry's "conditions" array:

"conditions": [
{
"condition": "champions:champion_properties",
"entity": "this"
}
]

The condition, without any other parameters, will pass for any champion entity.

Fields

With additional fields, conditions can be further narrowed down depending on the specific rank or affixes on the champion entity.

tip

The entity field is the same as the one used for vanilla loot contexts. For further information, please refer to the "entity" section of this page.

Examples


A condition that will pass if the champion entity is tier 3 or above:

"conditions": [
{
"condition": "champions:champion_properties",
"entity": "this",
"tier": {
"min": 3
}
}
]

A condition that will pass if the champion entity is tier 2 and has either the Enkindling affix or the Hasty affix:

"conditions": [
{
"condition": "champions:champion_properties",
"entity": "this",
"tier": 2,
"affixes": ["enkindling", "hasty"]
}
]

A condition that will pass if the champion entity is between tier 1 and 3, and has the Arctic affix, and has at least 3 total affixes:

"conditions": [
{
"condition": "champions:champion_properties",
"entity": "this",
"tier": {
"min": 1,
"max": 3
},
"affixes": {
"values": ["arctic"],
"count": {
"min": 3
}
}
}
]
- + \ No newline at end of file diff --git a/1.18.x/champions/nbt.html b/1.18.x/champions/nbt.html index 32d6b86..347857e 100644 --- a/1.18.x/champions/nbt.html +++ b/1.18.x/champions/nbt.html @@ -4,13 +4,13 @@ NBT Tags | Illusive Soulworks - +
Skip to main content
Version: 1.18.x

NBT Tags

As an alternative to the convenient but limited summoning methods outlined in Commands, Champions provides a way to specify rank and affix data directly through NBT tags.

Upon spawning, the Champions data from the NBT tags will be read, applied, and then removed.

NBT Structure


  • ForgeData: Serves as the root tag.
    • ChampionsData: Serves as the sub-root tag.
      • tier: The tier of the rank to assign to the champion entity. Can be an integer or an object with the following structure:
        • min: The minimum tier of the rank to assign to the champion entity. Must be equal to or lower than max. If absent, there is no minimum.
        • max: The maximum tier of the rank to assign to the champion entity. Must be equal to or higher than min. If absent, there is no maximum.
      • affixes: The affixes to assign to the champion entity. Can be a list of affix identifiers as strings or an object with the following structure:
        • values: A list of affix identifiers for affixes to assign to the champion entity.
        • count: The total number of affixes to assign to the champion entity. If absent, the default number from the rank configuration will be used.

Examples


  • To summon a tier 3 champion spider entity with the Enkindling affix:

    • summon spider ~ ~ ~ {ForgeData:{ChampionsData:{tier:3,affixes:{values:["enkindling"],count:1}}}}
  • To summon a tier 2 champion skeleton entity with the Hasty affix and 2 random affixes:

    • summon skeleton ~ ~ ~ {ForgeData:{ChampionsData:{tier:2,affixes:{values:["hasty"],count:3}}}}
  • To summon a tier 4 champion zombie entity with random affixes:

    • summon zombie ~ ~ ~ {ForgeData:{ChampionsData:{tier:4}}}
- + \ No newline at end of file diff --git a/404.html b/404.html index 44341ad..a63cc5e 100644 --- a/404.html +++ b/404.html @@ -4,13 +4,13 @@ Page Not Found | Illusive Soulworks - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/assets/js/78280e3d.41283955.js b/assets/js/78280e3d.87bf8ea5.js similarity index 58% rename from assets/js/78280e3d.41283955.js rename to assets/js/78280e3d.87bf8ea5.js index 9375a72..28bdbb5 100644 --- a/assets/js/78280e3d.41283955.js +++ b/assets/js/78280e3d.87bf8ea5.js @@ -1 +1 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[143],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),c=p(n),m=i,f=c["".concat(s,".").concat(m)]||c[m]||u[m]||a;return n?r.createElement(f,o(o({ref:t},d),{},{components:n})):r.createElement(f,o({ref:t},d))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:i,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var r=n(7462),i=(n(7294),n(3905));const a={sidebar_position:3},o="Adding Slot Types to Entities",l={unversionedId:"curios/entity-register",id:"curios/entity-register",title:"Adding Slot Types to Entities",description:"A tutorial on how to add registered slot types to entities.",source:"@site/docs/curios/entity-register.md",sourceDirName:"curios",slug:"/curios/entity-register",permalink:"/curios/entity-register",draft:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/entity-register.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Registering Slot Types",permalink:"/curios/slot-register"},next:{title:"Adding Custom Slot Textures",permalink:"/curios/slot-textures"}},s={},p=[{value:"Overview",id:"overview",level:2},{value:"Directory",id:"directory",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Example",id:"example",level:2}],d={toc:p},c="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(c,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"adding-slot-types-to-entities"},"Adding Slot Types to Entities"),(0,i.kt)("p",null,"A tutorial on how to add registered slot types to entities."),(0,i.kt)("h2",{id:"overview"},"Overview"),(0,i.kt)("hr",null),(0,i.kt)("p",null,"Beginning in 1.20, the recommended way to add a registered slot type to an entity is through a datapack. If you are\nunfamiliar with datapacks, it is recommended to read through the ",(0,i.kt)("a",{parentName:"p",href:"https://minecraft.fandom.com/wiki/Data_pack"},"wiki page"),"\nin order to understand the concept and structure before proceeding to the rest of this page."),(0,i.kt)("h2",{id:"directory"},"Directory"),(0,i.kt)("hr",null),(0,i.kt)("p",null,"The file should be a ",(0,i.kt)("inlineCode",{parentName:"p"},".json")," file located in the ",(0,i.kt)("inlineCode",{parentName:"p"},"~/data/(namespace)/curios/entities/")," folder of the datapack."),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"The file can be named anything."),(0,i.kt)("p",{parentName:"admonition"},"The ",(0,i.kt)("inlineCode",{parentName:"p"},"(namespace)")," field should be replaced by the namespace chosen for this portion of the datapack. If this is a part\nof a mod, the namespace is usually the mod ID. If this is part of a user-defined datapack, then the namespace can be\nanything that is lowercased with no special characters.")),(0,i.kt)("h2",{id:"syntax"},"Syntax"),(0,i.kt)("hr",null),(0,i.kt)("p",null,"The structure of the ",(0,i.kt)("inlineCode",{parentName:"p"},".json")," file for the entity configuration consists of a top-level JSON object that holds two\npotential fields."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"entities"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"An array of registry names of entity types or entity type tags."))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"slots"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"An array of ",(0,i.kt)("inlineCode",{parentName:"li"},"identifier")," names for registered slot types.")))),(0,i.kt)("p",null,"All the listed slots will be associated to all the listed entities."),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Adding multiple of the same ",(0,i.kt)("inlineCode",{parentName:"p"},"identifier")," to the ",(0,i.kt)("inlineCode",{parentName:"p"},"slots")," array will ",(0,i.kt)("strong",{parentName:"p"},"not")," add multiple slots. Each entry in the ",(0,i.kt)("inlineCode",{parentName:"p"},"slots"),"\narray represents a ",(0,i.kt)("a",{parentName:"p",href:"/curios/slot-register"},"registered slot type")," and the entries do not stack, please refer to that page in\norder to change slot type behavior including default size.")),(0,i.kt)("h2",{id:"example"},"Example"),(0,i.kt)("hr",null),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "entities": ["player", "minecraft:zombie"],\n "slots": ["head", "back"]\n}\n')),(0,i.kt)("p",null,"This configuration will give two slot types, ",(0,i.kt)("inlineCode",{parentName:"p"},"head")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"back"),", to all players and all zombies."))}u.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[143],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),c=p(n),m=i,f=c["".concat(s,".").concat(m)]||c[m]||u[m]||a;return n?r.createElement(f,o(o({ref:t},d),{},{components:n})):r.createElement(f,o({ref:t},d))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:i,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var r=n(7462),i=(n(7294),n(3905));const a={sidebar_position:3},o="Adding Slot Types to Entities",l={unversionedId:"curios/entity-register",id:"curios/entity-register",title:"Adding Slot Types to Entities",description:"A tutorial on how to add registered slot types to entities.",source:"@site/docs/curios/entity-register.md",sourceDirName:"curios",slug:"/curios/entity-register",permalink:"/curios/entity-register",draft:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/entity-register.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Registering Slot Types",permalink:"/curios/slot-register"},next:{title:"Adding Custom Slot Textures",permalink:"/curios/slot-textures"}},s={},p=[{value:"Overview",id:"overview",level:2},{value:"Directory",id:"directory",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Example",id:"example",level:2}],d={toc:p},c="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(c,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"adding-slot-types-to-entities"},"Adding Slot Types to Entities"),(0,i.kt)("p",null,"A tutorial on how to add registered slot types to entities."),(0,i.kt)("h2",{id:"overview"},"Overview"),(0,i.kt)("hr",null),(0,i.kt)("p",null,"Beginning in 1.20, the recommended way to add a registered slot type to an entity is through a datapack. If you are\nunfamiliar with datapacks, it is recommended to read through the ",(0,i.kt)("a",{parentName:"p",href:"https://minecraft.fandom.com/wiki/Data_pack"},"wiki page"),"\nin order to understand the concept and structure before proceeding to the rest of this page."),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/curios/slot-register"},"Registered slot types")," will all be available for use but will not appear in-game until they are\nadded to one or more entities."),(0,i.kt)("h2",{id:"directory"},"Directory"),(0,i.kt)("hr",null),(0,i.kt)("p",null,"The file should be a ",(0,i.kt)("inlineCode",{parentName:"p"},".json")," file located in the ",(0,i.kt)("inlineCode",{parentName:"p"},"~/data/(namespace)/curios/entities/")," folder of the datapack."),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"The file can be named anything."),(0,i.kt)("p",{parentName:"admonition"},"The ",(0,i.kt)("inlineCode",{parentName:"p"},"(namespace)")," field should be replaced by the namespace chosen for this portion of the datapack. If this is a part\nof a mod, the namespace is usually the mod ID. If this is part of a user-defined datapack, then the namespace can be\nanything that is lowercased with no special characters.")),(0,i.kt)("h2",{id:"syntax"},"Syntax"),(0,i.kt)("hr",null),(0,i.kt)("p",null,"The structure of the ",(0,i.kt)("inlineCode",{parentName:"p"},".json")," file for the entity configuration consists of a top-level JSON object that holds two\npotential fields."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"entities"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"An array of registry names of entity types or entity type tags."))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"slots"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"An array of ",(0,i.kt)("inlineCode",{parentName:"li"},"identifier")," names for registered slot types.")))),(0,i.kt)("p",null,"All the listed slots will be associated to all the listed entities."),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Adding multiple of the same ",(0,i.kt)("inlineCode",{parentName:"p"},"identifier")," to the ",(0,i.kt)("inlineCode",{parentName:"p"},"slots")," array will ",(0,i.kt)("strong",{parentName:"p"},"not")," add multiple slots. Each entry in the ",(0,i.kt)("inlineCode",{parentName:"p"},"slots"),"\narray represents a ",(0,i.kt)("a",{parentName:"p",href:"/curios/slot-register"},"registered slot type")," and the entries do not stack, please refer to that page in\norder to change slot type behavior including default size.")),(0,i.kt)("h2",{id:"example"},"Example"),(0,i.kt)("hr",null),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "entities": ["player", "minecraft:zombie"],\n "slots": ["head", "back"]\n}\n')),(0,i.kt)("p",null,"This configuration will give two slot types, ",(0,i.kt)("inlineCode",{parentName:"p"},"head")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"back"),", to all players and all zombies."))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ef6cb8ea.13ac1b9b.js b/assets/js/ef6cb8ea.13ac1b9b.js new file mode 100644 index 0000000..962e0e8 --- /dev/null +++ b/assets/js/ef6cb8ea.13ac1b9b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[969],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>k});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),d=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=d(e.components);return a.createElement(s.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),m=d(n),c=r,k=m["".concat(s,".").concat(c)]||m[c]||u[c]||i;return n?a.createElement(k,l(l({ref:t},p),{},{components:n})):a.createElement(k,l({ref:t},p))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=c;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[m]="string"==typeof e?e:r,l[1]=o;for(var d=2;d{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var a=n(7462),r=(n(7294),n(3905));const i={sidebar_position:1},l="Registering Slot Types",o={unversionedId:"curios/slot-register",id:"curios/slot-register",title:"Registering Slot Types",description:"A tutorial on how to register slot types that are recognized by Curios.",source:"@site/docs/curios/slot-register.md",sourceDirName:"curios",slug:"/curios/slot-register",permalink:"/curios/slot-register",draft:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slot-register.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Curios",permalink:"/category/curios"},next:{title:"Adding Slot Types to Entities",permalink:"/curios/entity-register"}},s={},d=[{value:"Overview",id:"overview",level:2},{value:"Directory",id:"directory",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Example",id:"example",level:2},{value:"Modifying a Slot Type",id:"modifying-a-slot-type",level:2},{value:"Example",id:"example-1",level:3}],p={toc:d},m="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"registering-slot-types"},"Registering Slot Types"),(0,r.kt)("p",null,"A tutorial on how to register slot types that are recognized by Curios."),(0,r.kt)("h2",{id:"overview"},"Overview"),(0,r.kt)("hr",null),(0,r.kt)("p",null,"Beginning in 1.20, the recommended way to register a slot type is through a datapack. If you are unfamiliar with\ndatapacks, it is recommended to read through the ",(0,r.kt)("a",{parentName:"p",href:"https://minecraft.fandom.com/wiki/Data_pack"},"wiki page")," in order to\nunderstand the concept and structure before proceeding to the rest of this page."),(0,r.kt)("p",null,"If using one of the ",(0,r.kt)("a",{parentName:"p",href:"./preset-slots"},"Preset Slot Types"),", this step can be skipped since Curios natively provides the\nneeded datapack registration."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("strong",{parentName:"p"},"Why are my registered slot types not appearing?")),(0,r.kt)("p",{parentName:"admonition"},"Registering slot types makes them available for use; however, they are ",(0,r.kt)("em",{parentName:"p"},"not")," added to any entities (including players)\nby default. In order to add them to an entity, please refer to ",(0,r.kt)("a",{parentName:"p",href:"/curios/entity-register"},"the next step")," on adding slot\ntypes to entities.")),(0,r.kt)("h2",{id:"directory"},"Directory"),(0,r.kt)("hr",null),(0,r.kt)("p",null,"The file should be a ",(0,r.kt)("inlineCode",{parentName:"p"},".json")," file with the ",(0,r.kt)("inlineCode",{parentName:"p"},"identifier")," for the slot type to be registered as the name. This file\nshould be located in the ",(0,r.kt)("inlineCode",{parentName:"p"},"~/data/(namespace)/curios/slots/")," folder of the datapack."),(0,r.kt)("p",null,"Example: Registering a ",(0,r.kt)("inlineCode",{parentName:"p"},"head")," slot type requires creating a ",(0,r.kt)("inlineCode",{parentName:"p"},"head.json")," file located in ",(0,r.kt)("inlineCode",{parentName:"p"},"~/data/(namespace)/curios/slots/"),"\nso the final path should look like ",(0,r.kt)("inlineCode",{parentName:"p"},"~/data/(namespace)/curios/slots/head.json"),"."),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"The ",(0,r.kt)("inlineCode",{parentName:"p"},"(namespace)")," field should be replaced by the namespace chosen for this portion of the datapack. If this is a part\nof a mod, the namespace is usually the mod ID. If this is part of a user-defined datapack, then the namespace can be\nanything that is lowercased with no special characters.")),(0,r.kt)("h2",{id:"syntax"},"Syntax"),(0,r.kt)("hr",null),(0,r.kt)("p",null,"The structure of the ",(0,r.kt)("inlineCode",{parentName:"p"},".json")," file for the slot type consists of a top-level JSON object that holds various fields\nrelated to that slot type."),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Field"),(0,r.kt)("th",{parentName:"tr",align:null},"Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Default"),(0,r.kt)("th",{parentName:"tr",align:null},"Required"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Merge Behavior"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"replace")),(0,r.kt)("td",{parentName:"tr",align:null},"boolean"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"When ",(0,r.kt)("inlineCode",{parentName:"td"},"true"),", replaces data from lower-priority datapacks"),(0,r.kt)("td",{parentName:"tr",align:null},"N/A")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"size")),(0,r.kt)("td",{parentName:"tr",align:null},"integer"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"1")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"The number of slots of this slot type to give by default"),(0,r.kt)("td",{parentName:"tr",align:null},"The highest size will be used")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"operation")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"SET"'),"|",(0,r.kt)("inlineCode",{parentName:"td"},'"ADD"'),"|",(0,r.kt)("inlineCode",{parentName:"td"},'"REMOVE"')),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"SET"')),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"Whether to use ",(0,r.kt)("inlineCode",{parentName:"td"},"size")," to set, add, or remove from the total number of slots"),(0,r.kt)("td",{parentName:"tr",align:null},"N/A")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"order")),(0,r.kt)("td",{parentName:"tr",align:null},"integer"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"1000")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"The order the slots will appear in the native Curios GUI, lower numbers appear higher"),(0,r.kt)("td",{parentName:"tr",align:null},"The lowest order will be used")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"icon")),(0,r.kt)("td",{parentName:"tr",align:null},"string"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"curios:slot/empty_curios_slot")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"The location of the icon to use for the slot type"),(0,r.kt)("td",{parentName:"tr",align:null},"The last icon will be used")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"add_cosmetic")),(0,r.kt)("td",{parentName:"tr",align:null},"boolean"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"When ",(0,r.kt)("inlineCode",{parentName:"td"},"true"),", adds a cosmetic slot next to the original that does not provide function but still renders its contents"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"true")," if any add a cosmetic slot")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"use_native_gui")),(0,r.kt)("td",{parentName:"tr",align:null},"boolean"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"true")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"When ",(0,r.kt)("inlineCode",{parentName:"td"},"false"),", does not add the slot type to the native Curios GUI"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")," if any do not use the native GUI")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"render_toggle")),(0,r.kt)("td",{parentName:"tr",align:null},"boolean"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"true")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"When ",(0,r.kt)("inlineCode",{parentName:"td"},"false"),", does not allow the slot type to toggle its rendering"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")," if any do not allow render toggling")))),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("strong",{parentName:"p"},"Which ",(0,r.kt)("inlineCode",{parentName:"strong"},"operation")," value should I use?")),(0,r.kt)("p",{parentName:"admonition"},"In most cases, ",(0,r.kt)("inlineCode",{parentName:"p"},'"SET"')," (also the default if no value is defined) will accomplish the desired result. It denotes that a\nslot type should have a certain amount of slots by default, with the highest value among all consumers being used.\n",(0,r.kt)("inlineCode",{parentName:"p"},'"ADD"'),"and ",(0,r.kt)("inlineCode",{parentName:"p"},'"REMOVE"')," are inherent slot modifiers and are based on the amount of slots specified by all ",(0,r.kt)("inlineCode",{parentName:"p"},'"SET"'),"\noperations, the result of which can change based on the mods/datapacks loaded.")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("hr",null),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json"},'{\n "order": 20,\n "size": 4,\n "icon": "curios:slot/empty_custom_slot",\n "add_cosmetic": true\n}\n')),(0,r.kt)("p",null,"This slot type will have a relatively low order of 20, which will make it appear higher than most slots. It also has\nsize of 4 which means that it will register 4 slots to any given entity by default. For the GUI, it uses an icon\nlocated at ",(0,r.kt)("inlineCode",{parentName:"p"},"curios:slot/empty_custom_slot"),". It also has added a cosmetic slot so there will be an additional slot for\ncosmetic items next to it in the Curios GUI."),(0,r.kt)("h2",{id:"modifying-a-slot-type"},"Modifying a Slot Type"),(0,r.kt)("hr",null),(0,r.kt)("p",null,"The process of modifying a slot type is identical to registering a new slot type, except using the same ",(0,r.kt)("inlineCode",{parentName:"p"},"identifier")," as\nthe existing slot type. All slot types that share an ",(0,r.kt)("inlineCode",{parentName:"p"},"identifier")," will be merged according to the ",(0,r.kt)("strong",{parentName:"p"},"Merge Behavior")," of\neach field as outlined above."),(0,r.kt)("h3",{id:"example-1"},"Example"),(0,r.kt)("p",null,"Curios natively provides data for the ",(0,r.kt)("inlineCode",{parentName:"p"},"ring")," slot, which defaults the size to 1. In order to increase the size to 2,\ncreate a ",(0,r.kt)("inlineCode",{parentName:"p"},"ring.json")," slot registration file in the datapack with the contents:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json"},'{\n "size": 2\n}\n')),(0,r.kt)("p",null,"This will merge the size data of this registration with the existing registration provided by Curios, keeping all of the\nother data intact while increasing the number of slots to 2."))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ef6cb8ea.2dec9c87.js b/assets/js/ef6cb8ea.2dec9c87.js deleted file mode 100644 index 8c09317..0000000 --- a/assets/js/ef6cb8ea.2dec9c87.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[969],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>k});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),d=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=d(e.components);return a.createElement(s.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),m=d(n),c=r,k=m["".concat(s,".").concat(c)]||m[c]||u[c]||i;return n?a.createElement(k,l(l({ref:t},p),{},{components:n})):a.createElement(k,l({ref:t},p))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=c;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[m]="string"==typeof e?e:r,l[1]=o;for(var d=2;d{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var a=n(7462),r=(n(7294),n(3905));const i={sidebar_position:1},l="Registering Slot Types",o={unversionedId:"curios/slot-register",id:"curios/slot-register",title:"Registering Slot Types",description:"A tutorial on how to register slot types that are recognized by Curios.",source:"@site/docs/curios/slot-register.md",sourceDirName:"curios",slug:"/curios/slot-register",permalink:"/curios/slot-register",draft:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slot-register.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Curios",permalink:"/category/curios"},next:{title:"Adding Slot Types to Entities",permalink:"/curios/entity-register"}},s={},d=[{value:"Overview",id:"overview",level:2},{value:"Directory",id:"directory",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Example",id:"example",level:2},{value:"Modifying a Slot Type",id:"modifying-a-slot-type",level:2},{value:"Example",id:"example-1",level:3}],p={toc:d},m="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"registering-slot-types"},"Registering Slot Types"),(0,r.kt)("p",null,"A tutorial on how to register slot types that are recognized by Curios."),(0,r.kt)("h2",{id:"overview"},"Overview"),(0,r.kt)("hr",null),(0,r.kt)("p",null,"Beginning in 1.20, the recommended way to register a slot type is through a datapack. If you are unfamiliar with\ndatapacks, it is recommended to read through the ",(0,r.kt)("a",{parentName:"p",href:"https://minecraft.fandom.com/wiki/Data_pack"},"wiki page")," in order to\nunderstand the concept and structure before proceeding to the rest of this page."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"If using one of the ",(0,r.kt)("a",{parentName:"p",href:"./preset-slots"},"Preset Slot Types"),", this step can be skipped since Curios natively provides the\nneeded datapack registration.")),(0,r.kt)("h2",{id:"directory"},"Directory"),(0,r.kt)("hr",null),(0,r.kt)("p",null,"The file should be a ",(0,r.kt)("inlineCode",{parentName:"p"},".json")," file with the ",(0,r.kt)("inlineCode",{parentName:"p"},"identifier")," for the slot type to be registered as the name. This file\nshould be located in the ",(0,r.kt)("inlineCode",{parentName:"p"},"~/data/(namespace)/curios/slots/")," folder of the datapack."),(0,r.kt)("p",null,"Example: Registering a ",(0,r.kt)("inlineCode",{parentName:"p"},"head")," slot type requires creating a ",(0,r.kt)("inlineCode",{parentName:"p"},"head.json")," file located in ",(0,r.kt)("inlineCode",{parentName:"p"},"~/data/(namespace)/curios/slots/"),"\nso the final path should look like ",(0,r.kt)("inlineCode",{parentName:"p"},"~/data/(namespace)/curios/slots/head.json"),"."),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"The ",(0,r.kt)("inlineCode",{parentName:"p"},"(namespace)")," field should be replaced by the namespace chosen for this portion of the datapack. If this is a part\nof a mod, the namespace is usually the mod ID. If this is part of a user-defined datapack, then the namespace can be\nanything that is lowercased with no special characters.")),(0,r.kt)("h2",{id:"syntax"},"Syntax"),(0,r.kt)("hr",null),(0,r.kt)("p",null,"The structure of the ",(0,r.kt)("inlineCode",{parentName:"p"},".json")," file for the slot type consists of a top-level JSON object that holds various fields\nrelated to that slot type."),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Field"),(0,r.kt)("th",{parentName:"tr",align:null},"Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Default"),(0,r.kt)("th",{parentName:"tr",align:null},"Required"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Merge Behavior"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"replace")),(0,r.kt)("td",{parentName:"tr",align:null},"boolean"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"When ",(0,r.kt)("inlineCode",{parentName:"td"},"true"),", replaces data from lower-priority datapacks"),(0,r.kt)("td",{parentName:"tr",align:null},"N/A")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"size")),(0,r.kt)("td",{parentName:"tr",align:null},"integer"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"1")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"The number of slots of this slot type to give by default"),(0,r.kt)("td",{parentName:"tr",align:null},"The highest size will be used")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"operation")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"SET"'),"|",(0,r.kt)("inlineCode",{parentName:"td"},'"ADD"'),"|",(0,r.kt)("inlineCode",{parentName:"td"},'"REMOVE"')),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"SET"')),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"Whether to use ",(0,r.kt)("inlineCode",{parentName:"td"},"size")," to set, add, or remove from the total number of slots"),(0,r.kt)("td",{parentName:"tr",align:null},"N/A")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"order")),(0,r.kt)("td",{parentName:"tr",align:null},"integer"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"1000")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"The order the slots will appear in the native Curios GUI, lower numbers appear higher"),(0,r.kt)("td",{parentName:"tr",align:null},"The lowest order will be used")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"icon")),(0,r.kt)("td",{parentName:"tr",align:null},"string"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"curios:slot/empty_curios_slot")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"The location of the icon to use for the slot type"),(0,r.kt)("td",{parentName:"tr",align:null},"The last icon will be used")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"add_cosmetic")),(0,r.kt)("td",{parentName:"tr",align:null},"boolean"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"When ",(0,r.kt)("inlineCode",{parentName:"td"},"true"),", adds a cosmetic slot next to the original that does not provide function but still renders its contents"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"true")," if any add a cosmetic slot")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"use_native_gui")),(0,r.kt)("td",{parentName:"tr",align:null},"boolean"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"true")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"When ",(0,r.kt)("inlineCode",{parentName:"td"},"false"),", does not add the slot type to the native Curios GUI"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")," if any do not use the native GUI")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"render_toggle")),(0,r.kt)("td",{parentName:"tr",align:null},"boolean"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"true")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:null},"When ",(0,r.kt)("inlineCode",{parentName:"td"},"false"),", does not allow the slot type to toggle its rendering"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false")," if any do not allow render toggling")))),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("hr",null),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json"},'{\n "order": 20,\n "size": 4,\n "icon": "curios:slot/empty_custom_slot",\n "add_cosmetic": true\n}\n')),(0,r.kt)("p",null,"This slot type will have a relatively low order of 20, which will make it appear higher than most slots. It also has\nsize of 4 which means that it will register 4 slots to any given entity by default. For the GUI, it uses an icon\nlocated at ",(0,r.kt)("inlineCode",{parentName:"p"},"curios:slot/empty_custom_slot"),". It also has added a cosmetic slot so there will be an additional slot for\ncosmetic items next to it in the Curios GUI."),(0,r.kt)("h2",{id:"modifying-a-slot-type"},"Modifying a Slot Type"),(0,r.kt)("hr",null),(0,r.kt)("p",null,"The process of modifying a slot type is identical to registering a new slot type, except using the same ",(0,r.kt)("inlineCode",{parentName:"p"},"identifier")," as\nthe existing slot type. All slot types that share an ",(0,r.kt)("inlineCode",{parentName:"p"},"identifier")," will be merged according to the ",(0,r.kt)("strong",{parentName:"p"},"Merge Behavior")," of\neach field as outlined above."),(0,r.kt)("h3",{id:"example-1"},"Example"),(0,r.kt)("p",null,"Curios natively provides data for the ",(0,r.kt)("inlineCode",{parentName:"p"},"ring")," slot, which defaults the size to 1. In order to increase the size to 2,\ncreate a ",(0,r.kt)("inlineCode",{parentName:"p"},"ring.json")," slot registration file in the datapack with the contents:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json"},'{\n "size": 2\n}\n')),(0,r.kt)("p",null,"This will merge the size data of this registration with the existing registration provided by Curios, keeping all of the\nother data intact while increasing the number of slots to 2."))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.eb4c64da.js b/assets/js/runtime~main.8d7cab44.js similarity index 97% rename from assets/js/runtime~main.eb4c64da.js rename to assets/js/runtime~main.8d7cab44.js index 2de2045..4ddcba6 100644 --- a/assets/js/runtime~main.eb4c64da.js +++ b/assets/js/runtime~main.8d7cab44.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,t,r,o,f={},c={};function n(e){var a=c[e];if(void 0!==a)return a.exports;var t=c[e]={exports:{}};return f[e].call(t.exports,t,t.exports,n),t.exports}n.m=f,e=[],n.O=(a,t,r,o)=>{if(!t){var f=1/0;for(b=0;b=o)&&Object.keys(n.O).every((e=>n.O[e](t[d])))?t.splice(d--,1):(c=!1,o0&&e[b-1][2]>o;b--)e[b]=e[b-1];e[b]=[t,r,o]},n.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return n.d(a,{a:a}),a},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);n.r(o);var f={};a=a||[null,t({}),t([]),t(t)];for(var c=2&r&&e;"object"==typeof c&&!~a.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((a=>f[a]=()=>e[a]));return f.default=()=>e,n.d(o,f),o},n.d=(e,a)=>{for(var t in a)n.o(a,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((a,t)=>(n.f[t](e,a),a)),[])),n.u=e=>"assets/js/"+({53:"935f2afb",58:"93c91ab0",131:"09965537",143:"78280e3d",162:"dcc5fc19",168:"a0145bdd",181:"fa17a3e5",183:"21ef5f27",270:"4c92833a",334:"247783bb",335:"e380917f",368:"99097929",422:"add24532",455:"94fad746",456:"11c2ad6b",495:"96cf4fb7",512:"27236a1a",514:"1be78505",551:"7ffb7c5f",564:"ab811e82",645:"a7434565",670:"514a6b50",671:"0e384e19",677:"8dae1db0",691:"18c10e97",789:"93d27ab8",817:"14eb3368",842:"a54b83c5",904:"d8ef455a",918:"17896441",933:"6c8344a3",969:"ef6cb8ea"}[e]||e)+"."+{53:"87ce142d",58:"dca9feb8",131:"1e11c4d4",143:"41283955",162:"6ebf635f",168:"715ddc6d",181:"3db7bee0",183:"70d488fb",270:"0c72556e",334:"899a41db",335:"23e7a54b",368:"e904a711",422:"9631a695",455:"2595c190",456:"578d8d40",495:"b233a79e",512:"a223f6de",514:"85ddcfd5",551:"ac3a40fb",564:"79ef4d43",645:"82edb565",670:"cdc3572b",671:"15804439",677:"fa59ad0e",691:"747b34df",789:"789c181b",817:"aec23bec",842:"43b6fb4a",904:"50b2ecf1",918:"66705091",933:"6118bfc1",969:"2dec9c87",972:"9e176fde"}[e]+".js",n.miniCssF=e=>{},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r={},o="illusivesoulworks-docs:",n.l=(e,a,t,f)=>{if(r[e])r[e].push(a);else{var c,d;if(void 0!==t)for(var i=document.getElementsByTagName("script"),b=0;b{c.onerror=c.onload=null,clearTimeout(s);var o=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(t))),a)return a(t)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),d&&document.head.appendChild(c)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",n.gca=function(e){return e={17896441:"918",99097929:"368","935f2afb":"53","93c91ab0":"58","09965537":"131","78280e3d":"143",dcc5fc19:"162",a0145bdd:"168",fa17a3e5:"181","21ef5f27":"183","4c92833a":"270","247783bb":"334",e380917f:"335",add24532:"422","94fad746":"455","11c2ad6b":"456","96cf4fb7":"495","27236a1a":"512","1be78505":"514","7ffb7c5f":"551",ab811e82:"564",a7434565:"645","514a6b50":"670","0e384e19":"671","8dae1db0":"677","18c10e97":"691","93d27ab8":"789","14eb3368":"817",a54b83c5:"842",d8ef455a:"904","6c8344a3":"933",ef6cb8ea:"969"}[e]||e,n.p+n.u(e)},(()=>{var e={303:0,532:0};n.f.j=(a,t)=>{var r=n.o(e,a)?e[a]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(303|532)$/.test(a))e[a]=0;else{var o=new Promise(((t,o)=>r=e[a]=[t,o]));t.push(r[2]=o);var f=n.p+n.u(a),c=new Error;n.l(f,(t=>{if(n.o(e,a)&&(0!==(r=e[a])&&(e[a]=void 0),r)){var o=t&&("load"===t.type?"missing":t.type),f=t&&t.target&&t.target.src;c.message="Loading chunk "+a+" failed.\n("+o+": "+f+")",c.name="ChunkLoadError",c.type=o,c.request=f,r[1](c)}}),"chunk-"+a,a)}},n.O.j=a=>0===e[a];var a=(a,t)=>{var r,o,f=t[0],c=t[1],d=t[2],i=0;if(f.some((a=>0!==e[a]))){for(r in c)n.o(c,r)&&(n.m[r]=c[r]);if(d)var b=d(n)}for(a&&a(t);i{"use strict";var e,a,t,r,o,f={},c={};function n(e){var a=c[e];if(void 0!==a)return a.exports;var t=c[e]={exports:{}};return f[e].call(t.exports,t,t.exports,n),t.exports}n.m=f,e=[],n.O=(a,t,r,o)=>{if(!t){var f=1/0;for(b=0;b=o)&&Object.keys(n.O).every((e=>n.O[e](t[d])))?t.splice(d--,1):(c=!1,o0&&e[b-1][2]>o;b--)e[b]=e[b-1];e[b]=[t,r,o]},n.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return n.d(a,{a:a}),a},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);n.r(o);var f={};a=a||[null,t({}),t([]),t(t)];for(var c=2&r&&e;"object"==typeof c&&!~a.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((a=>f[a]=()=>e[a]));return f.default=()=>e,n.d(o,f),o},n.d=(e,a)=>{for(var t in a)n.o(a,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((a,t)=>(n.f[t](e,a),a)),[])),n.u=e=>"assets/js/"+({53:"935f2afb",58:"93c91ab0",131:"09965537",143:"78280e3d",162:"dcc5fc19",168:"a0145bdd",181:"fa17a3e5",183:"21ef5f27",270:"4c92833a",334:"247783bb",335:"e380917f",368:"99097929",422:"add24532",455:"94fad746",456:"11c2ad6b",495:"96cf4fb7",512:"27236a1a",514:"1be78505",551:"7ffb7c5f",564:"ab811e82",645:"a7434565",670:"514a6b50",671:"0e384e19",677:"8dae1db0",691:"18c10e97",789:"93d27ab8",817:"14eb3368",842:"a54b83c5",904:"d8ef455a",918:"17896441",933:"6c8344a3",969:"ef6cb8ea"}[e]||e)+"."+{53:"87ce142d",58:"dca9feb8",131:"1e11c4d4",143:"87bf8ea5",162:"6ebf635f",168:"715ddc6d",181:"3db7bee0",183:"70d488fb",270:"0c72556e",334:"899a41db",335:"23e7a54b",368:"e904a711",422:"9631a695",455:"2595c190",456:"578d8d40",495:"b233a79e",512:"a223f6de",514:"85ddcfd5",551:"ac3a40fb",564:"79ef4d43",645:"82edb565",670:"cdc3572b",671:"15804439",677:"fa59ad0e",691:"747b34df",789:"789c181b",817:"aec23bec",842:"43b6fb4a",904:"50b2ecf1",918:"66705091",933:"6118bfc1",969:"13ac1b9b",972:"9e176fde"}[e]+".js",n.miniCssF=e=>{},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r={},o="illusivesoulworks-docs:",n.l=(e,a,t,f)=>{if(r[e])r[e].push(a);else{var c,d;if(void 0!==t)for(var i=document.getElementsByTagName("script"),b=0;b{c.onerror=c.onload=null,clearTimeout(s);var o=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(t))),a)return a(t)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),d&&document.head.appendChild(c)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",n.gca=function(e){return e={17896441:"918",99097929:"368","935f2afb":"53","93c91ab0":"58","09965537":"131","78280e3d":"143",dcc5fc19:"162",a0145bdd:"168",fa17a3e5:"181","21ef5f27":"183","4c92833a":"270","247783bb":"334",e380917f:"335",add24532:"422","94fad746":"455","11c2ad6b":"456","96cf4fb7":"495","27236a1a":"512","1be78505":"514","7ffb7c5f":"551",ab811e82:"564",a7434565:"645","514a6b50":"670","0e384e19":"671","8dae1db0":"677","18c10e97":"691","93d27ab8":"789","14eb3368":"817",a54b83c5:"842",d8ef455a:"904","6c8344a3":"933",ef6cb8ea:"969"}[e]||e,n.p+n.u(e)},(()=>{var e={303:0,532:0};n.f.j=(a,t)=>{var r=n.o(e,a)?e[a]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(303|532)$/.test(a))e[a]=0;else{var o=new Promise(((t,o)=>r=e[a]=[t,o]));t.push(r[2]=o);var f=n.p+n.u(a),c=new Error;n.l(f,(t=>{if(n.o(e,a)&&(0!==(r=e[a])&&(e[a]=void 0),r)){var o=t&&("load"===t.type?"missing":t.type),f=t&&t.target&&t.target.src;c.message="Loading chunk "+a+" failed.\n("+o+": "+f+")",c.name="ChunkLoadError",c.type=o,c.request=f,r[1](c)}}),"chunk-"+a,a)}},n.O.j=a=>0===e[a];var a=(a,t)=>{var r,o,f=t[0],c=t[1],d=t[2],i=0;if(f.some((a=>0!==e[a]))){for(r in c)n.o(c,r)&&(n.m[r]=c[r]);if(d)var b=d(n)}for(a&&a(t);i Curios | Illusive Soulworks - + - + \ No newline at end of file diff --git a/category/diet.html b/category/diet.html index e6cab92..9aa2480 100644 --- a/category/diet.html +++ b/category/diet.html @@ -4,13 +4,13 @@ Diet | Illusive Soulworks - + - + \ No newline at end of file diff --git a/curios/Developing with Curios/APIs/renderer-interface.html b/curios/Developing with Curios/APIs/renderer-interface.html index a337fef..72ec972 100644 --- a/curios/Developing with Curios/APIs/renderer-interface.html +++ b/curios/Developing with Curios/APIs/renderer-interface.html @@ -4,7 +4,7 @@ ICurioRenderer | Illusive Soulworks - + @@ -18,7 +18,7 @@ implement LivingEntityRenderer or if the model does not have a head inherited from the HumanoidModel class.

Parameters:

NameTypeDescription
livingEntityLivingEntityLivingEntity to align the rotations around
modelPartsModelPart...List of model parts to align to the head movement

static followBodyRotations()


Applies rotations to the given HumanoidModels based on the given LivingEntity and its rotations. This is called to render the model parts in alignment with the entity's movements, such as their leg and arm movements when walking or interacting with objects.

Parameters:

NameTypeDescription
livingEntityLivingEntityLivingEntity to align the rotations around
modelsHumanoidModel...List of model parts to align to the body movement
- + \ No newline at end of file diff --git a/curios/Developing with Curios/curio-creation.html b/curios/Developing with Curios/curio-creation.html index 782e97d..db1f2e7 100644 --- a/curios/Developing with Curios/curio-creation.html +++ b/curios/Developing with Curios/curio-creation.html @@ -4,7 +4,7 @@ Creating a Curio | Illusive Soulworks - + @@ -25,7 +25,7 @@ loading:

@Mod("CurioMod")
public class CurioMod {

public CurioMod() {
final IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();
eventBus.addListener(this::setup);
}

private void setup(final FMLCommonSetupEvent evt) {
CuriosApi.registerCurio(CurioModItems.MY_ITEM, new CurioItem());
}
}

Priority


In situations where multiple implementations are registered to the same item, there a few things to take note of:

  • Only one implementation will be used on any one item, any other implementations found will be ignored.
  • ICurio capabilities initialized through IForgeItem#initCapabilities will always be prioritized and other implementations will be ignored.
  • ICurioItem implementations registered through CuriosApi#registerCurio will be prioritized over ICurioItem implementations directly on the item class.
- + \ No newline at end of file diff --git a/curios/Developing with Curios/getting-started.html b/curios/Developing with Curios/getting-started.html index 8faf21f..d30cd65 100644 --- a/curios/Developing with Curios/getting-started.html +++ b/curios/Developing with Curios/getting-started.html @@ -4,7 +4,7 @@ Setting Up the Development Environment | Illusive Soulworks - + @@ -18,7 +18,7 @@ version that you want to use. This property can be set up by including a mapping in the gradle.properties file located in the same directory as the build.gradle file.

Please see CurseForge, Modrinth, or the maven for possible versions.

Example in gradle.properties:

curios_version=5.3.1+1.20.1
- + \ No newline at end of file diff --git a/curios/Developing with Curios/rendering-registry.html b/curios/Developing with Curios/rendering-registry.html index 1bbf77e..3dc8fa8 100644 --- a/curios/Developing with Curios/rendering-registry.html +++ b/curios/Developing with Curios/rendering-registry.html @@ -4,7 +4,7 @@ Rendering a Curio | Illusive Soulworks - + @@ -16,7 +16,7 @@ FMLClientSetupEvent in mod loading.

Example

@Mod("CurioMod")
public class CurioMod {

public CurioMod() {
final IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();
eventBus.addListener(this::clientSetup);
}

private void clientSetup(final FMLClientSetupEvent evt) {
CuriosRendererRegistry.register(CurioModItems.MY_ITEM, () -> new MyCurioRenderer());
}
}
tip

Multiple items are allowed to share a renderer instance or type. This can be handy if your ICurioRenderer implementation shares a lot of common code or if your items have very similar renders, in which case you may find it advantageous to simply register those items with a single renderer rather than multiple.

- + \ No newline at end of file diff --git a/curios/commands.html b/curios/commands.html index 9deb15b..1d76f9a 100644 --- a/curios/commands.html +++ b/curios/commands.html @@ -4,14 +4,14 @@ Commands | Illusive Soulworks - +
Version: 1.20.x

Commands

A tutorial on the various commands available through Curios.

Command Guide


SyntaxMeaning
plain textEnter this literally, exactly as shown.
<argumentsName>An argument that should be replaced with an appropriate value.
[entry]This entry is optional.

Syntax


All the commands begin with curios and have the following options:

  • list
    • Outputs a list of slot identifiers, categorized by mod.
  • replace <slotId> <index> <player> with <item> [amount]
    • Places the specified item in the specified slot on the target player.
  • set <slotId> <player> [amount]
    • Sets a number of slots for the specified slot type on the target player.
  • add <slotId> <player> [amount]
    • Adds a number of slots for the specified slot type on the target player.
  • remove <slotId> <player> [amount]
    • Removes a number of slots for the specified slot type on the target player.
  • clear <player> [slotId]
    • Clears the specified slot type of all its items. If no slot type is specified, all curios items will be cleared.
  • drop <player> [slotId]
    • Drops all the items in the specified slot type. If no slot type is specified, all curios items will be dropped.
  • reset <player>
    • Resets the target player's curios inventory to its default slots, also clears all curios items.

Arguments


  • <player>: player

    • Specifies the player to perform the command on.
    • Must be a player name, a target selector, or a UUID.
  • <amount>: int

    • Specifies the quantity of slots or items.
    • Must be a whole number greater than or equal to 1.
  • <index>: int

    • Specifies the index within the slot type.
    • Must be a whole number greater than or equal to 0.
  • <slotId>: slot_identifier

    • Specifies a slot type.
    • Must be an identifier of a registered slot type.

Examples


  • To add 3 "ring" slots to a player:

    • curios add ring Player123 1
  • To place a "minecraft:totem_of_undying" item in the first "charm" slot found on a player:

    • curios replace charm 0 Player123 with minecraft:totem_of_undying 1

Entity Selector Options


Curios has a custom entity selector option to use with commands that target entities, such as @a or @p.

The option starts with curios= and takes in a single CompoundTag as an argument. A blank tag would be curios={}.

Tag Format

The CompoundTag has the following fields:

  • item

    • required: false
    • type: CompoundTag
    • description: Denotes an item to match in the target's curios inventory.
    • Example:
      • curios={item:{id:"minecraft:glass_bottle"}}
      • This will search for a minecraft:glass_bottle in the target's curios inventory.
  • slot

    • required: false
    • type: string[]
    • description: Denotes a slot type to search in the target's curios inventory.
    • Example:
      • curios={slot:["ring"]}
      • This will search for "ring" slots in the target's curios inventory.
  • index

    • required: false
    • type: int[min, max]
    • description: Denotes the indices in slots to search in the target's curios inventory.
    • Example:
      • curios={index:[0,1]}
      • This will search for the first index of each slot type in the target's curios inventory.
  • exclusive

    • required: false
    • type: boolean
    • description: Denotes whether the selector is searching for only one match.
    • Example:
      • curios={slot:["ring"],exclusive:true}
      • This will search for "ring" slots in the target's curios inventory but will not return a match if any other slot type is found in the inventory as well.

Inverting

The selector option also supports inverting. Placing a ! before the CompoundTag will invert the search. For example, curios=!{slot:["ring"]} will search for targets that do not have "ring" slots in their curios inventory.

Examples

  • To kill all players who have a minecraft:glass_bottle in a "ring" slot of the curios inventory:
    • /kill @a[curios={item:{id:"minecraft:glass_bottle"},slot:["ring"]}]
- + \ No newline at end of file diff --git a/curios/curios-nbt.html b/curios/curios-nbt.html index 2df8821..cfd2ba0 100644 --- a/curios/curios-nbt.html +++ b/curios/curios-nbt.html @@ -4,7 +4,7 @@ Curios Attribute Modifiers (NBT) | Illusive Soulworks - + @@ -17,7 +17,7 @@ the slot name. The slot name should be the identifier of a registered slot type.

tip

It is recommended that the UUID be left out except for special circumstances. When absent, Curios will give the attribute modifier a UUID based on the slot context which will prevent any stacking issues that could arise when multiple slots of the same type exist and the same attribute modifier is applied multiple times.

- + \ No newline at end of file diff --git a/curios/entity-register.html b/curios/entity-register.html index b82c163..0e1ca35 100644 --- a/curios/entity-register.html +++ b/curios/entity-register.html @@ -4,20 +4,21 @@ Adding Slot Types to Entities | Illusive Soulworks - +
Version: 1.20.x

Adding Slot Types to Entities

A tutorial on how to add registered slot types to entities.

Overview


Beginning in 1.20, the recommended way to add a registered slot type to an entity is through a datapack. If you are unfamiliar with datapacks, it is recommended to read through the wiki page -in order to understand the concept and structure before proceeding to the rest of this page.

Directory


The file should be a .json file located in the ~/data/(namespace)/curios/entities/ folder of the datapack.

note

The file can be named anything.

The (namespace) field should be replaced by the namespace chosen for this portion of the datapack. If this is a part +in order to understand the concept and structure before proceeding to the rest of this page.

Registered slot types will all be available for use but will not appear in-game until they are +added to one or more entities.

Directory


The file should be a .json file located in the ~/data/(namespace)/curios/entities/ folder of the datapack.

note

The file can be named anything.

The (namespace) field should be replaced by the namespace chosen for this portion of the datapack. If this is a part of a mod, the namespace is usually the mod ID. If this is part of a user-defined datapack, then the namespace can be anything that is lowercased with no special characters.

Syntax


The structure of the .json file for the entity configuration consists of a top-level JSON object that holds two potential fields.

  • entities
    • An array of registry names of entity types or entity type tags.
  • slots
    • An array of identifier names for registered slot types.

All the listed slots will be associated to all the listed entities.

caution

Adding multiple of the same identifier to the slots array will not add multiple slots. Each entry in the slots array represents a registered slot type and the entries do not stack, please refer to that page in order to change slot type behavior including default size.

Example


{
"entities": ["player", "minecraft:zombie"],
"slots": ["head", "back"]
}

This configuration will give two slot types, head and back, to all players and all zombies.

- + \ No newline at end of file diff --git a/curios/preset-slots.html b/curios/preset-slots.html index a8d56e1..19e2fe1 100644 --- a/curios/preset-slots.html +++ b/curios/preset-slots.html @@ -4,7 +4,7 @@ Preset Slot Types | Illusive Soulworks - + @@ -15,7 +15,7 @@ list of slot types that are commonly used in the modded community and should be favored over creating wholly unique slot types when applicable.

note

Although these slot types are provided by Curios, they are not active by default. A developer or user will still need to take the proper steps to register the slot type(s) that they want in order to add them to the game.

Slot Types


IdentifierUsageExamples
curioUniversal, able to equip or be equipped into any slot typeBotania
backItems worn on the back, such as capes or backpacksBackpacked, BountifulBaubles, Elytra Slot, Shulker Box Slot
beltItems worn around the waist, such as belts or pouchesArtifacts, Cyclic, Nature's Aura
bodyItems worn around the torso, such as cloaks or shirtsEngineer's Tools, Reliquary
braceletItems worn around the wrist, such as bands or bracelets
charmMiscellaneous items, either held or not associated with a body partAngel Ring, Charm of Undying, Dark Utilities
headItems worn on top of the head, such as crowns or hatsVanillaTweaks
handsItems worn on hands, such as gloves or gauntletsArtifacts, Cyclic
necklaceItems worn around the neck, such as amulets or necklacesAzure RPG Items, Potion Capsule
ringItems worn on the "fingers", such as ringsEnigmatic Legacy, Gobber
- + \ No newline at end of file diff --git a/curios/slot-register.html b/curios/slot-register.html index 5d7e172..a316b9b 100644 --- a/curios/slot-register.html +++ b/curios/slot-register.html @@ -4,20 +4,25 @@ Registering Slot Types | Illusive Soulworks - +
Version: 1.20.x

Registering Slot Types

A tutorial on how to register slot types that are recognized by Curios.

Overview


Beginning in 1.20, the recommended way to register a slot type is through a datapack. If you are unfamiliar with datapacks, it is recommended to read through the wiki page in order to -understand the concept and structure before proceeding to the rest of this page.

tip

If using one of the Preset Slot Types, this step can be skipped since Curios natively provides the -needed datapack registration.

Directory


The file should be a .json file with the identifier for the slot type to be registered as the name. This file +understand the concept and structure before proceeding to the rest of this page.

If using one of the Preset Slot Types, this step can be skipped since Curios natively provides the +needed datapack registration.

info

Why are my registered slot types not appearing?

Registering slot types makes them available for use; however, they are not added to any entities (including players) +by default. In order to add them to an entity, please refer to the next step on adding slot +types to entities.

Directory


The file should be a .json file with the identifier for the slot type to be registered as the name. This file should be located in the ~/data/(namespace)/curios/slots/ folder of the datapack.

Example: Registering a head slot type requires creating a head.json file located in ~/data/(namespace)/curios/slots/ so the final path should look like ~/data/(namespace)/curios/slots/head.json.

note

The (namespace) field should be replaced by the namespace chosen for this portion of the datapack. If this is a part of a mod, the namespace is usually the mod ID. If this is part of a user-defined datapack, then the namespace can be anything that is lowercased with no special characters.

Syntax


The structure of the .json file for the slot type consists of a top-level JSON object that holds various fields -related to that slot type.

FieldTypeDefaultRequiredDescriptionMerge Behavior
replacebooleanfalsefalseWhen true, replaces data from lower-priority datapacksN/A
sizeinteger1falseThe number of slots of this slot type to give by defaultThe highest size will be used
operation"SET"|"ADD"|"REMOVE""SET"falseWhether to use size to set, add, or remove from the total number of slotsN/A
orderinteger1000falseThe order the slots will appear in the native Curios GUI, lower numbers appear higherThe lowest order will be used
iconstringcurios:slot/empty_curios_slotfalseThe location of the icon to use for the slot typeThe last icon will be used
add_cosmeticbooleanfalsefalseWhen true, adds a cosmetic slot next to the original that does not provide function but still renders its contentstrue if any add a cosmetic slot
use_native_guibooleantruefalseWhen false, does not add the slot type to the native Curios GUIfalse if any do not use the native GUI
render_togglebooleantruefalseWhen false, does not allow the slot type to toggle its renderingfalse if any do not allow render toggling

Example


{
"order": 20,
"size": 4,
"icon": "curios:slot/empty_custom_slot",
"add_cosmetic": true
}

This slot type will have a relatively low order of 20, which will make it appear higher than most slots. It also has +related to that slot type.

FieldTypeDefaultRequiredDescriptionMerge Behavior
replacebooleanfalsefalseWhen true, replaces data from lower-priority datapacksN/A
sizeinteger1falseThe number of slots of this slot type to give by defaultThe highest size will be used
operation"SET"|"ADD"|"REMOVE""SET"falseWhether to use size to set, add, or remove from the total number of slotsN/A
orderinteger1000falseThe order the slots will appear in the native Curios GUI, lower numbers appear higherThe lowest order will be used
iconstringcurios:slot/empty_curios_slotfalseThe location of the icon to use for the slot typeThe last icon will be used
add_cosmeticbooleanfalsefalseWhen true, adds a cosmetic slot next to the original that does not provide function but still renders its contentstrue if any add a cosmetic slot
use_native_guibooleantruefalseWhen false, does not add the slot type to the native Curios GUIfalse if any do not use the native GUI
render_togglebooleantruefalseWhen false, does not allow the slot type to toggle its renderingfalse if any do not allow render toggling
info

Which operation value should I use?

In most cases, "SET" (also the default if no value is defined) will accomplish the desired result. It denotes that a +slot type should have a certain amount of slots by default, with the highest value among all consumers being used. +"ADD"and "REMOVE" are inherent slot modifiers and are based on the amount of slots specified by all "SET" +operations, the result of which can change based on the mods/datapacks loaded.

Example


{
"order": 20,
"size": 4,
"icon": "curios:slot/empty_custom_slot",
"add_cosmetic": true
}

This slot type will have a relatively low order of 20, which will make it appear higher than most slots. It also has size of 4 which means that it will register 4 slots to any given entity by default. For the GUI, it uses an icon located at curios:slot/empty_custom_slot. It also has added a cosmetic slot so there will be an additional slot for cosmetic items next to it in the Curios GUI.

Modifying a Slot Type


The process of modifying a slot type is identical to registering a new slot type, except using the same identifier as @@ -25,7 +30,7 @@ each field as outlined above.

Example

Curios natively provides data for the ring slot, which defaults the size to 1. In order to increase the size to 2, create a ring.json slot registration file in the datapack with the contents:

{
"size": 2
}

This will merge the size data of this registration with the existing registration provided by Curios, keeping all of the other data intact while increasing the number of slots to 2.

- + \ No newline at end of file diff --git a/curios/slot-textures.html b/curios/slot-textures.html index aef9363..eb0eabe 100644 --- a/curios/slot-textures.html +++ b/curios/slot-textures.html @@ -4,7 +4,7 @@ Adding Custom Slot Textures | Illusive Soulworks - + @@ -18,7 +18,7 @@ slot should have a charm.json slot registration file in a datapack with the following contents:

{
"icon": "test:slot/empty_test_slot"
}
caution

Note that the path in "icon" is not the entire path of the directory. It omits the texture part and also omits the .png extension. This is due to how Curios and Minecraft parses the icon, so make sure the path is formatted correctly when adding this field.

- + \ No newline at end of file diff --git a/diet/diet-groups.html b/diet/diet-groups.html index 5ecd96e..3ee0a88 100644 --- a/diet/diet-groups.html +++ b/diet/diet-groups.html @@ -4,7 +4,7 @@ Customizing Food Groups | Illusive Soulworks - + @@ -31,7 +31,7 @@ default value to 0.5, create a fruits.json food group file in the datapack with the contents:

{
"default_value": 0.5
}

This will replace the pre-existing default value with the new one of 0.5.

Localization


The default food groups have in-built translations provided, but custom food groups will need to have their own created.

The key is: groups.diet.customgroup.name.

Example translation entry:

"groups.diet.grains.name": "Grains"

These entries need to be placed in the localization files of a custom resource pack. For further information about creating a resource pack, please refer to this guide.

Built-in Food Groups


These food groups are built-in to Diet natively and can be added to Diet Suites or individually customized by creating a new datapack file that overrides its contents.

fruits.json
{
"icon": "minecraft:apple",
"color": "#d41c53",
"order": 0,
"default_value": 0.0,
"gain_multiplier": 1.0,
"decay_multiplier": 1.0,
"beneficial": true
}
grains.json
{
"icon": "minecraft:bread",
"color": "#d4a31c",
"order": 0,
"default_value": 0.0,
"gain_multiplier": 1.0,
"decay_multiplier": 1.0,
"beneficial": true
}
proteins.json
{
"icon": "minecraft:cooked_beef",
"color": "#d4781c",
"order": 0,
"default_value": 0.0,
"gain_multiplier": 1.0,
"decay_multiplier": 1.0,
"beneficial": true
}
vegetables.json
{
"icon": "minecraft:carrot",
"color": "#31d41c",
"order": 0,
"default_value": 0.0,
"gain_multiplier": 1.0,
"decay_multiplier": 1.0,
"beneficial": true
}
sugars.json
{
"icon": "minecraft:honey_bottle",
"color": "#ff8fe9",
"order": 10,
"default_value": 0.0,
"gain_multiplier": 1.0,
"decay_multiplier": 1.0,
"beneficial": true
}
- + \ No newline at end of file diff --git a/diet/diet-suites.html b/diet/diet-suites.html index 6aec926..d42b5f0 100644 --- a/diet/diet-suites.html +++ b/diet/diet-suites.html @@ -4,7 +4,7 @@ Customizing Diet Suites | Illusive Soulworks - + @@ -22,7 +22,7 @@ multiple conditions for a single effect, and all conditions must pass in order to activate the effect.

{
"effects": [
{
"conditions": [
{
"groups": ["sugars", "proteins"],
"match": "all",
"above": 0.8,
"below": 1.0
}
]
}
]
}

Fields

groups - string[]

  • A list of groups that this condition is testing against
  • The names correspond to the names given to the groups in the diet-groups.toml configuration

above - decimal

  • A decimal value between 0.0 and 1.0 that indicates the lower bound that the value must be at or above

below - decimal

  • A decimal value between 0.0 and 1.0 that indicates the upper bound that the value must be at or below

match - string

  • The match method used for the condition testing
  • Possible values:
    • "all" - Condition passes if all the groups meet the threshold.
    • "any" - Condition passes if any the groups meet the threshold.
    • "average" - Condition passes if the average value of the groups meets the threshold.
    • "none" - Condition passes if none of the groups meet the threshold.
    • "every" - Condition passes if at least one group meets the threshold. In addition, looks for each group that passes the condition and amplifies the effect's power for each one.
      • Example: If three groups pass an "every" test, then a "Strength I" potion effect becomes "Strength III"

Example


{
"replace": false,
"groups": [
"fruits",
"grains",
"proteins",
"sugars",
"vegetables"
],
"effects": [
{
"attributes": [
{
"name": "minecraft:generic.max_health",
"operation": "add",
"amount": 2.0
}
],
"conditions": [
{
"groups": ["proteins", "fruits", "vegetables", "grains"],
"match": "all",
"above": 0.8,
"below": 1.0
}
]
},
{
"status_effects": [
{
"name": "minecraft:hunger",
"power": 3
}
],
"conditions": [
{
"groups": ["sugars"],
"match": "all",
"above": 0.8,
"below": 1.0
}
]
}
]
}

This configuration will grant 2.0 additional max_health when all the proteins, vegetables, grains, and fruits food groups are above 80% (0.8) and below or equal to 100% (1.0).

In addition, there is an additional effect that grants hunger at power 3 when sugars is above 80% (0.8) and below or equal to 100% (1.0).

Built-in Diet Suite


This is the built-in diet suite that is configured by default, aptly named builtin.

builtin.json
{
"replace": false,
"groups": [
"fruits",
"grains",
"proteins",
"sugars",
"vegetables"
],
"effects": [
{
"attributes": [
{
"name": "minecraft:generic.max_health",
"operation": "add",
"amount": 2.0
},
{
"name": "minecraft:generic.attack_damage",
"operation": "add",
"amount": 2.0
},
{
"name": "minecraft:generic.attack_speed",
"operation": "multiply_total",
"amount": 0.1
}
],
"conditions": [
{
"groups": ["proteins", "fruits", "vegetables", "grains"],
"match": "all",
"above": 0.8,
"below": 1.0
}
]
},
{
"attributes": [
{
"name": "minecraft:generic.max_health",
"operation": "add",
"amount": 2.0
},
{
"name": "minecraft:generic.knockback_resistance",
"operation": "add",
"amount": 0.10
},
{
"name": "minecraft:generic.armor_toughness",
"operation": "add",
"amount": 1.0
}
],
"conditions": [
{
"groups": ["proteins", "fruits", "vegetables", "grains"],
"match": "every",
"above": 0.8,
"below": 1.0
}
]
},
{
"attributes": [
{
"name": "minecraft:generic.movement_speed",
"operation": "multiply_base",
"amount": 0.25
}
],
"status_effects": [
{
"name": "minecraft:hunger",
"power": 3
}
],
"conditions": [
{
"groups": ["sugars"],
"match": "all",
"above": 0.8,
"below": 1.0
}
]
}
]
}
- + \ No newline at end of file diff --git a/diet/food-classification.html b/diet/food-classification.html index 3a0ae3e..cda2ccd 100644 --- a/diet/food-classification.html +++ b/diet/food-classification.html @@ -4,13 +4,13 @@ Categorizing Food to Groups | Illusive Soulworks - +
Version: 1.20.x

Categorizing Food to Groups

Food classification into groups is done through item tags.

Please see the general overview of the tag system at the Minecraft wiki.

The tags follow the format diet:[group name].

Special Tags

diet:ingredients

Adding items to this tag prevents the item from contributing its food groups as a crafting component of other items. This is useful for adding foods that may have food groups themselves but should not contribute to any other item's food groups, such as condiments or seasoning that conceptually do not add enough to a food item to also add its food groups.

Note that this tag is only useful if Diet's default value generator is turned on in the configuration options. Otherwise, food groups rely solely on the item's tagging information rather than its crafting components.

diet:special_food

Adding items to this tag forcibly adds food groups to the item regardless of whether it is considered edible or not. This is useful for items like cakes that are essentially blocks that proxy food items only when placed and interacted with. The cake itself is not edible but it should still provide information about its food groups, so it should be placed in this tag in addition to its food group tags in order to provide that information. The tooltip for such foods will only display its food groups and not the value provided (since such information cannot be obtained directly from the item itself).

Guided Walkthrough

Creating a data pack

In order to begin, we'll need to create a data pack first of all. 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": 6,
"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 diet, then another folder in diet called tags, then another in tags called items.

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

Creating a tag file

Now create a new file here called (insert group name here).json. If you're adding to a group called fruits, we would name it fruits.json. It's very important that the name matches the name of the group.

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 you're most interested in. This is where you list alllll of the items that you want to add to the group. For example, if you'd like to add an item called "examplemod:bacon":

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

You can put as many values as you want here but they must all be comma separated inside of the brackets. Like so:

{
"replace": "false",
"values": ["examplemod:bacon", "examplemod:cheese"]
}

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.

If you want to remove items from a tag, Forge provides an additional remove array for the json file:

{
"replace": "false",
"values": ["examplemod:bacon", "examplemod:cheese"],
"remove": ["examplemod:fish"]
}

You can verify that you've added the item in properly by looking at the item's tooltip because the item will list the food groups they belong in.

And that's it! If you have any questions or need help troubleshooting, please feel free to contact the developer directly.

- + \ No newline at end of file diff --git a/index.html b/index.html index 333c968..3556cd9 100644 --- a/index.html +++ b/index.html @@ -4,13 +4,13 @@ Overview | Illusive Soulworks - +
Version: 1.20.x

Overview

WIP! Check back later for updates.

- + \ No newline at end of file diff --git a/versions.html b/versions.html index b6730e6..eae9f51 100644 --- a/versions.html +++ b/versions.html @@ -4,13 +4,13 @@ Versions | Illusive Soulworks - +

Illusive Soulworks project documentation versions

Current version

Here you can find the documentation for the latest version.

1.20.xDocumentationRelease Notes

Past versions

Here you can find documentation for previous versions of Illusive Soulworks projects.

1.18.xDocumentationRelease Notes
- + \ No newline at end of file