Overview
diff --git a/1.18.x/category/champions.html b/1.18.x/category/champions.html index b99de35..a02cda8 100644 --- a/1.18.x/category/champions.html +++ b/1.18.x/category/champions.html @@ -4,8 +4,8 @@Champions
A Minecraft mod introducing elite mobs with enhanced stats and abilities.
📄️ Loot
All champions get their drops from the Champions loot table, which is enabled when the lootSource configuration value in the
📄️ Commands
All the Champions commands are available through /champions.
📄️ 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.
🗃️ Mod Integrations
2 items
Commands
diff --git a/1.18.x/champions/integration/gamestages.html b/1.18.x/champions/integration/gamestages.html index d44245b..0b9d97b 100644 --- a/1.18.x/champions/integration/gamestages.html +++ b/1.18.x/champions/integration/gamestages.html @@ -4,8 +4,8 @@Game Stages
diff --git a/1.18.x/champions/integration/scalinghealth.html b/1.18.x/champions/integration/scalinghealth.html index 87fdfcf..df58f4e 100644 --- a/1.18.x/champions/integration/scalinghealth.html +++ b/1.18.x/champions/integration/scalinghealth.html @@ -4,8 +4,8 @@Scaling Health
diff --git a/1.18.x/champions/loottable.html b/1.18.x/champions/loottable.html index 199a334..a70b569 100644 --- a/1.18.x/champions/loottable.html +++ b/1.18.x/champions/loottable.html @@ -4,8 +4,8 @@Loot
diff --git a/1.18.x/champions/nbt.html b/1.18.x/champions/nbt.html index 96a993e..34277b8 100644 --- a/1.18.x/champions/nbt.html +++ b/1.18.x/champions/nbt.html @@ -4,8 +4,8 @@NBT Tags
diff --git a/404.html b/404.html index 3fd0e5b..aa804b0 100644 --- a/404.html +++ b/404.html @@ -4,8 +4,8 @@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.
"SET"
|"ADD"
|"REMOVE"
)",id:"operation-setaddremove",level:4},{value:"order (integer)",id:"order-integer",level:4},{value:"icon (string)",id:"icon-string",level:4},{value:"add_cosmetic (boolean)",id:"add_cosmetic-boolean",level:4},{value:"use_native_gui (boolean)",id:"use_native_gui-boolean",level:4},{value:"render_toggle (boolean)",id:"render_toggle-boolean",level:4},{value:"drop_rule ("DEFAULT"
|"ALWAYS_DROP"
|"ALWAYS_KEEP"
|"DESTROY"
)",id:"drop_rule-defaultalways_dropalways_keepdestroy",level:4},{value:"Example",id:"example",level:3}];function c(e){const o={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",strong:"strong",...(0,i.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.h1,{id:"configuration",children:"Configuration"}),"\n",(0,n.jsx)(o.p,{children:"Curios has various configuration files that can be used to change settings related to the user interface, curios\nbehavior, and more."}),"\n",(0,n.jsx)(o.h2,{id:"slot-configuration",children:"Slot Configuration"}),"\n",(0,n.jsxs)(o.p,{children:["Although the datapack method described in the ",(0,n.jsx)(o.a,{href:"/curios/slots/slot-register",children:"slot types"})," page is the recommended method for\nall consumers, users who are not familiar with datapacks or do not need the features of the format are able to create\nand modify slots through the Curios configuration file."]}),"\n",(0,n.jsxs)(o.p,{children:["This configuration is located in the ",(0,n.jsx)(o.code,{children:"curios-common.toml"})," configuration file found in the ",(0,n.jsx)(o.code,{children:"config"})," folder of the user's\nroot Minecraft instance."]}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-toml",children:"#List of slots to create or modify.\nslots = []\n"})}),"\n",(0,n.jsx)(o.p,{children:"The slots list will be empty at first. Users can define a slot entry by inputting a string entry into the array. All\nslots that are defined in this setting will automatically be assigned to players if they are not already assigned."}),"\n",(0,n.jsx)(o.admonition,{type:"note",children:(0,n.jsx)(o.p,{children:"This setting is loaded server-side only and synced to clients. Servers can change this setting without updating clients\nand clients will receive the proper slots upon joining."})}),"\n",(0,n.jsx)(o.h3,{id:"syntax",children:"Syntax"}),"\n",(0,n.jsxs)(o.p,{children:["Each entry must include an ",(0,n.jsx)(o.code,{children:"id"})," field that represents the identifier of the slot type, and fields in the entry must be\nseparated by semicolons. The following fields are available for use through the configuration file:"]}),"\n",(0,n.jsxs)(o.h4,{id:"id-string-required",children:[(0,n.jsx)(o.strong,{children:"id"})," (string, ",(0,n.jsx)(o.em,{children:"required"}),")"]}),"\n",(0,n.jsx)(o.p,{children:"The identifier for the slot type to create or modify."}),"\n",(0,n.jsxs)(o.h4,{id:"size-integer",children:[(0,n.jsx)(o.strong,{children:"size"})," (integer)"]}),"\n",(0,n.jsx)(o.p,{children:"The number of slots of this slot type to give by default."}),"\n",(0,n.jsxs)(o.h4,{id:"operation-setaddremove",children:[(0,n.jsx)(o.strong,{children:"operation"})," (",(0,n.jsx)(o.code,{children:'"SET"'}),"|",(0,n.jsx)(o.code,{children:'"ADD"'}),"|",(0,n.jsx)(o.code,{children:'"REMOVE"'}),")"]}),"\n",(0,n.jsxs)(o.p,{children:["Whether to use ",(0,n.jsx)(o.code,{children:"size"})," to set, add, or remove from the total number of slots."]}),"\n",(0,n.jsxs)(o.h4,{id:"order-integer",children:[(0,n.jsx)(o.strong,{children:"order"})," (integer)"]}),"\n",(0,n.jsx)(o.p,{children:"The order the slots will appear in the native Curios GUI, lower numbers appear first."}),"\n",(0,n.jsxs)(o.h4,{id:"icon-string",children:[(0,n.jsx)(o.strong,{children:"icon"})," (string)"]}),"\n",(0,n.jsx)(o.p,{children:"The location of the icon to use for the slot type."}),"\n",(0,n.jsxs)(o.h4,{id:"add_cosmetic-boolean",children:[(0,n.jsx)(o.strong,{children:"add_cosmetic"})," (boolean)"]}),"\n",(0,n.jsx)(o.p,{children:"The location of the icon to use for the slot type."}),"\n",(0,n.jsxs)(o.h4,{id:"use_native_gui-boolean",children:[(0,n.jsx)(o.strong,{children:"use_native_gui"})," (boolean)"]}),"\n",(0,n.jsxs)(o.p,{children:["When ",(0,n.jsx)(o.code,{children:"false"}),", does not add the slot type to the native Curios GUI."]}),"\n",(0,n.jsxs)(o.h4,{id:"render_toggle-boolean",children:[(0,n.jsx)(o.strong,{children:"render_toggle"})," (boolean)"]}),"\n",(0,n.jsxs)(o.p,{children:["When ",(0,n.jsx)(o.code,{children:"false"}),", does not allow the slot type to toggle its rendering."]}),"\n",(0,n.jsxs)(o.h4,{id:"drop_rule-defaultalways_dropalways_keepdestroy",children:[(0,n.jsx)(o.strong,{children:"drop_rule"})," (",(0,n.jsx)(o.code,{children:'"DEFAULT"'}),"|",(0,n.jsx)(o.code,{children:'"ALWAYS_DROP"'}),"|",(0,n.jsx)(o.code,{children:'"ALWAYS_KEEP"'}),"|",(0,n.jsx)(o.code,{children:'"DESTROY"'}),")"]}),"\n",(0,n.jsxs)(o.p,{children:["Whether to drop, keep, destroy, or follow the ",(0,n.jsx)(o.code,{children:"keepCurios"})," configuration setting."]}),"\n",(0,n.jsx)(o.h3,{id:"example",children:"Example"}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-toml",children:'slots = ["id=ring;size=10", "id=charm;size=3;add_cosmetic=true"]\n'})}),"\n",(0,n.jsxs)(o.p,{children:["This setting will create or modify two slot types, ",(0,n.jsx)(o.code,{children:'"ring"'})," and ",(0,n.jsx)(o.code,{children:'"charm"'}),", and assign both of them to all players. The\nring slot type will be created at size 10, and the charm slot type will be created at size 3 while also adding cosmetic\nslots for them. These settings will override any settings from the datapack configurations as described in the main\n",(0,n.jsx)(o.a,{href:"/curios/slots/slot-register",children:"slot types page"}),"."]})]})}function h(e={}){const{wrapper:o}={...(0,i.a)(),...e.components};return o?(0,n.jsx)(o,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1151:(e,o,t)=>{t.d(o,{Z:()=>l,a:()=>r});var n=t(7294);const i={},s=n.createContext(i);function r(e){const o=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function l(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),n.createElement(s.Provider,{value:o},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/036fc41e.f755e690.js b/assets/js/036fc41e.f755e690.js
deleted file mode 100644
index 84bb34e..0000000
--- a/assets/js/036fc41e.f755e690.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[882],{2211:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>a});var n=t(5893),i=t(1151);const s={sidebar_position:13},r="Configuration",l={id:"curios/configuration",title:"Configuration",description:"Curios has various configuration files that can be used to change settings related to the user interface, curios",source:"@site/docs/curios/configuration.md",sourceDirName:"curios",slug:"/curios/configuration",permalink:"/curios/configuration",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/configuration.md",tags:[],version:"current",sidebarPosition:13,frontMatter:{sidebar_position:13},sidebar:"tutorialSidebar",previous:{title:"ICurioRenderer",permalink:"/curios/api/renderer-interface"},next:{title:"Commands",permalink:"/curios/commands"}},d={},a=[{value:"Slot Configuration",id:"slot-configuration",level:2},{value:"Syntax",id:"syntax",level:3},{value:"id (string, required)",id:"id-string-required",level:4},{value:"size (integer)",id:"size-integer",level:4},{value:"operation ("SET"
|"ADD"
|"REMOVE"
)",id:"operation-setaddremove",level:4},{value:"order (integer)",id:"order-integer",level:4},{value:"icon (string)",id:"icon-string",level:4},{value:"add_cosmetic (boolean)",id:"add_cosmetic-boolean",level:4},{value:"use_native_gui (boolean)",id:"use_native_gui-boolean",level:4},{value:"render_toggle (boolean)",id:"render_toggle-boolean",level:4},{value:"drop_rule ("DEFAULT"
|"ALWAYS_DROP"
|"ALWAYS_KEEP"
|"DESTROY"
)",id:"drop_rule-defaultalways_dropalways_keepdestroy",level:4},{value:"Example",id:"example",level:3}];function c(e){const o={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",strong:"strong",...(0,i.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.h1,{id:"configuration",children:"Configuration"}),"\n",(0,n.jsx)(o.p,{children:"Curios has various configuration files that can be used to change settings related to the user interface, curios\nbehavior, and more."}),"\n",(0,n.jsx)(o.h2,{id:"slot-configuration",children:"Slot Configuration"}),"\n",(0,n.jsxs)(o.p,{children:["Although the datapack method described in the ",(0,n.jsx)(o.a,{href:"/curios/slots/slot-register",children:"slot types"})," page is the recommended method for\nall consumers, users who are not familiar with datapacks or do not need the features of the format are able to create\nand modify slots through the Curios configuration file."]}),"\n",(0,n.jsxs)(o.p,{children:["This configuration is located in the ",(0,n.jsx)(o.code,{children:"curios-common.toml"})," configuration file found in the ",(0,n.jsx)(o.code,{children:"config"})," folder of the user's\nroot Minecraft instance."]}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-toml",children:"#List of slots to create or modify.\nslots = []\n"})}),"\n",(0,n.jsx)(o.p,{children:"The slots list will be empty at first. Users can define a slot entry by inputting a string entry into the array. All\nslots that are defined in this setting will automatically be assigned to players if they are not already assigned."}),"\n",(0,n.jsx)(o.admonition,{type:"note",children:(0,n.jsx)(o.p,{children:"This setting is loaded server-side only and synced to clients. Servers can change this setting without updating clients\nand clients will receive the proper slots upon joining."})}),"\n",(0,n.jsx)(o.h3,{id:"syntax",children:"Syntax"}),"\n",(0,n.jsxs)(o.p,{children:["Each entry must include an ",(0,n.jsx)(o.code,{children:"id"})," field that represents the identifier of the slot type, and fields in the entry must be\nseparated by semicolons. The following fields are available for use through the configuration file:"]}),"\n",(0,n.jsxs)(o.h4,{id:"id-string-required",children:[(0,n.jsx)(o.strong,{children:"id"})," (string, ",(0,n.jsx)(o.em,{children:"required"}),")"]}),"\n",(0,n.jsx)(o.p,{children:"The identifier for the slot type to create or modify."}),"\n",(0,n.jsxs)(o.h4,{id:"size-integer",children:[(0,n.jsx)(o.strong,{children:"size"})," (integer)"]}),"\n",(0,n.jsx)(o.p,{children:"The number of slots of this slot type to give by default."}),"\n",(0,n.jsxs)(o.h4,{id:"operation-setaddremove",children:[(0,n.jsx)(o.strong,{children:"operation"})," (",(0,n.jsx)(o.code,{children:'"SET"'}),"|",(0,n.jsx)(o.code,{children:'"ADD"'}),"|",(0,n.jsx)(o.code,{children:'"REMOVE"'}),")"]}),"\n",(0,n.jsxs)(o.p,{children:["Whether to use ",(0,n.jsx)(o.code,{children:"size"})," to set, add, or remove from the total number of slots."]}),"\n",(0,n.jsxs)(o.h4,{id:"order-integer",children:[(0,n.jsx)(o.strong,{children:"order"})," (integer)"]}),"\n",(0,n.jsx)(o.p,{children:"The order the slots will appear in the native Curios GUI, lower numbers appear first."}),"\n",(0,n.jsxs)(o.h4,{id:"icon-string",children:[(0,n.jsx)(o.strong,{children:"icon"})," (string)"]}),"\n",(0,n.jsx)(o.p,{children:"The location of the icon to use for the slot type."}),"\n",(0,n.jsxs)(o.h4,{id:"add_cosmetic-boolean",children:[(0,n.jsx)(o.strong,{children:"add_cosmetic"})," (boolean)"]}),"\n",(0,n.jsx)(o.p,{children:"The location of the icon to use for the slot type."}),"\n",(0,n.jsxs)(o.h4,{id:"use_native_gui-boolean",children:[(0,n.jsx)(o.strong,{children:"use_native_gui"})," (boolean)"]}),"\n",(0,n.jsxs)(o.p,{children:["When ",(0,n.jsx)(o.code,{children:"false"}),", does not add the slot type to the native Curios GUI."]}),"\n",(0,n.jsxs)(o.h4,{id:"render_toggle-boolean",children:[(0,n.jsx)(o.strong,{children:"render_toggle"})," (boolean)"]}),"\n",(0,n.jsxs)(o.p,{children:["When ",(0,n.jsx)(o.code,{children:"false"}),", does not allow the slot type to toggle its rendering."]}),"\n",(0,n.jsxs)(o.h4,{id:"drop_rule-defaultalways_dropalways_keepdestroy",children:[(0,n.jsx)(o.strong,{children:"drop_rule"})," (",(0,n.jsx)(o.code,{children:'"DEFAULT"'}),"|",(0,n.jsx)(o.code,{children:'"ALWAYS_DROP"'}),"|",(0,n.jsx)(o.code,{children:'"ALWAYS_KEEP"'}),"|",(0,n.jsx)(o.code,{children:'"DESTROY"'}),")"]}),"\n",(0,n.jsxs)(o.p,{children:["Whether to drop, keep, destroy, or follow the ",(0,n.jsx)(o.code,{children:"keepCurios"})," configuration setting."]}),"\n",(0,n.jsx)(o.h3,{id:"example",children:"Example"}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-toml",children:'slots = ["id=ring;size=10", "id=charm;size=3;add_cosmetic=true"]\n'})}),"\n",(0,n.jsxs)(o.p,{children:["This setting will create or modify two slot types, ",(0,n.jsx)(o.code,{children:'"ring"'})," and ",(0,n.jsx)(o.code,{children:'"charm"'}),", and assign both of them to all players. The\nring slot type will be created at size 10, and the charm slot type will be created at size 3 while also adding cosmetic\nslots for them. These settings will override any settings from the datapack configurations as described in the main\n",(0,n.jsx)(o.a,{href:"/curios/slots/slot-register",children:"slot types page"}),"."]})]})}function h(e={}){const{wrapper:o}={...(0,i.a)(),...e.components};return o?(0,n.jsx)(o,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1151:(e,o,t)=>{t.d(o,{Z:()=>l,a:()=>r});var n=t(7294);const i={},s=n.createContext(i);function r(e){const o=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function l(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),n.createElement(s.Provider,{value:o},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/09965537.53e2c49e.js b/assets/js/09965537.53e2c49e.js
new file mode 100644
index 0000000..8d2428f
--- /dev/null
+++ b/assets/js/09965537.53e2c49e.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[4131],{7616:e=>{e.exports=JSON.parse('{"title":"Curios","description":"A Minecraft mod introducing a flexible and expandable accessory/equipment API for users and developers.","slug":"/category/curios","permalink":"/category/curios","navigation":{"previous":{"title":"Overview","permalink":"/"},"next":{"title":"Setting Up the Development Environment","permalink":"/curios/getting-started"}}}')}}]);
\ No newline at end of file
diff --git a/assets/js/09965537.5f34f1c3.js b/assets/js/09965537.5f34f1c3.js
deleted file mode 100644
index c25dd0d..0000000
--- a/assets/js/09965537.5f34f1c3.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[131],{7616:e=>{e.exports=JSON.parse('{"title":"Curios","description":"A Minecraft mod introducing a flexible and expandable accessory/equipment API for users and developers.","slug":"/category/curios","permalink":"/category/curios","navigation":{"previous":{"title":"Overview","permalink":"/"},"next":{"title":"Setting Up the Development Environment","permalink":"/curios/getting-started"}}}')}}]);
\ No newline at end of file
diff --git a/assets/js/0e384e19.1ec97c32.js b/assets/js/0e384e19.1ec97c32.js
deleted file mode 100644
index 5616c09..0000000
--- a/assets/js/0e384e19.1ec97c32.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[671],{7876:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>c,toc:()=>u});var o=n(5893),r=n(1151);const s={sidebar_position:1,slug:"/"},i="Overview",c={id:"intro",title:"Overview",description:"WIP! Check back later for updates.",source:"@site/docs/intro.md",sourceDirName:".",slug:"/",permalink:"/",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/intro.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,slug:"/"},sidebar:"tutorialSidebar",next:{title:"Curios",permalink:"/category/curios"}},a={},u=[];function l(e){const t={h1:"h1",p:"p",...(0,r.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(t.p,{children:"WIP! Check back later for updates."})]})}function d(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>c,a:()=>i});var o=n(7294);const r={},s=o.createContext(r);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/0e384e19.1f7a745d.js b/assets/js/0e384e19.1f7a745d.js
new file mode 100644
index 0000000..79ffdda
--- /dev/null
+++ b/assets/js/0e384e19.1f7a745d.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[9671],{7876:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>c,toc:()=>u});var o=n(5893),r=n(1151);const s={sidebar_position:1,slug:"/"},i="Overview",c={id:"intro",title:"Overview",description:"WIP! Check back later for updates.",source:"@site/docs/intro.md",sourceDirName:".",slug:"/",permalink:"/",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/intro.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,slug:"/"},sidebar:"tutorialSidebar",next:{title:"Curios",permalink:"/category/curios"}},a={},u=[];function l(e){const t={h1:"h1",p:"p",...(0,r.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(t.p,{children:"WIP! Check back later for updates."})]})}function d(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>c,a:()=>i});var o=n(7294);const r={},s=o.createContext(r);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/141528fa.44ad0db6.js b/assets/js/141528fa.44ad0db6.js
new file mode 100644
index 0000000..cc794fc
--- /dev/null
+++ b/assets/js/141528fa.44ad0db6.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[2596],{5216:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>a,contentTitle:()=>n,default:()=>h,frontMatter:()=>r,metadata:()=>d,toc:()=>c});var o=i(5893),s=i(1151);const r={sidebar_position:12},n="Curios Attribute Modifiers (NBT)",d={id:"curios/items/curios-nbt",title:"Curios Attribute Modifiers (NBT)",description:"A tutorial on how to edit a curio item's NBT data to add attribute modifiers when the item is worn in a curio slot.",source:"@site/docs/curios/items/curios-nbt.md",sourceDirName:"curios/items",slug:"/curios/items/curios-nbt",permalink:"/curios/items/curios-nbt",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/items/curios-nbt.md",tags:[],version:"current",sidebarPosition:12,frontMatter:{sidebar_position:12},sidebar:"tutorialSidebar",previous:{title:"Rendering a Curio",permalink:"/curios/items/rendering-registry"},next:{title:"Inventory",permalink:"/category/inventory"}},a={},c=[{value:"Overview",id:"overview",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Slot Modifiers",id:"slot-modifiers",level:3}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",p:"p",pre:"pre",...(0,s.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"curios-attribute-modifiers-nbt",children:"Curios Attribute Modifiers (NBT)"}),"\n",(0,o.jsx)(t.p,{children:"A tutorial on how to edit a curio item's NBT data to add attribute modifiers when the item is worn in a curio slot."}),"\n",(0,o.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(t.hr,{}),"\n",(0,o.jsx)(t.p,{children:"Attribute modifiers used in item NBT for regular equipment slots will not work with curio slots. This is because the\nattribute modifiers are coded to work only in specific slots, and it will not recognize the custom curio slots. In order\nto grant this functionality, Curios adds its own method of adding NBT attribute modifiers in items."}),"\n",(0,o.jsxs)(t.p,{children:["The format for Curios is almost exactly the same as Minecraft, so it is recommended to look through this ",(0,o.jsx)(t.a,{href:"https://minecraft.fandom.com/wiki/Attribute",children:"Attribute Guide"}),"\nfor extended information about attribute names, syntax, and possible fields. This guide will only go over the\ndifferences in Curios."]}),"\n",(0,o.jsx)(t.h2,{id:"syntax",children:"Syntax"}),"\n",(0,o.jsx)(t.hr,{}),"\n",(0,o.jsx)(t.p,{children:"This is the vanilla way of adding an attribute modifier to the chest slot in an item's NBT:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:'/give @s netherite_chestplate{AttributeModifiers:[{Slot:"chest", AttributeName:"generic.attack_damage", Name:"generic.attack_damage", Amount:20.0, Operation:0, UUID:[I; 42853, 1689024593, -201178, -1559272105]}]} 1\n'})}),"\n",(0,o.jsxs)(t.p,{children:["This is the Curios way of achieving the same in the ",(0,o.jsx)(t.code,{children:"body"})," slot:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:'/give @s netherite_chestplate{CurioAttributeModifiers:[{Slot:"body", AttributeName:"generic.attack_damage", Name:"generic.attack_damage", Amount:20.0, Operation:0}]} 1\n'})}),"\n",(0,o.jsxs)(t.p,{children:["Note that the main differences are the change from ",(0,o.jsx)(t.code,{children:"AttributeModifiers"})," to ",(0,o.jsx)(t.code,{children:"CurioAttributeModifiers"})," and the change in\nthe slot name. The slot name should be the ",(0,o.jsx)(t.code,{children:"identifier"})," of a registered slot type."]}),"\n",(0,o.jsx)(t.h3,{id:"slot-modifiers",children:"Slot Modifiers"}),"\n",(0,o.jsxs)(t.p,{children:["This method can also be used to add slot modifiers, modifiers that can add or remove curio slots. The syntax is the\nsame, the only difference is that the ",(0,o.jsx)(t.code,{children:"AttributeName"})," should be of the format ",(0,o.jsx)(t.code,{children:"curios:identifier"})," with ",(0,o.jsx)(t.code,{children:"identifier"}),"\nbeing the slot identifier that is being added or removed."]}),"\n",(0,o.jsxs)(t.p,{children:["Going back to the previous example, this will make the item add 1 ",(0,o.jsx)(t.code,{children:"back"})," slot when worn in the ",(0,o.jsx)(t.code,{children:"body"})," slot:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:'/give @s netherite_chestplate{CurioAttributeModifiers:[{Slot:"body", AttributeName:"curios:back", Name:"back_modifier", Amount:1.0, Operation:0}]} 1\n'})}),"\n",(0,o.jsx)(t.admonition,{type:"tip",children:(0,o.jsx)(t.p,{children:"It is recommended that the UUID be left out except for special circumstances. When absent, Curios will give the attribute\nmodifier a UUID based on the slot context which will prevent any stacking issues that could arise when multiple slots\nof the same type exist and the same attribute modifier is applied multiple times."})})]})}function h(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},1151:(e,t,i)=>{i.d(t,{Z:()=>d,a:()=>n});var o=i(7294);const s={},r=o.createContext(s);function n(e){const t=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:n(e.components),o.createElement(r.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/141528fa.80fbeb89.js b/assets/js/141528fa.80fbeb89.js
deleted file mode 100644
index f469dce..0000000
--- a/assets/js/141528fa.80fbeb89.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[596],{5216:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>a,contentTitle:()=>n,default:()=>h,frontMatter:()=>r,metadata:()=>d,toc:()=>c});var o=i(5893),s=i(1151);const r={sidebar_position:12},n="Curios Attribute Modifiers (NBT)",d={id:"curios/items/curios-nbt",title:"Curios Attribute Modifiers (NBT)",description:"A tutorial on how to edit a curio item's NBT data to add attribute modifiers when the item is worn in a curio slot.",source:"@site/docs/curios/items/curios-nbt.md",sourceDirName:"curios/items",slug:"/curios/items/curios-nbt",permalink:"/curios/items/curios-nbt",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/items/curios-nbt.md",tags:[],version:"current",sidebarPosition:12,frontMatter:{sidebar_position:12},sidebar:"tutorialSidebar",previous:{title:"Rendering a Curio",permalink:"/curios/items/rendering-registry"},next:{title:"Inventory",permalink:"/category/inventory"}},a={},c=[{value:"Overview",id:"overview",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Slot Modifiers",id:"slot-modifiers",level:3}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",p:"p",pre:"pre",...(0,s.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"curios-attribute-modifiers-nbt",children:"Curios Attribute Modifiers (NBT)"}),"\n",(0,o.jsx)(t.p,{children:"A tutorial on how to edit a curio item's NBT data to add attribute modifiers when the item is worn in a curio slot."}),"\n",(0,o.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(t.hr,{}),"\n",(0,o.jsx)(t.p,{children:"Attribute modifiers used in item NBT for regular equipment slots will not work with curio slots. This is because the\nattribute modifiers are coded to work only in specific slots, and it will not recognize the custom curio slots. In order\nto grant this functionality, Curios adds its own method of adding NBT attribute modifiers in items."}),"\n",(0,o.jsxs)(t.p,{children:["The format for Curios is almost exactly the same as Minecraft, so it is recommended to look through this ",(0,o.jsx)(t.a,{href:"https://minecraft.fandom.com/wiki/Attribute",children:"Attribute Guide"}),"\nfor extended information about attribute names, syntax, and possible fields. This guide will only go over the\ndifferences in Curios."]}),"\n",(0,o.jsx)(t.h2,{id:"syntax",children:"Syntax"}),"\n",(0,o.jsx)(t.hr,{}),"\n",(0,o.jsx)(t.p,{children:"This is the vanilla way of adding an attribute modifier to the chest slot in an item's NBT:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:'/give @s netherite_chestplate{AttributeModifiers:[{Slot:"chest", AttributeName:"generic.attack_damage", Name:"generic.attack_damage", Amount:20.0, Operation:0, UUID:[I; 42853, 1689024593, -201178, -1559272105]}]} 1\n'})}),"\n",(0,o.jsxs)(t.p,{children:["This is the Curios way of achieving the same in the ",(0,o.jsx)(t.code,{children:"body"})," slot:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:'/give @s netherite_chestplate{CurioAttributeModifiers:[{Slot:"body", AttributeName:"generic.attack_damage", Name:"generic.attack_damage", Amount:20.0, Operation:0}]} 1\n'})}),"\n",(0,o.jsxs)(t.p,{children:["Note that the main differences are the change from ",(0,o.jsx)(t.code,{children:"AttributeModifiers"})," to ",(0,o.jsx)(t.code,{children:"CurioAttributeModifiers"})," and the change in\nthe slot name. The slot name should be the ",(0,o.jsx)(t.code,{children:"identifier"})," of a registered slot type."]}),"\n",(0,o.jsx)(t.h3,{id:"slot-modifiers",children:"Slot Modifiers"}),"\n",(0,o.jsxs)(t.p,{children:["This method can also be used to add slot modifiers, modifiers that can add or remove curio slots. The syntax is the\nsame, the only difference is that the ",(0,o.jsx)(t.code,{children:"AttributeName"})," should be of the format ",(0,o.jsx)(t.code,{children:"curios:identifier"})," with ",(0,o.jsx)(t.code,{children:"identifier"}),"\nbeing the slot identifier that is being added or removed."]}),"\n",(0,o.jsxs)(t.p,{children:["Going back to the previous example, this will make the item add 1 ",(0,o.jsx)(t.code,{children:"back"})," slot when worn in the ",(0,o.jsx)(t.code,{children:"body"})," slot:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:'/give @s netherite_chestplate{CurioAttributeModifiers:[{Slot:"body", AttributeName:"curios:back", Name:"back_modifier", Amount:1.0, Operation:0}]} 1\n'})}),"\n",(0,o.jsx)(t.admonition,{type:"tip",children:(0,o.jsx)(t.p,{children:"It is recommended that the UUID be left out except for special circumstances. When absent, Curios will give the attribute\nmodifier a UUID based on the slot context which will prevent any stacking issues that could arise when multiple slots\nof the same type exist and the same attribute modifier is applied multiple times."})})]})}function h(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},1151:(e,t,i)=>{i.d(t,{Z:()=>d,a:()=>n});var o=i(7294);const s={},r=o.createContext(s);function n(e){const t=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:n(e.components),o.createElement(r.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/14eb3368.0e3ce8ed.js b/assets/js/14eb3368.0e3ce8ed.js
deleted file mode 100644
index f228804..0000000
--- a/assets/js/14eb3368.0e3ce8ed.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[817],{1310:(e,s,t)=>{t.d(s,{Z:()=>p});t(7294);var n=t(512),i=t(5281),a=t(3438),r=t(8596),l=t(9960),c=t(5999),o=t(4996),d=t(5893);function m(e){return(0,d.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,d.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const u={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function h(){const e=(0,o.Z)("/");return(0,d.jsx)("li",{className:"breadcrumbs__item",children:(0,d.jsx)(l.Z,{"aria-label":(0,c.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,d.jsx)(m,{className:u.breadcrumbHomeIcon})})})}const b={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function x(e){let{children:s,href:t,isLast:n}=e;const i="breadcrumbs__link";return n?(0,d.jsx)("span",{className:i,itemProp:"name",children:s}):t?(0,d.jsx)(l.Z,{className:i,href:t,itemProp:"item",children:(0,d.jsx)("span",{itemProp:"name",children:s})}):(0,d.jsx)("span",{className:i,children:s})}function v(e){let{children:s,active:t,index:i,addMicrodata:a}=e;return(0,d.jsxs)("li",{...a&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,n.Z)("breadcrumbs__item",{"breadcrumbs__item--active":t}),children:[s,(0,d.jsx)("meta",{itemProp:"position",content:String(i+1)})]})}function p(){const e=(0,a.s1)(),s=(0,r.Ns)();return e?(0,d.jsx)("nav",{className:(0,n.Z)(i.k.docs.docBreadcrumbs,b.breadcrumbsContainer),"aria-label":(0,c.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,d.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[s&&(0,d.jsx)(h,{}),e.map(((s,t)=>{const n=t===e.length-1,i="category"===s.type&&s.linkUnlisted?void 0:s.href;return(0,d.jsx)(v,{active:n,index:t,addMicrodata:!!i,children:(0,d.jsx)(x,{href:i,isLast:n,children:s.label})},t)}))]})}):null}},4228:(e,s,t)=>{t.r(s),t.d(s,{default:()=>I});t(7294);var n=t(1944),i=t(3438),a=t(4996),r=t(512),l=t(9960),c=t(3919),o=t(5999),d=t(7955);const m={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=t(5893);function h(e){let{href:s,children:t}=e;return(0,u.jsx)(l.Z,{href:s,className:(0,r.Z)("card padding--lg",m.cardContainer),children:t})}function b(e){let{href:s,icon:t,title:n,description:i}=e;return(0,u.jsxs)(h,{href:s,children:[(0,u.jsxs)(d.Z,{as:"h2",className:(0,r.Z)("text--truncate",m.cardTitle),title:n,children:[t," ",n]}),i&&(0,u.jsx)("p",{className:(0,r.Z)("text--truncate",m.cardDescription),title:i,children:i})]})}function x(e){let{item:s}=e;const t=(0,i.LM)(s);return t?(0,u.jsx)(b,{href:t,icon:"\ud83d\uddc3\ufe0f",title:s.label,description:s.description??(0,o.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:s.items.length})}):null}function v(e){let{item:s}=e;const t=(0,c.Z)(s.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",n=(0,i.xz)(s.docId??void 0);return(0,u.jsx)(b,{href:s.href,icon:t,title:s.label,description:s.description??n?.description})}function p(e){let{item:s}=e;switch(s.type){case"link":return(0,u.jsx)(v,{item:s});case"category":return(0,u.jsx)(x,{item:s});default:throw new Error(`unknown item type ${JSON.stringify(s)}`)}}function g(e){let{className:s}=e;const t=(0,i.jA)();return(0,u.jsx)(j,{items:t.items,className:s})}function j(e){const{items:s,className:t}=e;if(!s)return(0,u.jsx)(g,{...e});const n=(0,i.MN)(s);return(0,u.jsx)("section",{className:(0,r.Z)("row",t),children:n.map(((e,s)=>(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(p,{item:e})},s)))})}var f=t(4966),N=t(3120),Z=t(4364),_=t(1310);const k={generatedIndexPage:"generatedIndexPage_vN6x",list:"list_eTzJ",title:"title_kItE"};function L(e){let{categoryGeneratedIndex:s}=e;return(0,u.jsx)(n.d,{title:s.title,description:s.description,keywords:s.keywords,image:(0,a.Z)(s.image)})}function T(e){let{categoryGeneratedIndex:s}=e;const t=(0,i.jA)();return(0,u.jsxs)("div",{className:k.generatedIndexPage,children:[(0,u.jsx)(N.Z,{}),(0,u.jsx)(_.Z,{}),(0,u.jsx)(Z.Z,{}),(0,u.jsxs)("header",{children:[(0,u.jsx)(d.Z,{as:"h1",className:k.title,children:s.title}),s.description&&(0,u.jsx)("p",{children:s.description})]}),(0,u.jsx)("article",{className:"margin-top--lg",children:(0,u.jsx)(j,{items:t.items,className:k.list})}),(0,u.jsx)("footer",{className:"margin-top--lg",children:(0,u.jsx)(f.Z,{previous:s.navigation.previous,next:s.navigation.next})})]})}function I(e){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(L,{...e}),(0,u.jsx)(T,{...e})]})}},4966:(e,s,t)=>{t.d(s,{Z:()=>c});t(7294);var n=t(5999),i=t(512),a=t(9960),r=t(5893);function l(e){const{permalink:s,title:t,subLabel:n,isNext:l}=e;return(0,r.jsxs)(a.Z,{className:(0,i.Z)("pagination-nav__link",l?"pagination-nav__link--next":"pagination-nav__link--prev"),to:s,children:[n&&(0,r.jsx)("div",{className:"pagination-nav__sublabel",children:n}),(0,r.jsx)("div",{className:"pagination-nav__label",children:t})]})}function c(e){const{previous:s,next:t}=e;return(0,r.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,n.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[s&&(0,r.jsx)(l,{...s,subLabel:(0,r.jsx)(n.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),t&&(0,r.jsx)(l,{...t,subLabel:(0,r.jsx)(n.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},4364:(e,s,t)=>{t.d(s,{Z:()=>c});t(7294);var n=t(512),i=t(5999),a=t(5281),r=t(4477),l=t(5893);function c(e){let{className:s}=e;const t=(0,r.E)();return t.badge?(0,l.jsx)("span",{className:(0,n.Z)(s,a.k.docs.docVersionBadge,"badge badge--secondary"),children:(0,l.jsx)(i.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:t.label},children:"Version: {versionLabel}"})}):null}},3120:(e,s,t)=>{t.d(s,{Z:()=>v});t(7294);var n=t(512),i=t(2263),a=t(9960),r=t(5999),l=t(143),c=t(5281),o=t(373),d=t(4477),m=t(5893);const u={unreleased:function(e){let{siteTitle:s,versionMetadata:t}=e;return(0,m.jsx)(r.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:s,versionLabel:(0,m.jsx)("b",{children:t.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let{siteTitle:s,versionMetadata:t}=e;return(0,m.jsx)(r.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:s,versionLabel:(0,m.jsx)("b",{children:t.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function h(e){const s=u[e.versionMetadata.banner];return(0,m.jsx)(s,{...e})}function b(e){let{versionLabel:s,to:t,onClick:n}=e;return(0,m.jsx)(r.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:s,latestVersionLink:(0,m.jsx)("b",{children:(0,m.jsx)(a.Z,{to:t,onClick:n,children:(0,m.jsx)(r.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function x(e){let{className:s,versionMetadata:t}=e;const{siteConfig:{title:a}}=(0,i.Z)(),{pluginId:r}=(0,l.gA)({failfast:!0}),{savePreferredVersionName:d}=(0,o.J)(r),{latestDocSuggestion:u,latestVersionSuggestion:x}=(0,l.Jo)(r),v=u??(p=x).docs.find((e=>e.id===p.mainDocId));var p;return(0,m.jsxs)("div",{className:(0,n.Z)(s,c.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,m.jsx)("div",{children:(0,m.jsx)(h,{siteTitle:a,versionMetadata:t})}),(0,m.jsx)("div",{className:"margin-top--md",children:(0,m.jsx)(b,{versionLabel:x.label,to:v.path,onClick:()=>d(x.name)})})]})}function v(e){let{className:s}=e;const t=(0,d.E)();return t.banner?(0,m.jsx)(x,{className:s,versionMetadata:t}):null}}}]);
\ No newline at end of file
diff --git a/assets/js/14eb3368.47d9d6be.js b/assets/js/14eb3368.47d9d6be.js
new file mode 100644
index 0000000..5ae7407
--- /dev/null
+++ b/assets/js/14eb3368.47d9d6be.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[9817],{1310:(e,s,t)=>{t.d(s,{Z:()=>p});t(7294);var n=t(512),i=t(5281),a=t(3438),r=t(8596),l=t(9960),c=t(5999),o=t(4996),d=t(5893);function m(e){return(0,d.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,d.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const u={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function h(){const e=(0,o.Z)("/");return(0,d.jsx)("li",{className:"breadcrumbs__item",children:(0,d.jsx)(l.Z,{"aria-label":(0,c.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,d.jsx)(m,{className:u.breadcrumbHomeIcon})})})}const b={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function x(e){let{children:s,href:t,isLast:n}=e;const i="breadcrumbs__link";return n?(0,d.jsx)("span",{className:i,itemProp:"name",children:s}):t?(0,d.jsx)(l.Z,{className:i,href:t,itemProp:"item",children:(0,d.jsx)("span",{itemProp:"name",children:s})}):(0,d.jsx)("span",{className:i,children:s})}function v(e){let{children:s,active:t,index:i,addMicrodata:a}=e;return(0,d.jsxs)("li",{...a&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,n.Z)("breadcrumbs__item",{"breadcrumbs__item--active":t}),children:[s,(0,d.jsx)("meta",{itemProp:"position",content:String(i+1)})]})}function p(){const e=(0,a.s1)(),s=(0,r.Ns)();return e?(0,d.jsx)("nav",{className:(0,n.Z)(i.k.docs.docBreadcrumbs,b.breadcrumbsContainer),"aria-label":(0,c.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,d.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[s&&(0,d.jsx)(h,{}),e.map(((s,t)=>{const n=t===e.length-1,i="category"===s.type&&s.linkUnlisted?void 0:s.href;return(0,d.jsx)(v,{active:n,index:t,addMicrodata:!!i,children:(0,d.jsx)(x,{href:i,isLast:n,children:s.label})},t)}))]})}):null}},4228:(e,s,t)=>{t.r(s),t.d(s,{default:()=>I});t(7294);var n=t(1944),i=t(3438),a=t(4996),r=t(512),l=t(9960),c=t(3919),o=t(5999),d=t(7955);const m={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=t(5893);function h(e){let{href:s,children:t}=e;return(0,u.jsx)(l.Z,{href:s,className:(0,r.Z)("card padding--lg",m.cardContainer),children:t})}function b(e){let{href:s,icon:t,title:n,description:i}=e;return(0,u.jsxs)(h,{href:s,children:[(0,u.jsxs)(d.Z,{as:"h2",className:(0,r.Z)("text--truncate",m.cardTitle),title:n,children:[t," ",n]}),i&&(0,u.jsx)("p",{className:(0,r.Z)("text--truncate",m.cardDescription),title:i,children:i})]})}function x(e){let{item:s}=e;const t=(0,i.LM)(s);return t?(0,u.jsx)(b,{href:t,icon:"\ud83d\uddc3\ufe0f",title:s.label,description:s.description??(0,o.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:s.items.length})}):null}function v(e){let{item:s}=e;const t=(0,c.Z)(s.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",n=(0,i.xz)(s.docId??void 0);return(0,u.jsx)(b,{href:s.href,icon:t,title:s.label,description:s.description??n?.description})}function p(e){let{item:s}=e;switch(s.type){case"link":return(0,u.jsx)(v,{item:s});case"category":return(0,u.jsx)(x,{item:s});default:throw new Error(`unknown item type ${JSON.stringify(s)}`)}}function g(e){let{className:s}=e;const t=(0,i.jA)();return(0,u.jsx)(j,{items:t.items,className:s})}function j(e){const{items:s,className:t}=e;if(!s)return(0,u.jsx)(g,{...e});const n=(0,i.MN)(s);return(0,u.jsx)("section",{className:(0,r.Z)("row",t),children:n.map(((e,s)=>(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(p,{item:e})},s)))})}var f=t(4966),N=t(3120),Z=t(4364),_=t(1310);const k={generatedIndexPage:"generatedIndexPage_vN6x",list:"list_eTzJ",title:"title_kItE"};function L(e){let{categoryGeneratedIndex:s}=e;return(0,u.jsx)(n.d,{title:s.title,description:s.description,keywords:s.keywords,image:(0,a.Z)(s.image)})}function T(e){let{categoryGeneratedIndex:s}=e;const t=(0,i.jA)();return(0,u.jsxs)("div",{className:k.generatedIndexPage,children:[(0,u.jsx)(N.Z,{}),(0,u.jsx)(_.Z,{}),(0,u.jsx)(Z.Z,{}),(0,u.jsxs)("header",{children:[(0,u.jsx)(d.Z,{as:"h1",className:k.title,children:s.title}),s.description&&(0,u.jsx)("p",{children:s.description})]}),(0,u.jsx)("article",{className:"margin-top--lg",children:(0,u.jsx)(j,{items:t.items,className:k.list})}),(0,u.jsx)("footer",{className:"margin-top--lg",children:(0,u.jsx)(f.Z,{previous:s.navigation.previous,next:s.navigation.next})})]})}function I(e){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(L,{...e}),(0,u.jsx)(T,{...e})]})}},4966:(e,s,t)=>{t.d(s,{Z:()=>c});t(7294);var n=t(5999),i=t(512),a=t(9960),r=t(5893);function l(e){const{permalink:s,title:t,subLabel:n,isNext:l}=e;return(0,r.jsxs)(a.Z,{className:(0,i.Z)("pagination-nav__link",l?"pagination-nav__link--next":"pagination-nav__link--prev"),to:s,children:[n&&(0,r.jsx)("div",{className:"pagination-nav__sublabel",children:n}),(0,r.jsx)("div",{className:"pagination-nav__label",children:t})]})}function c(e){const{previous:s,next:t}=e;return(0,r.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,n.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[s&&(0,r.jsx)(l,{...s,subLabel:(0,r.jsx)(n.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),t&&(0,r.jsx)(l,{...t,subLabel:(0,r.jsx)(n.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},4364:(e,s,t)=>{t.d(s,{Z:()=>c});t(7294);var n=t(512),i=t(5999),a=t(5281),r=t(4477),l=t(5893);function c(e){let{className:s}=e;const t=(0,r.E)();return t.badge?(0,l.jsx)("span",{className:(0,n.Z)(s,a.k.docs.docVersionBadge,"badge badge--secondary"),children:(0,l.jsx)(i.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:t.label},children:"Version: {versionLabel}"})}):null}},3120:(e,s,t)=>{t.d(s,{Z:()=>v});t(7294);var n=t(512),i=t(2263),a=t(9960),r=t(5999),l=t(143),c=t(5281),o=t(373),d=t(4477),m=t(5893);const u={unreleased:function(e){let{siteTitle:s,versionMetadata:t}=e;return(0,m.jsx)(r.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:s,versionLabel:(0,m.jsx)("b",{children:t.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let{siteTitle:s,versionMetadata:t}=e;return(0,m.jsx)(r.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:s,versionLabel:(0,m.jsx)("b",{children:t.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function h(e){const s=u[e.versionMetadata.banner];return(0,m.jsx)(s,{...e})}function b(e){let{versionLabel:s,to:t,onClick:n}=e;return(0,m.jsx)(r.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:s,latestVersionLink:(0,m.jsx)("b",{children:(0,m.jsx)(a.Z,{to:t,onClick:n,children:(0,m.jsx)(r.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function x(e){let{className:s,versionMetadata:t}=e;const{siteConfig:{title:a}}=(0,i.Z)(),{pluginId:r}=(0,l.gA)({failfast:!0}),{savePreferredVersionName:d}=(0,o.J)(r),{latestDocSuggestion:u,latestVersionSuggestion:x}=(0,l.Jo)(r),v=u??(p=x).docs.find((e=>e.id===p.mainDocId));var p;return(0,m.jsxs)("div",{className:(0,n.Z)(s,c.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,m.jsx)("div",{children:(0,m.jsx)(h,{siteTitle:a,versionMetadata:t})}),(0,m.jsx)("div",{className:"margin-top--md",children:(0,m.jsx)(b,{versionLabel:x.label,to:v.path,onClick:()=>d(x.name)})})]})}function v(e){let{className:s}=e;const t=(0,d.E)();return t.banner?(0,m.jsx)(x,{className:s,versionMetadata:t}):null}}}]);
\ No newline at end of file
diff --git a/assets/js/1772.09b2fc95.js b/assets/js/1772.09b2fc95.js
new file mode 100644
index 0000000..4c0c77b
--- /dev/null
+++ b/assets/js/1772.09b2fc95.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[1772],{5658:(e,t,s)=>{s.d(t,{Z:()=>r});s(7294);var i=s(512),o=s(5999),n=s(7955),l=s(5893);function r(e){let{className:t}=e;return(0,l.jsx)("main",{className:(0,i.Z)("container margin-vert--xl",t),children:(0,l.jsx)("div",{className:"row",children:(0,l.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,l.jsx)(n.Z,{as:"h1",className:"hero__title",children:(0,l.jsx)(o.Z,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,l.jsx)("p",{children:(0,l.jsx)(o.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,l.jsx)("p",{children:(0,l.jsx)(o.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},1772:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});s(7294);var i=s(5999),o=s(1944),n=s(6040),l=s(5658),r=s(5893);function a(){const e=(0,i.I)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.d,{title:e}),(0,r.jsx)(n.Z,{children:(0,r.jsx)(l.Z,{})})]})}}}]);
\ No newline at end of file
diff --git a/assets/js/17896441.96ac1424.js b/assets/js/17896441.96ac1424.js
new file mode 100644
index 0000000..4760b1b
--- /dev/null
+++ b/assets/js/17896441.96ac1424.js
@@ -0,0 +1 @@
+(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[7918],{1310:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});n(7294);var s=n(512),a=n(5281),o=n(3438),i=n(8596),l=n(9960),c=n(5999),r=n(4996),d=n(5893);function u(e){return(0,d.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,d.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const m={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function h(){const e=(0,r.Z)("/");return(0,d.jsx)("li",{className:"breadcrumbs__item",children:(0,d.jsx)(l.Z,{"aria-label":(0,c.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,d.jsx)(u,{className:m.breadcrumbHomeIcon})})})}const p={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function f(e){let{children:t,href:n,isLast:s}=e;const a="breadcrumbs__link";return s?(0,d.jsx)("span",{className:a,itemProp:"name",children:t}):n?(0,d.jsx)(l.Z,{className:a,href:n,itemProp:"item",children:(0,d.jsx)("span",{itemProp:"name",children:t})}):(0,d.jsx)("span",{className:a,children:t})}function x(e){let{children:t,active:n,index:a,addMicrodata:o}=e;return(0,d.jsxs)("li",{...o&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,s.Z)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:[t,(0,d.jsx)("meta",{itemProp:"position",content:String(a+1)})]})}function b(){const e=(0,o.s1)(),t=(0,i.Ns)();return e?(0,d.jsx)("nav",{className:(0,s.Z)(a.k.docs.docBreadcrumbs,p.breadcrumbsContainer),"aria-label":(0,c.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,d.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,d.jsx)(h,{}),e.map(((t,n)=>{const s=n===e.length-1,a="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,d.jsx)(x,{active:s,index:n,addMicrodata:!!a,children:(0,d.jsx)(f,{href:a,isLast:s,children:t.label})},n)}))]})}):null}},8688:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>yt});var s=n(7294),a=n(1944),o=n(902),i=n(5893);const l=s.createContext(null);function c(e){let{children:t,content:n}=e;const a=function(e){return(0,s.useMemo)((()=>({metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc})),[e])}(n);return(0,i.jsx)(l.Provider,{value:a,children:t})}function r(){const e=(0,s.useContext)(l);if(null===e)throw new o.i6("DocProvider");return e}function d(){const{metadata:e,frontMatter:t,assets:n}=r();return(0,i.jsx)(a.d,{title:e.title,description:e.description,keywords:t.keywords,image:n.image??t.image})}var u=n(512),m=n(7524),h=n(4966);function p(){const{metadata:e}=r();return(0,i.jsx)(h.Z,{previous:e.previous,next:e.next})}var f=n(3120),x=n(4364),b=n(5281),g=n(5999);function j(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:n}=e;return(0,i.jsx)(g.Z,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,i.jsx)("b",{children:(0,i.jsx)("time",{dateTime:new Date(1e3*t).toISOString(),children:n})})},children:" on {date}"})}function v(e){let{lastUpdatedBy:t}=e;return(0,i.jsx)(g.Z,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,i.jsx)("b",{children:t})},children:" by {user}"})}function N(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:n,lastUpdatedBy:s}=e;return(0,i.jsxs)("span",{className:b.k.common.lastUpdated,children:[(0,i.jsx)(g.Z,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t&&n?(0,i.jsx)(j,{lastUpdatedAt:t,formattedLastUpdatedAt:n}):"",byUser:s?(0,i.jsx)(v,{lastUpdatedBy:s}):""},children:"Last updated{atDate}{byUser}"}),!1]})}var C=n(9960);const k={iconEdit:"iconEdit_Z9Sw"};function L(e){let{className:t,...n}=e;return(0,i.jsx)("svg",{fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,u.Z)(k.iconEdit,t),"aria-hidden":"true",...n,children:(0,i.jsx)("g",{children:(0,i.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})})}function y(e){let{editUrl:t}=e;return(0,i.jsxs)(C.Z,{to:t,className:b.k.common.editThisPage,children:[(0,i.jsx)(L,{}),(0,i.jsx)(g.Z,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}const _={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function w(e){let{permalink:t,label:n,count:s}=e;return(0,i.jsxs)(C.Z,{href:t,className:(0,u.Z)(_.tag,s?_.tagWithCount:_.tagRegular),children:[n,s&&(0,i.jsx)("span",{children:s})]})}const B={tags:"tags_jXut",tag:"tag_QGVx"};function Z(e){let{tags:t}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("b",{children:(0,i.jsx)(g.Z,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,i.jsx)("ul",{className:(0,u.Z)(B.tags,"padding--none","margin-left--sm"),children:t.map((e=>{let{label:t,permalink:n}=e;return(0,i.jsx)("li",{className:B.tag,children:(0,i.jsx)(w,{label:t,permalink:n})},n)}))})]})}const T={lastUpdated:"lastUpdated_vwxv"};function E(e){return(0,i.jsx)("div",{className:(0,u.Z)(b.k.docs.docFooterTagsRow,"row margin-bottom--sm"),children:(0,i.jsx)("div",{className:"col",children:(0,i.jsx)(Z,{...e})})})}function H(e){let{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:s,formattedLastUpdatedAt:a}=e;return(0,i.jsxs)("div",{className:(0,u.Z)(b.k.docs.docFooterEditMetaRow,"row"),children:[(0,i.jsx)("div",{className:"col",children:t&&(0,i.jsx)(y,{editUrl:t})}),(0,i.jsx)("div",{className:(0,u.Z)("col",T.lastUpdated),children:(n||s)&&(0,i.jsx)(N,{lastUpdatedAt:n,formattedLastUpdatedAt:a,lastUpdatedBy:s})})]})}function A(){const{metadata:e}=r(),{editUrl:t,lastUpdatedAt:n,formattedLastUpdatedAt:s,lastUpdatedBy:a,tags:o}=e,l=o.length>0,c=!!(t||n||a);return l||c?(0,i.jsxs)("footer",{className:(0,u.Z)(b.k.docs.docFooter,"docusaurus-mt-lg"),children:[l&&(0,i.jsx)(E,{tags:o}),c&&(0,i.jsx)(H,{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:a,formattedLastUpdatedAt:s})]}):null}var I=n(6043),M=n(6668);function S(e){const t=e.map((e=>({...e,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);t.forEach(((e,t)=>{const s=n.slice(2,e.level);e.parentIndex=Math.max(...s),n[e.level]=t}));const s=[];return t.forEach((e=>{const{parentIndex:n,...a}=e;n>=0?t[n].children.push(a):s.push(a)})),s}function U(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:s}=e;return t.flatMap((e=>{const t=U({toc:e.children,minHeadingLevel:n,maxHeadingLevel:s});return function(e){return e.level>=n&&e.level<=s}(e)?[{...e,children:t}]:t}))}function z(e){const t=e.getBoundingClientRect();return t.top===t.bottom?z(e.parentNode):t}function V(e,t){let{anchorTopOffset:n}=t;const s=e.find((e=>z(e).top>=n));if(s){return function(e){return e.top>0&&e.bottom["'])(?.*?)\1/,ue=/\{(? [\d,-]+)\}/,me={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"},lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""}};function he(e,t){const n=e.map((e=>{const{start:n,end:s}=me[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${s})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function pe(e,t){let n=e.replace(/\n$/,"");const{language:s,magicComments:a,metastring:o}=t;if(o&&ue.test(o)){const e=o.match(ue).groups.range;if(0===a.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${o}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=a[0].className,s=re()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(s),code:n}}if(void 0===s)return{lineClassNames:{},code:n};const i=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return he(["js","jsBlock"],t);case"jsx":case"tsx":return he(["js","jsBlock","jsx"],t);case"html":return he(["js","jsBlock","html"],t);case"python":case"py":case"bash":return he(["bash"],t);case"markdown":case"md":return he(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return he(["tex"],t);case"lua":case"haskell":case"sql":return he(["lua"],t);case"wasm":return he(["wasm"],t);default:return he(Object.keys(me).filter((e=>!["lua","wasm","tex","latex","matlab"].includes(e))),t)}}(s,a),l=n.split("\n"),c=Object.fromEntries(a.map((e=>[e.className,{start:0,range:""}]))),r=Object.fromEntries(a.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),d=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),u=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let h=0;h void 0!==e));r[t]?c[r[t]].range+=`${h},`:d[t]?c[d[t]].start=h:u[t]&&(c[u[t]].range+=`${c[u[t]].start}-${h-1},`),l.splice(h,1)}n=l.join("\n");const m={};return Object.entries(c).forEach((e=>{let[t,{range:n}]=e;re()(n).forEach((e=>{m[e]??=[],m[e].push(t)}))})),{lineClassNames:m,code:n}}const fe={codeBlockContainer:"codeBlockContainer_Ckt0"};function xe(e){let{as:t,...n}=e;const s=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[s,a]=e;const o=t[s];o&&"string"==typeof a&&(n[o]=a)})),n}(le());return(0,i.jsx)(t,{...n,style:s,className:(0,u.Z)(n.className,fe.codeBlockContainer,b.k.common.codeBlock)})}const be={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function ge(e){let{children:t,className:n}=e;return(0,i.jsx)(xe,{as:"pre",tabIndex:0,className:(0,u.Z)(be.codeBlockStandalone,"thin-scrollbar",n),children:(0,i.jsx)("code",{className:be.codeBlockLines,children:t})})}const je={attributes:!0,characterData:!0,childList:!0,subtree:!0};function ve(e,t){const[n,a]=(0,s.useState)(),i=(0,s.useCallback)((()=>{a(e.current?.closest("[role=tabpanel][hidden]"))}),[e,a]);(0,s.useEffect)((()=>{i()}),[i]),function(e,t,n){void 0===n&&(n=je);const a=(0,o.zX)(t),i=(0,o.Ql)(n);(0,s.useEffect)((()=>{const t=new MutationObserver(a);return e&&t.observe(e,i),()=>t.disconnect()}),[e,a,i])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),i())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var Ne=n(2573);const Ce={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function ke(e){let{line:t,classNames:n,showLineNumbers:s,getLineProps:a,getTokenProps:o}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const l=a({line:t,className:(0,u.Z)(n,s&&Ce.codeLine)}),c=t.map(((e,t)=>(0,i.jsx)("span",{...o({token:e,key:t})},t)));return(0,i.jsxs)("span",{...l,children:[s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:Ce.codeLineNumber}),(0,i.jsx)("span",{className:Ce.codeLineContent,children:c})]}):c,(0,i.jsx)("br",{})]})}function Le(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function ye(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const _e={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function we(e){let{code:t,className:n}=e;const[a,o]=(0,s.useState)(!1),l=(0,s.useRef)(void 0),c=(0,s.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const s=document.createElement("textarea"),a=document.activeElement;s.value=e,s.setAttribute("readonly",""),s.style.contain="strict",s.style.position="absolute",s.style.left="-9999px",s.style.fontSize="12pt";const o=document.getSelection(),i=o.rangeCount>0&&o.getRangeAt(0);n.append(s),s.select(),s.selectionStart=0,s.selectionEnd=e.length;let l=!1;try{l=document.execCommand("copy")}catch{}s.remove(),i&&(o.removeAllRanges(),o.addRange(i)),a&&a.focus()}(t),o(!0),l.current=window.setTimeout((()=>{o(!1)}),1e3)}),[t]);return(0,s.useEffect)((()=>()=>window.clearTimeout(l.current)),[]),(0,i.jsx)("button",{type:"button","aria-label":a?(0,g.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,g.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,g.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.Z)("clean-btn",n,_e.copyButton,a&&_e.copyButtonCopied),onClick:c,children:(0,i.jsxs)("span",{className:_e.copyButtonIcons,"aria-hidden":"true",children:[(0,i.jsx)(Le,{className:_e.copyButtonIcon}),(0,i.jsx)(ye,{className:_e.copyButtonSuccessIcon})]})})}function Be(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const Ze={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function Te(e){let{className:t,onClick:n,isEnabled:s}=e;const a=(0,g.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,i.jsx)("button",{type:"button",onClick:n,className:(0,u.Z)("clean-btn",t,s&&Ze.wordWrapButtonEnabled),"aria-label":a,title:a,children:(0,i.jsx)(Be,{className:Ze.wordWrapButtonIcon,"aria-hidden":"true"})})}function Ee(e){let{children:t,className:n="",metastring:a,title:o,showLineNumbers:l,language:c}=e;const{prism:{defaultLanguage:r,magicComments:d}}=(0,M.L)(),m=function(e){return e?.toLowerCase()}(c??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??r),h=le(),p=function(){const[e,t]=(0,s.useState)(!1),[n,a]=(0,s.useState)(!1),o=(0,s.useRef)(null),i=(0,s.useCallback)((()=>{const n=o.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[o,e]),l=(0,s.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=o.current,n=e>t||o.current.querySelector("code").hasAttribute("style");a(n)}),[o]);return ve(o,l),(0,s.useEffect)((()=>{l()}),[e,l]),(0,s.useEffect)((()=>(window.addEventListener("resize",l,{passive:!0}),()=>{window.removeEventListener("resize",l)})),[l]),{codeBlockRef:o,isEnabled:e,isCodeScrollable:n,toggle:i}}(),f=function(e){return e?.match(de)?.groups.title??""}(a)||o,{lineClassNames:x,code:b}=pe(t,{metastring:a,language:m,magicComments:d}),g=l??function(e){return Boolean(e?.includes("showLineNumbers"))}(a);return(0,i.jsxs)(xe,{as:"div",className:(0,u.Z)(n,m&&!n.includes(`language-${m}`)&&`language-${m}`),children:[f&&(0,i.jsx)("div",{className:be.codeBlockTitle,children:f}),(0,i.jsxs)("div",{className:be.codeBlockContent,children:[(0,i.jsx)(Ne.y$,{theme:h,code:b,language:m??"text",children:e=>{let{className:t,style:n,tokens:s,getLineProps:a,getTokenProps:o}=e;return(0,i.jsx)("pre",{tabIndex:0,ref:p.codeBlockRef,className:(0,u.Z)(t,be.codeBlock,"thin-scrollbar"),style:n,children:(0,i.jsx)("code",{className:(0,u.Z)(be.codeBlockLines,g&&be.codeBlockLinesWithNumbering),children:s.map(((e,t)=>(0,i.jsx)(ke,{line:e,getLineProps:a,getTokenProps:o,classNames:x[t],showLineNumbers:g},t)))})})}}),(0,i.jsxs)("div",{className:be.buttonGroup,children:[(p.isEnabled||p.isCodeScrollable)&&(0,i.jsx)(Te,{className:be.codeButton,onClick:()=>p.toggle(),isEnabled:p.isEnabled}),(0,i.jsx)(we,{className:be.codeButton,code:b})]})]})]})}function He(e){let{children:t,...n}=e;const a=(0,oe.Z)(),o=function(e){return s.Children.toArray(e).some((e=>(0,s.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),l="string"==typeof o?Ee:ge;return(0,i.jsx)(l,{...n,children:o},String(a))}const Ae={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function Ie(e){return!!e&&("SUMMARY"===e.tagName||Ie(e.parentElement))}function Me(e,t){return!!e&&(e===t||Me(e.parentElement,t))}function Se(e){let{summary:t,children:n,...a}=e;const o=(0,oe.Z)(),l=(0,s.useRef)(null),{collapsed:c,setCollapsed:r}=(0,I.u)({initialState:!a.open}),[d,m]=(0,s.useState)(a.open),h=s.isValidElement(t)?t:(0,i.jsx)("summary",{children:t??"Details"});return(0,i.jsxs)("details",{...a,ref:l,open:d,"data-collapsed":c,className:(0,u.Z)(Ae.details,o&&Ae.isBrowser,a.className),onMouseDown:e=>{Ie(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;Ie(t)&&Me(t,l.current)&&(e.preventDefault(),c?(r(!1),m(!0)):r(!0))},children:[h,(0,i.jsx)(I.z,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{r(e),m(!e)},children:(0,i.jsx)("div",{className:Ae.collapsibleContent,children:n})})]})}const Ue={details:"details_b_Ee"},ze="alert alert--info";function Ve(e){let{...t}=e;return(0,i.jsx)(Se,{...t,className:(0,u.Z)(ze,Ue.details,t.className)})}function Re(e){const t=s.Children.toArray(e.children),n=t.find((e=>s.isValidElement(e)&&"summary"===e.type)),a=(0,i.jsx)(i.Fragment,{children:t.filter((e=>e!==n))});return(0,i.jsx)(Ve,{...e,summary:n,children:a})}function Oe(e){return(0,i.jsx)(ne.Z,{...e})}const Pe={containsTaskList:"containsTaskList_mC6p"};function $e(e){if(void 0!==e)return(0,u.Z)(e,e?.includes("contains-task-list")&&Pe.containsTaskList)}const De={img:"img_ev3q"};function We(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=s.Children.toArray(e),n=t.find((e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),a=t.filter((e=>e!==n)),o=n?.props.children;return{mdxAdmonitionTitle:o,rest:a.length>0?(0,i.jsx)(i.Fragment,{children:a}):null}}(e.children),a=e.title??t;return{...e,...a&&{title:a},children:n}}const Fe={admonition:"admonition_xJq3",admonitionHeading:"admonitionHeading_Gvgb",admonitionIcon:"admonitionIcon_Rf37",admonitionContent:"admonitionContent_BuS1"};function qe(e){let{type:t,className:n,children:s}=e;return(0,i.jsx)("div",{className:(0,u.Z)(b.k.common.admonition,b.k.common.admonitionType(t),Fe.admonition,n),children:s})}function Ge(e){let{icon:t,title:n}=e;return(0,i.jsxs)("div",{className:Fe.admonitionHeading,children:[(0,i.jsx)("span",{className:Fe.admonitionIcon,children:t}),n]})}function Je(e){let{children:t}=e;return t?(0,i.jsx)("div",{className:Fe.admonitionContent,children:t}):null}function Ye(e){const{type:t,icon:n,title:s,children:a,className:o}=e;return(0,i.jsxs)(qe,{type:t,className:o,children:[(0,i.jsx)(Ge,{title:s,icon:n}),(0,i.jsx)(Je,{children:a})]})}function Qe(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const Xe={icon:(0,i.jsx)(Qe,{}),title:(0,i.jsx)(g.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function Ke(e){return(0,i.jsx)(Ye,{...Xe,...e,className:(0,u.Z)("alert alert--secondary",e.className),children:e.children})}function et(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const tt={icon:(0,i.jsx)(et,{}),title:(0,i.jsx)(g.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function nt(e){return(0,i.jsx)(Ye,{...tt,...e,className:(0,u.Z)("alert alert--success",e.className),children:e.children})}function st(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const at={icon:(0,i.jsx)(st,{}),title:(0,i.jsx)(g.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function ot(e){return(0,i.jsx)(Ye,{...at,...e,className:(0,u.Z)("alert alert--info",e.className),children:e.children})}function it(e){return(0,i.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const lt={icon:(0,i.jsx)(it,{}),title:(0,i.jsx)(g.Z,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function ct(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const rt={icon:(0,i.jsx)(ct,{}),title:(0,i.jsx)(g.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const dt={icon:(0,i.jsx)(it,{}),title:(0,i.jsx)(g.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const ut={...{note:Ke,tip:nt,info:ot,warning:function(e){return(0,i.jsx)(Ye,{...lt,...e,className:(0,u.Z)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,i.jsx)(Ye,{...rt,...e,className:(0,u.Z)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,i.jsx)(Ke,{title:"secondary",...e}),important:e=>(0,i.jsx)(ot,{title:"important",...e}),success:e=>(0,i.jsx)(nt,{title:"success",...e}),caution:function(e){return(0,i.jsx)(Ye,{...dt,...e,className:(0,u.Z)("alert alert--warning",e.className),children:e.children})}}};function mt(e){const t=We(e),n=(s=t.type,ut[s]||(console.warn(`No admonition component found for admonition type "${s}". Using Info as fallback.`),ut.info));var s;return(0,i.jsx)(n,{...t})}var ht=n(1875);const pt={Head:ae.Z,details:Re,Details:Re,code:function(e){return s.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")))?(0,i.jsx)("code",{...e}):(0,i.jsx)(He,{...e})},a:function(e){return(0,i.jsx)(C.Z,{...e})},pre:function(e){return(0,i.jsx)(i.Fragment,{children:e.children})},ul:function(e){return(0,i.jsx)("ul",{...e,className:$e(e.className)})},img:function(e){return(0,i.jsx)("img",{loading:"lazy",...e,className:(t=e.className,(0,u.Z)(t,De.img))});var t},h1:e=>(0,i.jsx)(Oe,{as:"h1",...e}),h2:e=>(0,i.jsx)(Oe,{as:"h2",...e}),h3:e=>(0,i.jsx)(Oe,{as:"h3",...e}),h4:e=>(0,i.jsx)(Oe,{as:"h4",...e}),h5:e=>(0,i.jsx)(Oe,{as:"h5",...e}),h6:e=>(0,i.jsx)(Oe,{as:"h6",...e}),admonition:mt,mermaid:ht.Z};function ft(e){let{children:t}=e;return(0,i.jsx)(se.Z,{components:pt,children:t})}function xt(e){let{children:t}=e;const n=function(){const{metadata:e,frontMatter:t,contentTitle:n}=r();return t.hide_title||void 0!==n?null:e.title}();return(0,i.jsxs)("div",{className:(0,u.Z)(b.k.docs.docMarkdown,"markdown"),children:[n&&(0,i.jsx)("header",{children:(0,i.jsx)(ne.Z,{as:"h1",children:n})}),(0,i.jsx)(ft,{children:t})]})}var bt=n(1310);function gt(){return(0,i.jsx)(g.Z,{id:"theme.unlistedContent.title",description:"The unlisted content banner title",children:"Unlisted page"})}function jt(){return(0,i.jsx)(g.Z,{id:"theme.unlistedContent.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function vt(){return(0,i.jsx)(ae.Z,{children:(0,i.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function Nt(e){let{className:t}=e;return(0,i.jsx)(mt,{type:"caution",title:(0,i.jsx)(gt,{}),className:(0,u.Z)(t,b.k.common.unlistedBanner),children:(0,i.jsx)(jt,{})})}function Ct(e){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(vt,{}),(0,i.jsx)(Nt,{...e})]})}const kt={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function Lt(e){let{children:t}=e;const n=function(){const{frontMatter:e,toc:t}=r(),n=(0,m.i)(),s=e.hide_table_of_contents,a=!s&&t.length>0;return{hidden:s,mobile:a?(0,i.jsx)(Y,{}):void 0,desktop:!a||"desktop"!==n&&"ssr"!==n?void 0:(0,i.jsx)(te,{})}}(),{metadata:{unlisted:s}}=r();return(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:(0,u.Z)("col",!n.hidden&&kt.docItemCol),children:[s&&(0,i.jsx)(Ct,{}),(0,i.jsx)(f.Z,{}),(0,i.jsxs)("div",{className:kt.docItemContainer,children:[(0,i.jsxs)("article",{children:[(0,i.jsx)(bt.Z,{}),(0,i.jsx)(x.Z,{}),n.mobile,(0,i.jsx)(xt,{children:t}),(0,i.jsx)(A,{})]}),(0,i.jsx)(p,{})]})]}),n.desktop&&(0,i.jsx)("div",{className:"col col--3",children:n.desktop})]})}function yt(e){const t=`docs-doc-id-${e.content.metadata.id}`,n=e.content;return(0,i.jsx)(c,{content:e.content,children:(0,i.jsxs)(a.FG,{className:t,children:[(0,i.jsx)(d,{}),(0,i.jsx)(Lt,{children:(0,i.jsx)(n,{})})]})})}},4966:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});n(7294);var s=n(5999),a=n(512),o=n(9960),i=n(5893);function l(e){const{permalink:t,title:n,subLabel:s,isNext:l}=e;return(0,i.jsxs)(o.Z,{className:(0,a.Z)("pagination-nav__link",l?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[s&&(0,i.jsx)("div",{className:"pagination-nav__sublabel",children:s}),(0,i.jsx)("div",{className:"pagination-nav__label",children:n})]})}function c(e){const{previous:t,next:n}=e;return(0,i.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,s.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,i.jsx)(l,{...t,subLabel:(0,i.jsx)(s.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),n&&(0,i.jsx)(l,{...n,subLabel:(0,i.jsx)(s.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},4364:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});n(7294);var s=n(512),a=n(5999),o=n(5281),i=n(4477),l=n(5893);function c(e){let{className:t}=e;const n=(0,i.E)();return n.badge?(0,l.jsx)("span",{className:(0,s.Z)(t,o.k.docs.docVersionBadge,"badge badge--secondary"),children:(0,l.jsx)(a.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label},children:"Version: {versionLabel}"})}):null}},3120:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});n(7294);var s=n(512),a=n(2263),o=n(9960),i=n(5999),l=n(143),c=n(5281),r=n(373),d=n(4477),u=n(5893);const m={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,u.jsx)(i.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:(0,u.jsx)("b",{children:n.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,u.jsx)(i.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:(0,u.jsx)("b",{children:n.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function h(e){const t=m[e.versionMetadata.banner];return(0,u.jsx)(t,{...e})}function p(e){let{versionLabel:t,to:n,onClick:s}=e;return(0,u.jsx)(i.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:(0,u.jsx)("b",{children:(0,u.jsx)(o.Z,{to:n,onClick:s,children:(0,u.jsx)(i.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function f(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:o}}=(0,a.Z)(),{pluginId:i}=(0,l.gA)({failfast:!0}),{savePreferredVersionName:d}=(0,r.J)(i),{latestDocSuggestion:m,latestVersionSuggestion:f}=(0,l.Jo)(i),x=m??(b=f).docs.find((e=>e.id===b.mainDocId));var b;return(0,u.jsxs)("div",{className:(0,s.Z)(t,c.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,u.jsx)("div",{children:(0,u.jsx)(h,{siteTitle:o,versionMetadata:n})}),(0,u.jsx)("div",{className:"margin-top--md",children:(0,u.jsx)(p,{versionLabel:f.label,to:x.path,onClick:()=>d(f.name)})})]})}function x(e){let{className:t}=e;const n=(0,d.E)();return n.banner?(0,u.jsx)(f,{className:t,versionMetadata:n}):null}},7594:(e,t)=>{function n(e){let t,n=[];for(let s of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(s))n.push(parseInt(s,10));else if(t=s.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,s,a,o]=t;if(s&&o){s=parseInt(s),o=parseInt(o);const e=s {"use strict";n.d(t,{Z:()=>l,a:()=>i});var s=n(7294);const a={},o=s.createContext(a);function i(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/17896441.c0174be7.js b/assets/js/17896441.c0174be7.js deleted file mode 100644 index b5ad703..0000000 --- a/assets/js/17896441.c0174be7.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[918],{1310:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});n(7294);var s=n(512),a=n(5281),o=n(3438),i=n(8596),l=n(9960),c=n(5999),r=n(4996),d=n(5893);function u(e){return(0,d.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,d.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const m={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function h(){const e=(0,r.Z)("/");return(0,d.jsx)("li",{className:"breadcrumbs__item",children:(0,d.jsx)(l.Z,{"aria-label":(0,c.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,d.jsx)(u,{className:m.breadcrumbHomeIcon})})})}const p={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function f(e){let{children:t,href:n,isLast:s}=e;const a="breadcrumbs__link";return s?(0,d.jsx)("span",{className:a,itemProp:"name",children:t}):n?(0,d.jsx)(l.Z,{className:a,href:n,itemProp:"item",children:(0,d.jsx)("span",{itemProp:"name",children:t})}):(0,d.jsx)("span",{className:a,children:t})}function x(e){let{children:t,active:n,index:a,addMicrodata:o}=e;return(0,d.jsxs)("li",{...o&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,s.Z)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:[t,(0,d.jsx)("meta",{itemProp:"position",content:String(a+1)})]})}function b(){const e=(0,o.s1)(),t=(0,i.Ns)();return e?(0,d.jsx)("nav",{className:(0,s.Z)(a.k.docs.docBreadcrumbs,p.breadcrumbsContainer),"aria-label":(0,c.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,d.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,d.jsx)(h,{}),e.map(((t,n)=>{const s=n===e.length-1,a="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,d.jsx)(x,{active:s,index:n,addMicrodata:!!a,children:(0,d.jsx)(f,{href:a,isLast:s,children:t.label})},n)}))]})}):null}},8688:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>yt});var s=n(7294),a=n(1944),o=n(902),i=n(5893);const l=s.createContext(null);function c(e){let{children:t,content:n}=e;const a=function(e){return(0,s.useMemo)((()=>({metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc})),[e])}(n);return(0,i.jsx)(l.Provider,{value:a,children:t})}function r(){const e=(0,s.useContext)(l);if(null===e)throw new o.i6("DocProvider");return e}function d(){const{metadata:e,frontMatter:t,assets:n}=r();return(0,i.jsx)(a.d,{title:e.title,description:e.description,keywords:t.keywords,image:n.image??t.image})}var u=n(512),m=n(7524),h=n(4966);function p(){const{metadata:e}=r();return(0,i.jsx)(h.Z,{previous:e.previous,next:e.next})}var f=n(3120),x=n(4364),b=n(5281),g=n(5999);function j(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:n}=e;return(0,i.jsx)(g.Z,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,i.jsx)("b",{children:(0,i.jsx)("time",{dateTime:new Date(1e3*t).toISOString(),children:n})})},children:" on {date}"})}function v(e){let{lastUpdatedBy:t}=e;return(0,i.jsx)(g.Z,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,i.jsx)("b",{children:t})},children:" by {user}"})}function N(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:n,lastUpdatedBy:s}=e;return(0,i.jsxs)("span",{className:b.k.common.lastUpdated,children:[(0,i.jsx)(g.Z,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t&&n?(0,i.jsx)(j,{lastUpdatedAt:t,formattedLastUpdatedAt:n}):"",byUser:s?(0,i.jsx)(v,{lastUpdatedBy:s}):""},children:"Last updated{atDate}{byUser}"}),!1]})}var C=n(9960);const k={iconEdit:"iconEdit_Z9Sw"};function L(e){let{className:t,...n}=e;return(0,i.jsx)("svg",{fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,u.Z)(k.iconEdit,t),"aria-hidden":"true",...n,children:(0,i.jsx)("g",{children:(0,i.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})})}function y(e){let{editUrl:t}=e;return(0,i.jsxs)(C.Z,{to:t,className:b.k.common.editThisPage,children:[(0,i.jsx)(L,{}),(0,i.jsx)(g.Z,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}const _={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function w(e){let{permalink:t,label:n,count:s}=e;return(0,i.jsxs)(C.Z,{href:t,className:(0,u.Z)(_.tag,s?_.tagWithCount:_.tagRegular),children:[n,s&&(0,i.jsx)("span",{children:s})]})}const B={tags:"tags_jXut",tag:"tag_QGVx"};function Z(e){let{tags:t}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("b",{children:(0,i.jsx)(g.Z,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,i.jsx)("ul",{className:(0,u.Z)(B.tags,"padding--none","margin-left--sm"),children:t.map((e=>{let{label:t,permalink:n}=e;return(0,i.jsx)("li",{className:B.tag,children:(0,i.jsx)(w,{label:t,permalink:n})},n)}))})]})}const T={lastUpdated:"lastUpdated_vwxv"};function E(e){return(0,i.jsx)("div",{className:(0,u.Z)(b.k.docs.docFooterTagsRow,"row margin-bottom--sm"),children:(0,i.jsx)("div",{className:"col",children:(0,i.jsx)(Z,{...e})})})}function H(e){let{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:s,formattedLastUpdatedAt:a}=e;return(0,i.jsxs)("div",{className:(0,u.Z)(b.k.docs.docFooterEditMetaRow,"row"),children:[(0,i.jsx)("div",{className:"col",children:t&&(0,i.jsx)(y,{editUrl:t})}),(0,i.jsx)("div",{className:(0,u.Z)("col",T.lastUpdated),children:(n||s)&&(0,i.jsx)(N,{lastUpdatedAt:n,formattedLastUpdatedAt:a,lastUpdatedBy:s})})]})}function A(){const{metadata:e}=r(),{editUrl:t,lastUpdatedAt:n,formattedLastUpdatedAt:s,lastUpdatedBy:a,tags:o}=e,l=o.length>0,c=!!(t||n||a);return l||c?(0,i.jsxs)("footer",{className:(0,u.Z)(b.k.docs.docFooter,"docusaurus-mt-lg"),children:[l&&(0,i.jsx)(E,{tags:o}),c&&(0,i.jsx)(H,{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:a,formattedLastUpdatedAt:s})]}):null}var I=n(6043),M=n(6668);function S(e){const t=e.map((e=>({...e,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);t.forEach(((e,t)=>{const s=n.slice(2,e.level);e.parentIndex=Math.max(...s),n[e.level]=t}));const s=[];return t.forEach((e=>{const{parentIndex:n,...a}=e;n>=0?t[n].children.push(a):s.push(a)})),s}function U(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:s}=e;return t.flatMap((e=>{const t=U({toc:e.children,minHeadingLevel:n,maxHeadingLevel:s});return function(e){return e.level>=n&&e.level<=s}(e)?[{...e,children:t}]:t}))}function z(e){const t=e.getBoundingClientRect();return t.top===t.bottom?z(e.parentNode):t}function V(e,t){let{anchorTopOffset:n}=t;const s=e.find((e=>z(e).top>=n));if(s){return function(e){return e.top>0&&e.bottom {e.current=t?0:document.querySelector(".navbar").clientHeight}),[t]),e}function O(e){const t=(0,s.useRef)(void 0),n=R();(0,s.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:s,linkActiveClassName:a,minHeadingLevel:o,maxHeadingLevel:i}=e;function l(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(s),l=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const s=[];for(let a=t;a<=n;a+=1)s.push(`h${a}.anchor`);return Array.from(document.querySelectorAll(s.join()))}({minHeadingLevel:o,maxHeadingLevel:i}),c=V(l,{anchorTopOffset:n.current}),r=e.find((e=>c&&c.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,n){n?(t.current&&t.current!==e&&t.current.classList.remove(a),e.classList.add(a),t.current=e):e.classList.remove(a)}(e,e===r)}))}return document.addEventListener("scroll",l),document.addEventListener("resize",l),l(),()=>{document.removeEventListener("scroll",l),document.removeEventListener("resize",l)}}),[e,n])}function P(e){let{toc:t,className:n,linkClassName:s,isChild:a}=e;return t.length?(0,i.jsx)("ul",{className:a?void 0:n,children:t.map((e=>(0,i.jsxs)("li",{children:[(0,i.jsx)(C.Z,{to:`#${e.id}`,className:s??void 0,dangerouslySetInnerHTML:{__html:e.value}}),(0,i.jsx)(P,{isChild:!0,toc:e.children,className:n,linkClassName:s})]},e.id)))}):null}const $=s.memo(P);function D(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:a="table-of-contents__link",linkActiveClassName:o,minHeadingLevel:l,maxHeadingLevel:c,...r}=e;const d=(0,M.L)(),u=l??d.tableOfContents.minHeadingLevel,m=c??d.tableOfContents.maxHeadingLevel,h=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:a}=e;return(0,s.useMemo)((()=>U({toc:S(t),minHeadingLevel:n,maxHeadingLevel:a})),[t,n,a])}({toc:t,minHeadingLevel:u,maxHeadingLevel:m});return O((0,s.useMemo)((()=>{if(a&&o)return{linkClassName:a,linkActiveClassName:o,minHeadingLevel:u,maxHeadingLevel:m}}),[a,o,u,m])),(0,i.jsx)($,{toc:h,className:n,linkClassName:a,...r})}const W={tocCollapsibleButton:"tocCollapsibleButton_TO0P",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_MG3E"};function F(e){let{collapsed:t,...n}=e;return(0,i.jsx)("button",{type:"button",...n,className:(0,u.Z)("clean-btn",W.tocCollapsibleButton,!t&&W.tocCollapsibleButtonExpanded,n.className),children:(0,i.jsx)(g.Z,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component",children:"On this page"})})}const q={tocCollapsible:"tocCollapsible_ETCw",tocCollapsibleContent:"tocCollapsibleContent_vkbj",tocCollapsibleExpanded:"tocCollapsibleExpanded_sAul"};function G(e){let{toc:t,className:n,minHeadingLevel:s,maxHeadingLevel:a}=e;const{collapsed:o,toggleCollapsed:l}=(0,I.u)({initialState:!0});return(0,i.jsxs)("div",{className:(0,u.Z)(q.tocCollapsible,!o&&q.tocCollapsibleExpanded,n),children:[(0,i.jsx)(F,{collapsed:o,onClick:l}),(0,i.jsx)(I.z,{lazy:!0,className:q.tocCollapsibleContent,collapsed:o,children:(0,i.jsx)(D,{toc:t,minHeadingLevel:s,maxHeadingLevel:a})})]})}const J={tocMobile:"tocMobile_ITEo"};function Y(){const{toc:e,frontMatter:t}=r();return(0,i.jsx)(G,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,u.Z)(b.k.docs.docTocMobile,J.tocMobile)})}const Q={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"},X="table-of-contents__link toc-highlight",K="table-of-contents__link--active";function ee(e){let{className:t,...n}=e;return(0,i.jsx)("div",{className:(0,u.Z)(Q.tableOfContents,"thin-scrollbar",t),children:(0,i.jsx)(D,{...n,linkClassName:X,linkActiveClassName:K})})}function te(){const{toc:e,frontMatter:t}=r();return(0,i.jsx)(ee,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:b.k.docs.docTocDesktop})}var ne=n(7955),se=n(1151),ae=n(5742),oe=n(2389),ie=n(2949);function le(){const{prism:e}=(0,M.L)(),{colorMode:t}=(0,ie.I)(),n=e.theme,s=e.darkTheme||n;return"dark"===t?s:n}var ce=n(7594),re=n.n(ce);const de=/title=(? ["'])(?.*?)\1/,ue=/\{(? [\d,-]+)\}/,me={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"},lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""}};function he(e,t){const n=e.map((e=>{const{start:n,end:s}=me[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${s})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function pe(e,t){let n=e.replace(/\n$/,"");const{language:s,magicComments:a,metastring:o}=t;if(o&&ue.test(o)){const e=o.match(ue).groups.range;if(0===a.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${o}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=a[0].className,s=re()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(s),code:n}}if(void 0===s)return{lineClassNames:{},code:n};const i=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return he(["js","jsBlock"],t);case"jsx":case"tsx":return he(["js","jsBlock","jsx"],t);case"html":return he(["js","jsBlock","html"],t);case"python":case"py":case"bash":return he(["bash"],t);case"markdown":case"md":return he(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return he(["tex"],t);case"lua":case"haskell":case"sql":return he(["lua"],t);case"wasm":return he(["wasm"],t);default:return he(Object.keys(me).filter((e=>!["lua","wasm","tex","latex","matlab"].includes(e))),t)}}(s,a),l=n.split("\n"),c=Object.fromEntries(a.map((e=>[e.className,{start:0,range:""}]))),r=Object.fromEntries(a.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),d=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),u=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let h=0;h void 0!==e));r[t]?c[r[t]].range+=`${h},`:d[t]?c[d[t]].start=h:u[t]&&(c[u[t]].range+=`${c[u[t]].start}-${h-1},`),l.splice(h,1)}n=l.join("\n");const m={};return Object.entries(c).forEach((e=>{let[t,{range:n}]=e;re()(n).forEach((e=>{m[e]??=[],m[e].push(t)}))})),{lineClassNames:m,code:n}}const fe={codeBlockContainer:"codeBlockContainer_Ckt0"};function xe(e){let{as:t,...n}=e;const s=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[s,a]=e;const o=t[s];o&&"string"==typeof a&&(n[o]=a)})),n}(le());return(0,i.jsx)(t,{...n,style:s,className:(0,u.Z)(n.className,fe.codeBlockContainer,b.k.common.codeBlock)})}const be={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function ge(e){let{children:t,className:n}=e;return(0,i.jsx)(xe,{as:"pre",tabIndex:0,className:(0,u.Z)(be.codeBlockStandalone,"thin-scrollbar",n),children:(0,i.jsx)("code",{className:be.codeBlockLines,children:t})})}const je={attributes:!0,characterData:!0,childList:!0,subtree:!0};function ve(e,t){const[n,a]=(0,s.useState)(),i=(0,s.useCallback)((()=>{a(e.current?.closest("[role=tabpanel][hidden]"))}),[e,a]);(0,s.useEffect)((()=>{i()}),[i]),function(e,t,n){void 0===n&&(n=je);const a=(0,o.zX)(t),i=(0,o.Ql)(n);(0,s.useEffect)((()=>{const t=new MutationObserver(a);return e&&t.observe(e,i),()=>t.disconnect()}),[e,a,i])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),i())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var Ne=n(2573);const Ce={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function ke(e){let{line:t,classNames:n,showLineNumbers:s,getLineProps:a,getTokenProps:o}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const l=a({line:t,className:(0,u.Z)(n,s&&Ce.codeLine)}),c=t.map(((e,t)=>(0,i.jsx)("span",{...o({token:e,key:t})},t)));return(0,i.jsxs)("span",{...l,children:[s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:Ce.codeLineNumber}),(0,i.jsx)("span",{className:Ce.codeLineContent,children:c})]}):c,(0,i.jsx)("br",{})]})}function Le(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function ye(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const _e={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function we(e){let{code:t,className:n}=e;const[a,o]=(0,s.useState)(!1),l=(0,s.useRef)(void 0),c=(0,s.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const s=document.createElement("textarea"),a=document.activeElement;s.value=e,s.setAttribute("readonly",""),s.style.contain="strict",s.style.position="absolute",s.style.left="-9999px",s.style.fontSize="12pt";const o=document.getSelection(),i=o.rangeCount>0&&o.getRangeAt(0);n.append(s),s.select(),s.selectionStart=0,s.selectionEnd=e.length;let l=!1;try{l=document.execCommand("copy")}catch{}s.remove(),i&&(o.removeAllRanges(),o.addRange(i)),a&&a.focus()}(t),o(!0),l.current=window.setTimeout((()=>{o(!1)}),1e3)}),[t]);return(0,s.useEffect)((()=>()=>window.clearTimeout(l.current)),[]),(0,i.jsx)("button",{type:"button","aria-label":a?(0,g.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,g.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,g.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.Z)("clean-btn",n,_e.copyButton,a&&_e.copyButtonCopied),onClick:c,children:(0,i.jsxs)("span",{className:_e.copyButtonIcons,"aria-hidden":"true",children:[(0,i.jsx)(Le,{className:_e.copyButtonIcon}),(0,i.jsx)(ye,{className:_e.copyButtonSuccessIcon})]})})}function Be(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const Ze={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function Te(e){let{className:t,onClick:n,isEnabled:s}=e;const a=(0,g.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,i.jsx)("button",{type:"button",onClick:n,className:(0,u.Z)("clean-btn",t,s&&Ze.wordWrapButtonEnabled),"aria-label":a,title:a,children:(0,i.jsx)(Be,{className:Ze.wordWrapButtonIcon,"aria-hidden":"true"})})}function Ee(e){let{children:t,className:n="",metastring:a,title:o,showLineNumbers:l,language:c}=e;const{prism:{defaultLanguage:r,magicComments:d}}=(0,M.L)(),m=function(e){return e?.toLowerCase()}(c??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??r),h=le(),p=function(){const[e,t]=(0,s.useState)(!1),[n,a]=(0,s.useState)(!1),o=(0,s.useRef)(null),i=(0,s.useCallback)((()=>{const n=o.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[o,e]),l=(0,s.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=o.current,n=e>t||o.current.querySelector("code").hasAttribute("style");a(n)}),[o]);return ve(o,l),(0,s.useEffect)((()=>{l()}),[e,l]),(0,s.useEffect)((()=>(window.addEventListener("resize",l,{passive:!0}),()=>{window.removeEventListener("resize",l)})),[l]),{codeBlockRef:o,isEnabled:e,isCodeScrollable:n,toggle:i}}(),f=function(e){return e?.match(de)?.groups.title??""}(a)||o,{lineClassNames:x,code:b}=pe(t,{metastring:a,language:m,magicComments:d}),g=l??function(e){return Boolean(e?.includes("showLineNumbers"))}(a);return(0,i.jsxs)(xe,{as:"div",className:(0,u.Z)(n,m&&!n.includes(`language-${m}`)&&`language-${m}`),children:[f&&(0,i.jsx)("div",{className:be.codeBlockTitle,children:f}),(0,i.jsxs)("div",{className:be.codeBlockContent,children:[(0,i.jsx)(Ne.y$,{theme:h,code:b,language:m??"text",children:e=>{let{className:t,style:n,tokens:s,getLineProps:a,getTokenProps:o}=e;return(0,i.jsx)("pre",{tabIndex:0,ref:p.codeBlockRef,className:(0,u.Z)(t,be.codeBlock,"thin-scrollbar"),style:n,children:(0,i.jsx)("code",{className:(0,u.Z)(be.codeBlockLines,g&&be.codeBlockLinesWithNumbering),children:s.map(((e,t)=>(0,i.jsx)(ke,{line:e,getLineProps:a,getTokenProps:o,classNames:x[t],showLineNumbers:g},t)))})})}}),(0,i.jsxs)("div",{className:be.buttonGroup,children:[(p.isEnabled||p.isCodeScrollable)&&(0,i.jsx)(Te,{className:be.codeButton,onClick:()=>p.toggle(),isEnabled:p.isEnabled}),(0,i.jsx)(we,{className:be.codeButton,code:b})]})]})]})}function He(e){let{children:t,...n}=e;const a=(0,oe.Z)(),o=function(e){return s.Children.toArray(e).some((e=>(0,s.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),l="string"==typeof o?Ee:ge;return(0,i.jsx)(l,{...n,children:o},String(a))}const Ae={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function Ie(e){return!!e&&("SUMMARY"===e.tagName||Ie(e.parentElement))}function Me(e,t){return!!e&&(e===t||Me(e.parentElement,t))}function Se(e){let{summary:t,children:n,...a}=e;const o=(0,oe.Z)(),l=(0,s.useRef)(null),{collapsed:c,setCollapsed:r}=(0,I.u)({initialState:!a.open}),[d,m]=(0,s.useState)(a.open),h=s.isValidElement(t)?t:(0,i.jsx)("summary",{children:t??"Details"});return(0,i.jsxs)("details",{...a,ref:l,open:d,"data-collapsed":c,className:(0,u.Z)(Ae.details,o&&Ae.isBrowser,a.className),onMouseDown:e=>{Ie(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;Ie(t)&&Me(t,l.current)&&(e.preventDefault(),c?(r(!1),m(!0)):r(!0))},children:[h,(0,i.jsx)(I.z,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{r(e),m(!e)},children:(0,i.jsx)("div",{className:Ae.collapsibleContent,children:n})})]})}const Ue={details:"details_b_Ee"},ze="alert alert--info";function Ve(e){let{...t}=e;return(0,i.jsx)(Se,{...t,className:(0,u.Z)(ze,Ue.details,t.className)})}function Re(e){const t=s.Children.toArray(e.children),n=t.find((e=>s.isValidElement(e)&&"summary"===e.type)),a=(0,i.jsx)(i.Fragment,{children:t.filter((e=>e!==n))});return(0,i.jsx)(Ve,{...e,summary:n,children:a})}function Oe(e){return(0,i.jsx)(ne.Z,{...e})}const Pe={containsTaskList:"containsTaskList_mC6p"};function $e(e){if(void 0!==e)return(0,u.Z)(e,e?.includes("contains-task-list")&&Pe.containsTaskList)}const De={img:"img_ev3q"};function We(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=s.Children.toArray(e),n=t.find((e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),a=t.filter((e=>e!==n)),o=n?.props.children;return{mdxAdmonitionTitle:o,rest:a.length>0?(0,i.jsx)(i.Fragment,{children:a}):null}}(e.children),a=e.title??t;return{...e,...a&&{title:a},children:n}}const Fe={admonition:"admonition_xJq3",admonitionHeading:"admonitionHeading_Gvgb",admonitionIcon:"admonitionIcon_Rf37",admonitionContent:"admonitionContent_BuS1"};function qe(e){let{type:t,className:n,children:s}=e;return(0,i.jsx)("div",{className:(0,u.Z)(b.k.common.admonition,b.k.common.admonitionType(t),Fe.admonition,n),children:s})}function Ge(e){let{icon:t,title:n}=e;return(0,i.jsxs)("div",{className:Fe.admonitionHeading,children:[(0,i.jsx)("span",{className:Fe.admonitionIcon,children:t}),n]})}function Je(e){let{children:t}=e;return t?(0,i.jsx)("div",{className:Fe.admonitionContent,children:t}):null}function Ye(e){const{type:t,icon:n,title:s,children:a,className:o}=e;return(0,i.jsxs)(qe,{type:t,className:o,children:[(0,i.jsx)(Ge,{title:s,icon:n}),(0,i.jsx)(Je,{children:a})]})}function Qe(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const Xe={icon:(0,i.jsx)(Qe,{}),title:(0,i.jsx)(g.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function Ke(e){return(0,i.jsx)(Ye,{...Xe,...e,className:(0,u.Z)("alert alert--secondary",e.className),children:e.children})}function et(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const tt={icon:(0,i.jsx)(et,{}),title:(0,i.jsx)(g.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function nt(e){return(0,i.jsx)(Ye,{...tt,...e,className:(0,u.Z)("alert alert--success",e.className),children:e.children})}function st(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const at={icon:(0,i.jsx)(st,{}),title:(0,i.jsx)(g.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function ot(e){return(0,i.jsx)(Ye,{...at,...e,className:(0,u.Z)("alert alert--info",e.className),children:e.children})}function it(e){return(0,i.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const lt={icon:(0,i.jsx)(it,{}),title:(0,i.jsx)(g.Z,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function ct(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const rt={icon:(0,i.jsx)(ct,{}),title:(0,i.jsx)(g.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const dt={icon:(0,i.jsx)(it,{}),title:(0,i.jsx)(g.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const ut={...{note:Ke,tip:nt,info:ot,warning:function(e){return(0,i.jsx)(Ye,{...lt,...e,className:(0,u.Z)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,i.jsx)(Ye,{...rt,...e,className:(0,u.Z)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,i.jsx)(Ke,{title:"secondary",...e}),important:e=>(0,i.jsx)(ot,{title:"important",...e}),success:e=>(0,i.jsx)(nt,{title:"success",...e}),caution:function(e){return(0,i.jsx)(Ye,{...dt,...e,className:(0,u.Z)("alert alert--warning",e.className),children:e.children})}}};function mt(e){const t=We(e),n=(s=t.type,ut[s]||(console.warn(`No admonition component found for admonition type "${s}". Using Info as fallback.`),ut.info));var s;return(0,i.jsx)(n,{...t})}var ht=n(1875);const pt={Head:ae.Z,details:Re,Details:Re,code:function(e){return s.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")))?(0,i.jsx)("code",{...e}):(0,i.jsx)(He,{...e})},a:function(e){return(0,i.jsx)(C.Z,{...e})},pre:function(e){return(0,i.jsx)(i.Fragment,{children:e.children})},ul:function(e){return(0,i.jsx)("ul",{...e,className:$e(e.className)})},img:function(e){return(0,i.jsx)("img",{loading:"lazy",...e,className:(t=e.className,(0,u.Z)(t,De.img))});var t},h1:e=>(0,i.jsx)(Oe,{as:"h1",...e}),h2:e=>(0,i.jsx)(Oe,{as:"h2",...e}),h3:e=>(0,i.jsx)(Oe,{as:"h3",...e}),h4:e=>(0,i.jsx)(Oe,{as:"h4",...e}),h5:e=>(0,i.jsx)(Oe,{as:"h5",...e}),h6:e=>(0,i.jsx)(Oe,{as:"h6",...e}),admonition:mt,mermaid:ht.Z};function ft(e){let{children:t}=e;return(0,i.jsx)(se.Z,{components:pt,children:t})}function xt(e){let{children:t}=e;const n=function(){const{metadata:e,frontMatter:t,contentTitle:n}=r();return t.hide_title||void 0!==n?null:e.title}();return(0,i.jsxs)("div",{className:(0,u.Z)(b.k.docs.docMarkdown,"markdown"),children:[n&&(0,i.jsx)("header",{children:(0,i.jsx)(ne.Z,{as:"h1",children:n})}),(0,i.jsx)(ft,{children:t})]})}var bt=n(1310);function gt(){return(0,i.jsx)(g.Z,{id:"theme.unlistedContent.title",description:"The unlisted content banner title",children:"Unlisted page"})}function jt(){return(0,i.jsx)(g.Z,{id:"theme.unlistedContent.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function vt(){return(0,i.jsx)(ae.Z,{children:(0,i.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function Nt(e){let{className:t}=e;return(0,i.jsx)(mt,{type:"caution",title:(0,i.jsx)(gt,{}),className:(0,u.Z)(t,b.k.common.unlistedBanner),children:(0,i.jsx)(jt,{})})}function Ct(e){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(vt,{}),(0,i.jsx)(Nt,{...e})]})}const kt={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function Lt(e){let{children:t}=e;const n=function(){const{frontMatter:e,toc:t}=r(),n=(0,m.i)(),s=e.hide_table_of_contents,a=!s&&t.length>0;return{hidden:s,mobile:a?(0,i.jsx)(Y,{}):void 0,desktop:!a||"desktop"!==n&&"ssr"!==n?void 0:(0,i.jsx)(te,{})}}(),{metadata:{unlisted:s}}=r();return(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:(0,u.Z)("col",!n.hidden&&kt.docItemCol),children:[s&&(0,i.jsx)(Ct,{}),(0,i.jsx)(f.Z,{}),(0,i.jsxs)("div",{className:kt.docItemContainer,children:[(0,i.jsxs)("article",{children:[(0,i.jsx)(bt.Z,{}),(0,i.jsx)(x.Z,{}),n.mobile,(0,i.jsx)(xt,{children:t}),(0,i.jsx)(A,{})]}),(0,i.jsx)(p,{})]})]}),n.desktop&&(0,i.jsx)("div",{className:"col col--3",children:n.desktop})]})}function yt(e){const t=`docs-doc-id-${e.content.metadata.id}`,n=e.content;return(0,i.jsx)(c,{content:e.content,children:(0,i.jsxs)(a.FG,{className:t,children:[(0,i.jsx)(d,{}),(0,i.jsx)(Lt,{children:(0,i.jsx)(n,{})})]})})}},4966:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});n(7294);var s=n(5999),a=n(512),o=n(9960),i=n(5893);function l(e){const{permalink:t,title:n,subLabel:s,isNext:l}=e;return(0,i.jsxs)(o.Z,{className:(0,a.Z)("pagination-nav__link",l?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[s&&(0,i.jsx)("div",{className:"pagination-nav__sublabel",children:s}),(0,i.jsx)("div",{className:"pagination-nav__label",children:n})]})}function c(e){const{previous:t,next:n}=e;return(0,i.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,s.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,i.jsx)(l,{...t,subLabel:(0,i.jsx)(s.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),n&&(0,i.jsx)(l,{...n,subLabel:(0,i.jsx)(s.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},4364:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});n(7294);var s=n(512),a=n(5999),o=n(5281),i=n(4477),l=n(5893);function c(e){let{className:t}=e;const n=(0,i.E)();return n.badge?(0,l.jsx)("span",{className:(0,s.Z)(t,o.k.docs.docVersionBadge,"badge badge--secondary"),children:(0,l.jsx)(a.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label},children:"Version: {versionLabel}"})}):null}},3120:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});n(7294);var s=n(512),a=n(2263),o=n(9960),i=n(5999),l=n(143),c=n(5281),r=n(373),d=n(4477),u=n(5893);const m={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,u.jsx)(i.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:(0,u.jsx)("b",{children:n.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,u.jsx)(i.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:(0,u.jsx)("b",{children:n.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function h(e){const t=m[e.versionMetadata.banner];return(0,u.jsx)(t,{...e})}function p(e){let{versionLabel:t,to:n,onClick:s}=e;return(0,u.jsx)(i.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:(0,u.jsx)("b",{children:(0,u.jsx)(o.Z,{to:n,onClick:s,children:(0,u.jsx)(i.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function f(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:o}}=(0,a.Z)(),{pluginId:i}=(0,l.gA)({failfast:!0}),{savePreferredVersionName:d}=(0,r.J)(i),{latestDocSuggestion:m,latestVersionSuggestion:f}=(0,l.Jo)(i),x=m??(b=f).docs.find((e=>e.id===b.mainDocId));var b;return(0,u.jsxs)("div",{className:(0,s.Z)(t,c.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,u.jsx)("div",{children:(0,u.jsx)(h,{siteTitle:o,versionMetadata:n})}),(0,u.jsx)("div",{className:"margin-top--md",children:(0,u.jsx)(p,{versionLabel:f.label,to:x.path,onClick:()=>d(f.name)})})]})}function x(e){let{className:t}=e;const n=(0,d.E)();return n.banner?(0,u.jsx)(f,{className:t,versionMetadata:n}):null}},7594:(e,t)=>{function n(e){let t,n=[];for(let s of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(s))n.push(parseInt(s,10));else if(t=s.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,s,a,o]=t;if(s&&o){s=parseInt(s),o=parseInt(o);const e=s {"use strict";n.d(t,{Z:()=>l,a:()=>i});var s=n(7294);const a={},o=s.createContext(a);function i(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/18c10e97.4f11b895.js b/assets/js/18c10e97.4f11b895.js new file mode 100644 index 0000000..eb5e758 --- /dev/null +++ b/assets/js/18c10e97.4f11b895.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[9691],{6018:(e,i,n)=>{n.r(i),n.d(i,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>t,metadata:()=>s,toc:()=>l});var o=n(5893),r=n(1151);const t={sidebar_position:2},d="Customizing Food Groups",s={id:"diet/diet-groups",title:"Customizing Food Groups",description:"A tutorial on how to edit available food groups and their respective metadata.",source:"@site/docs/diet/diet-groups.md",sourceDirName:"diet",slug:"/diet/diet-groups",permalink:"/diet/diet-groups",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/diet/diet-groups.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Diet",permalink:"/category/diet"},next:{title:"Categorizing Food to Groups",permalink:"/diet/food-classification"}},a={},l=[{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 Food Group",id:"modifying-a-food-group",level:2},{value:"Example",id:"example-1",level:3},{value:"Localization",id:"localization",level:2},{value:"Built-in Food Groups",id:"built-in-food-groups",level:2}];function c(e){const i={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.a)(),...e.components},{Details:n}=i;return n||function(e,i){throw new Error("Expected "+(i?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.h1,{id:"customizing-food-groups",children:"Customizing Food Groups"}),"\n",(0,o.jsx)(i.p,{children:"A tutorial on how to edit available food groups and their respective metadata."}),"\n",(0,o.jsx)(i.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(i.p,{children:"Food groups are ways that players can categorize and differentiate the different types of food available to them. Some\nfoods may have one or multiple food groups. Eating food will increase the player's percentage of each food group that is\nassociated with the food item."}),"\n",(0,o.jsxs)(i.p,{children:["Groups are completely customizeable through datapacks, allowing users complete control over which food groups are\navailable and how many are tracked. If you are unfamiliar with datapacks, it is recommended to read through the\n",(0,o.jsx)(i.a,{href:"https://minecraft.fandom.com/wiki/Data_pack",children:"wiki page"})," in order to understand the concept and structure before\nproceeding to the rest of this page."]}),"\n",(0,o.jsx)(i.admonition,{type:"tip",children:(0,o.jsxs)(i.p,{children:["If using one or more of the ",(0,o.jsx)(i.a,{href:"#-built-in-food-groups",children:"Built-in Food Groups"})," without changes, this step can be skipped and\n",(0,o.jsx)(i.a,{href:"/diet/diet-suites",children:"Customizing Diet Suites"})," can be read instead."]})}),"\n",(0,o.jsx)(i.admonition,{type:"caution",children:(0,o.jsxs)(i.p,{children:["Creating a food group will not automatically make it appear in-game. Food groups need to be assigned to a ",(0,o.jsx)(i.a,{href:"/diet/diet-suites",children:"Diet Suite"}),"\nfirst and only then will appear when a player has that particular suite of food groups."]})}),"\n",(0,o.jsx)(i.h2,{id:"directory",children:"Directory"}),"\n",(0,o.jsx)(i.hr,{}),"\n",(0,o.jsxs)(i.p,{children:["The file should be a ",(0,o.jsx)(i.code,{children:".json"})," file with the ",(0,o.jsx)(i.code,{children:"name"})," for the food group to be registered. The ",(0,o.jsx)(i.code,{children:"name"})," will be used to\nidentify the food group so keep it in mind. This file should be located in the ",(0,o.jsx)(i.code,{children:"~/data/(namespace)/diet/groups/"})," folder\nof the datapack."]}),"\n",(0,o.jsxs)(i.p,{children:["Example: Registering a ",(0,o.jsx)(i.code,{children:"fruits"})," food group requires creating a ",(0,o.jsx)(i.code,{children:"fruits.json"})," file located in ",(0,o.jsx)(i.code,{children:"~/data/(namespace)/diet/groups/"}),"\nso the final path should look like ",(0,o.jsx)(i.code,{children:"~/data/(namespace)/diet/groups/fruits.json"}),"."]}),"\n",(0,o.jsx)(i.admonition,{type:"note",children:(0,o.jsxs)(i.p,{children:["The ",(0,o.jsx)(i.code,{children:"(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."]})}),"\n",(0,o.jsx)(i.h2,{id:"syntax",children:"Syntax"}),"\n",(0,o.jsx)(i.hr,{}),"\n",(0,o.jsxs)(i.p,{children:["The structure of the ",(0,o.jsx)(i.code,{children:".json"})," file for the food group consists of a top-level JSON object that holds various fields\nrelated to that food group."]}),"\n",(0,o.jsxs)(i.table,{children:[(0,o.jsx)(i.thead,{children:(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.th,{children:"Field"}),(0,o.jsx)(i.th,{children:"Type"}),(0,o.jsx)(i.th,{children:"Default"}),(0,o.jsx)(i.th,{children:"Required"}),(0,o.jsx)(i.th,{children:"Description"})]})}),(0,o.jsxs)(i.tbody,{children:[(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"icon"})}),(0,o.jsx)(i.td,{children:"string"}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:'"minecraft:air"'})}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"false"})}),(0,o.jsx)(i.td,{children:"The registry name of the item used to represent the food group"})]}),(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"color"})}),(0,o.jsx)(i.td,{children:"string"}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:'"#ffffff"'})}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"false"})}),(0,o.jsx)(i.td,{children:"The color, as an integer or hexadecimal string, used to represent the food group"})]}),(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"order"})}),(0,o.jsx)(i.td,{children:"integer"}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"1"})}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"false"})}),(0,o.jsx)(i.td,{children:"The order the food groups will appear in the Diet GUI, lower numbers appear higher"})]}),(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"default_value"})}),(0,o.jsx)(i.td,{children:"decimal"}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"0.0"})}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"false"})}),(0,o.jsx)(i.td,{children:"The starting value of the food group, as a percentage, between 0.0 and 1.0"})]}),(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"gain_multiplier"})}),(0,o.jsx)(i.td,{children:"decimal"}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"1.0"})}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"false"})}),(0,o.jsx)(i.td,{children:"The multiplier to how much value is added to the food group when food is eaten."})]}),(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"decay_multiplier"})}),(0,o.jsx)(i.td,{children:"decimal"}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"1.0"})}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"false"})}),(0,o.jsx)(i.td,{children:"The multiplier to how much the food group decays when hungry."})]}),(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"beneficial"})}),(0,o.jsx)(i.td,{children:"boolean"}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"true"})}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"false"})}),(0,o.jsx)(i.td,{children:"If true, the food group is considered beneficial to have in higher amounts."})]})]})]}),"\n",(0,o.jsx)(i.h2,{id:"example",children:"Example"}),"\n",(0,o.jsx)(i.hr,{}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-json",children:'{\n "icon": "minecraft:diamond",\n "color": "#ffffff",\n "order": 5,\n "default_value": 0.25,\n "gain_multiplier": 2.0,\n "decay_multiplier": 0.5,\n "beneficial": true\n}\n'})}),"\n",(0,o.jsxs)(i.p,{children:["This food group will have a relatively high order of ",(0,o.jsx)(i.code,{children:"5"}),", which will make it appear lower than most food groups. The icon\nis represented by the ",(0,o.jsx)(i.code,{children:"minecraft:diamond"})," item and the food group has a white (",(0,o.jsx)(i.code,{children:"#ffffff"}),") color. It will start at its\ndefault value of 25% (",(0,o.jsx)(i.code,{children:"0.25"}),"). Players will gain twice (",(0,o.jsx)(i.code,{children:"2.0"}),") as much from eating foods in this food group, and the\nfood group will decay half (",(0,o.jsx)(i.code,{children:"0.5"}),") as fast. It is considered beneficial (",(0,o.jsx)(i.code,{children:"true"}),") to eat more foods in this food group."]}),"\n",(0,o.jsx)(i.h2,{id:"modifying-a-food-group",children:"Modifying a Food Group"}),"\n",(0,o.jsx)(i.hr,{}),"\n",(0,o.jsxs)(i.p,{children:["Existing food groups from other sources, such as Diet itself, can be edited by simply creating a datapack file as shown\nhere with the same ",(0,o.jsx)(i.code,{children:"name"}),". Diet will load them in order and will replace any pre-existing food group information with\nnewer ones that are found."]}),"\n",(0,o.jsx)(i.h3,{id:"example-1",children:"Example"}),"\n",(0,o.jsxs)(i.p,{children:["Diet natively provides data for a ",(0,o.jsx)(i.code,{children:"fruits"})," food group, which has a ",(0,o.jsx)(i.code,{children:"default_value"})," of ",(0,o.jsx)(i.code,{children:"0.0"}),". In order to increase the\ndefault value to 0.5, create a ",(0,o.jsx)(i.code,{children:"fruits.json"})," food group file in the datapack with the contents:"]}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-json",children:'{\n "default_value": 0.5\n}\n'})}),"\n",(0,o.jsxs)(i.p,{children:["This will replace the pre-existing default value with the new one of ",(0,o.jsx)(i.code,{children:"0.5"}),"."]}),"\n",(0,o.jsx)(i.h2,{id:"localization",children:"Localization"}),"\n",(0,o.jsx)(i.hr,{}),"\n",(0,o.jsx)(i.p,{children:"The default food groups have in-built translations provided, but custom food groups will need to have their own created."}),"\n",(0,o.jsxs)(i.p,{children:["The key is: ",(0,o.jsx)(i.code,{children:"groups.diet.customgroup.name"}),"."]}),"\n",(0,o.jsx)(i.p,{children:"Example translation entry:"}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{children:'"groups.diet.grains.name": "Grains"\n'})}),"\n",(0,o.jsxs)(i.p,{children:["These entries need to be placed in the localization files of a custom resource pack. For further information about\ncreating a resource pack, please refer to ",(0,o.jsx)(i.a,{href:"https://minecraft.fandom.com/wiki/Tutorials/Creating_a_resource_pack",children:"this guide"}),"."]}),"\n",(0,o.jsx)(i.h2,{id:"built-in-food-groups",children:"Built-in Food Groups"}),"\n",(0,o.jsx)(i.hr,{}),"\n",(0,o.jsxs)(i.p,{children:["These food groups are built-in to Diet natively and can be added to ",(0,o.jsx)(i.a,{href:"/diet/diet-suites",children:"Diet Suites"})," or individually\ncustomized by creating a new datapack file that overrides its contents."]}),"\n",(0,o.jsxs)(n,{children:[(0,o.jsx)("summary",{children:"fruits.json"}),(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-json",children:'{\n "icon": "minecraft:apple",\n "color": "#d41c53",\n "order": 0,\n "default_value": 0.0,\n "gain_multiplier": 1.0,\n "decay_multiplier": 1.0,\n "beneficial": true\n}\n'})})]}),"\n",(0,o.jsxs)(n,{children:[(0,o.jsx)("summary",{children:"grains.json"}),(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-json",children:'{\n "icon": "minecraft:bread",\n "color": "#d4a31c",\n "order": 0,\n "default_value": 0.0,\n "gain_multiplier": 1.0,\n "decay_multiplier": 1.0,\n "beneficial": true\n}\n'})})]}),"\n",(0,o.jsxs)(n,{children:[(0,o.jsx)("summary",{children:"proteins.json"}),(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-json",children:'{\n "icon": "minecraft:cooked_beef",\n "color": "#d4781c",\n "order": 0,\n "default_value": 0.0,\n "gain_multiplier": 1.0,\n "decay_multiplier": 1.0,\n "beneficial": true\n}\n'})})]}),"\n",(0,o.jsxs)(n,{children:[(0,o.jsx)("summary",{children:"vegetables.json"}),(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-json",children:'{\n "icon": "minecraft:carrot",\n "color": "#31d41c",\n "order": 0,\n "default_value": 0.0,\n "gain_multiplier": 1.0,\n "decay_multiplier": 1.0,\n "beneficial": true\n}\n'})})]}),"\n",(0,o.jsxs)(n,{children:[(0,o.jsx)("summary",{children:"sugars.json"}),(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-json",children:'{\n "icon": "minecraft:honey_bottle",\n "color": "#ff8fe9",\n "order": 10,\n "default_value": 0.0,\n "gain_multiplier": 1.0,\n "decay_multiplier": 1.0,\n "beneficial": true\n}\n'})})]})]})}function h(e={}){const{wrapper:i}={...(0,r.a)(),...e.components};return i?(0,o.jsx)(i,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},1151:(e,i,n)=>{n.d(i,{Z:()=>s,a:()=>d});var o=n(7294);const r={},t=o.createContext(r);function d(e){const i=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function s(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),o.createElement(t.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/18c10e97.c3608260.js b/assets/js/18c10e97.c3608260.js deleted file mode 100644 index 63c2d33..0000000 --- a/assets/js/18c10e97.c3608260.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[691],{6018:(e,i,n)=>{n.r(i),n.d(i,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>t,metadata:()=>s,toc:()=>l});var o=n(5893),r=n(1151);const t={sidebar_position:2},d="Customizing Food Groups",s={id:"diet/diet-groups",title:"Customizing Food Groups",description:"A tutorial on how to edit available food groups and their respective metadata.",source:"@site/docs/diet/diet-groups.md",sourceDirName:"diet",slug:"/diet/diet-groups",permalink:"/diet/diet-groups",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/diet/diet-groups.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Diet",permalink:"/category/diet"},next:{title:"Categorizing Food to Groups",permalink:"/diet/food-classification"}},a={},l=[{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 Food Group",id:"modifying-a-food-group",level:2},{value:"Example",id:"example-1",level:3},{value:"Localization",id:"localization",level:2},{value:"Built-in Food Groups",id:"built-in-food-groups",level:2}];function c(e){const i={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.a)(),...e.components},{Details:n}=i;return n||function(e,i){throw new Error("Expected "+(i?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.h1,{id:"customizing-food-groups",children:"Customizing Food Groups"}),"\n",(0,o.jsx)(i.p,{children:"A tutorial on how to edit available food groups and their respective metadata."}),"\n",(0,o.jsx)(i.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(i.p,{children:"Food groups are ways that players can categorize and differentiate the different types of food available to them. Some\nfoods may have one or multiple food groups. Eating food will increase the player's percentage of each food group that is\nassociated with the food item."}),"\n",(0,o.jsxs)(i.p,{children:["Groups are completely customizeable through datapacks, allowing users complete control over which food groups are\navailable and how many are tracked. If you are unfamiliar with datapacks, it is recommended to read through the\n",(0,o.jsx)(i.a,{href:"https://minecraft.fandom.com/wiki/Data_pack",children:"wiki page"})," in order to understand the concept and structure before\nproceeding to the rest of this page."]}),"\n",(0,o.jsx)(i.admonition,{type:"tip",children:(0,o.jsxs)(i.p,{children:["If using one or more of the ",(0,o.jsx)(i.a,{href:"#-built-in-food-groups",children:"Built-in Food Groups"})," without changes, this step can be skipped and\n",(0,o.jsx)(i.a,{href:"/diet/diet-suites",children:"Customizing Diet Suites"})," can be read instead."]})}),"\n",(0,o.jsx)(i.admonition,{type:"caution",children:(0,o.jsxs)(i.p,{children:["Creating a food group will not automatically make it appear in-game. Food groups need to be assigned to a ",(0,o.jsx)(i.a,{href:"/diet/diet-suites",children:"Diet Suite"}),"\nfirst and only then will appear when a player has that particular suite of food groups."]})}),"\n",(0,o.jsx)(i.h2,{id:"directory",children:"Directory"}),"\n",(0,o.jsx)(i.hr,{}),"\n",(0,o.jsxs)(i.p,{children:["The file should be a ",(0,o.jsx)(i.code,{children:".json"})," file with the ",(0,o.jsx)(i.code,{children:"name"})," for the food group to be registered. The ",(0,o.jsx)(i.code,{children:"name"})," will be used to\nidentify the food group so keep it in mind. This file should be located in the ",(0,o.jsx)(i.code,{children:"~/data/(namespace)/diet/groups/"})," folder\nof the datapack."]}),"\n",(0,o.jsxs)(i.p,{children:["Example: Registering a ",(0,o.jsx)(i.code,{children:"fruits"})," food group requires creating a ",(0,o.jsx)(i.code,{children:"fruits.json"})," file located in ",(0,o.jsx)(i.code,{children:"~/data/(namespace)/diet/groups/"}),"\nso the final path should look like ",(0,o.jsx)(i.code,{children:"~/data/(namespace)/diet/groups/fruits.json"}),"."]}),"\n",(0,o.jsx)(i.admonition,{type:"note",children:(0,o.jsxs)(i.p,{children:["The ",(0,o.jsx)(i.code,{children:"(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."]})}),"\n",(0,o.jsx)(i.h2,{id:"syntax",children:"Syntax"}),"\n",(0,o.jsx)(i.hr,{}),"\n",(0,o.jsxs)(i.p,{children:["The structure of the ",(0,o.jsx)(i.code,{children:".json"})," file for the food group consists of a top-level JSON object that holds various fields\nrelated to that food group."]}),"\n",(0,o.jsxs)(i.table,{children:[(0,o.jsx)(i.thead,{children:(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.th,{children:"Field"}),(0,o.jsx)(i.th,{children:"Type"}),(0,o.jsx)(i.th,{children:"Default"}),(0,o.jsx)(i.th,{children:"Required"}),(0,o.jsx)(i.th,{children:"Description"})]})}),(0,o.jsxs)(i.tbody,{children:[(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"icon"})}),(0,o.jsx)(i.td,{children:"string"}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:'"minecraft:air"'})}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"false"})}),(0,o.jsx)(i.td,{children:"The registry name of the item used to represent the food group"})]}),(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"color"})}),(0,o.jsx)(i.td,{children:"string"}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:'"#ffffff"'})}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"false"})}),(0,o.jsx)(i.td,{children:"The color, as an integer or hexadecimal string, used to represent the food group"})]}),(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"order"})}),(0,o.jsx)(i.td,{children:"integer"}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"1"})}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"false"})}),(0,o.jsx)(i.td,{children:"The order the food groups will appear in the Diet GUI, lower numbers appear higher"})]}),(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"default_value"})}),(0,o.jsx)(i.td,{children:"decimal"}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"0.0"})}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"false"})}),(0,o.jsx)(i.td,{children:"The starting value of the food group, as a percentage, between 0.0 and 1.0"})]}),(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"gain_multiplier"})}),(0,o.jsx)(i.td,{children:"decimal"}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"1.0"})}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"false"})}),(0,o.jsx)(i.td,{children:"The multiplier to how much value is added to the food group when food is eaten."})]}),(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"decay_multiplier"})}),(0,o.jsx)(i.td,{children:"decimal"}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"1.0"})}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"false"})}),(0,o.jsx)(i.td,{children:"The multiplier to how much the food group decays when hungry."})]}),(0,o.jsxs)(i.tr,{children:[(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"beneficial"})}),(0,o.jsx)(i.td,{children:"boolean"}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"true"})}),(0,o.jsx)(i.td,{children:(0,o.jsx)(i.code,{children:"false"})}),(0,o.jsx)(i.td,{children:"If true, the food group is considered beneficial to have in higher amounts."})]})]})]}),"\n",(0,o.jsx)(i.h2,{id:"example",children:"Example"}),"\n",(0,o.jsx)(i.hr,{}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-json",children:'{\n "icon": "minecraft:diamond",\n "color": "#ffffff",\n "order": 5,\n "default_value": 0.25,\n "gain_multiplier": 2.0,\n "decay_multiplier": 0.5,\n "beneficial": true\n}\n'})}),"\n",(0,o.jsxs)(i.p,{children:["This food group will have a relatively high order of ",(0,o.jsx)(i.code,{children:"5"}),", which will make it appear lower than most food groups. The icon\nis represented by the ",(0,o.jsx)(i.code,{children:"minecraft:diamond"})," item and the food group has a white (",(0,o.jsx)(i.code,{children:"#ffffff"}),") color. It will start at its\ndefault value of 25% (",(0,o.jsx)(i.code,{children:"0.25"}),"). Players will gain twice (",(0,o.jsx)(i.code,{children:"2.0"}),") as much from eating foods in this food group, and the\nfood group will decay half (",(0,o.jsx)(i.code,{children:"0.5"}),") as fast. It is considered beneficial (",(0,o.jsx)(i.code,{children:"true"}),") to eat more foods in this food group."]}),"\n",(0,o.jsx)(i.h2,{id:"modifying-a-food-group",children:"Modifying a Food Group"}),"\n",(0,o.jsx)(i.hr,{}),"\n",(0,o.jsxs)(i.p,{children:["Existing food groups from other sources, such as Diet itself, can be edited by simply creating a datapack file as shown\nhere with the same ",(0,o.jsx)(i.code,{children:"name"}),". Diet will load them in order and will replace any pre-existing food group information with\nnewer ones that are found."]}),"\n",(0,o.jsx)(i.h3,{id:"example-1",children:"Example"}),"\n",(0,o.jsxs)(i.p,{children:["Diet natively provides data for a ",(0,o.jsx)(i.code,{children:"fruits"})," food group, which has a ",(0,o.jsx)(i.code,{children:"default_value"})," of ",(0,o.jsx)(i.code,{children:"0.0"}),". In order to increase the\ndefault value to 0.5, create a ",(0,o.jsx)(i.code,{children:"fruits.json"})," food group file in the datapack with the contents:"]}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-json",children:'{\n "default_value": 0.5\n}\n'})}),"\n",(0,o.jsxs)(i.p,{children:["This will replace the pre-existing default value with the new one of ",(0,o.jsx)(i.code,{children:"0.5"}),"."]}),"\n",(0,o.jsx)(i.h2,{id:"localization",children:"Localization"}),"\n",(0,o.jsx)(i.hr,{}),"\n",(0,o.jsx)(i.p,{children:"The default food groups have in-built translations provided, but custom food groups will need to have their own created."}),"\n",(0,o.jsxs)(i.p,{children:["The key is: ",(0,o.jsx)(i.code,{children:"groups.diet.customgroup.name"}),"."]}),"\n",(0,o.jsx)(i.p,{children:"Example translation entry:"}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{children:'"groups.diet.grains.name": "Grains"\n'})}),"\n",(0,o.jsxs)(i.p,{children:["These entries need to be placed in the localization files of a custom resource pack. For further information about\ncreating a resource pack, please refer to ",(0,o.jsx)(i.a,{href:"https://minecraft.fandom.com/wiki/Tutorials/Creating_a_resource_pack",children:"this guide"}),"."]}),"\n",(0,o.jsx)(i.h2,{id:"built-in-food-groups",children:"Built-in Food Groups"}),"\n",(0,o.jsx)(i.hr,{}),"\n",(0,o.jsxs)(i.p,{children:["These food groups are built-in to Diet natively and can be added to ",(0,o.jsx)(i.a,{href:"/diet/diet-suites",children:"Diet Suites"})," or individually\ncustomized by creating a new datapack file that overrides its contents."]}),"\n",(0,o.jsxs)(n,{children:[(0,o.jsx)("summary",{children:"fruits.json"}),(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-json",children:'{\n "icon": "minecraft:apple",\n "color": "#d41c53",\n "order": 0,\n "default_value": 0.0,\n "gain_multiplier": 1.0,\n "decay_multiplier": 1.0,\n "beneficial": true\n}\n'})})]}),"\n",(0,o.jsxs)(n,{children:[(0,o.jsx)("summary",{children:"grains.json"}),(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-json",children:'{\n "icon": "minecraft:bread",\n "color": "#d4a31c",\n "order": 0,\n "default_value": 0.0,\n "gain_multiplier": 1.0,\n "decay_multiplier": 1.0,\n "beneficial": true\n}\n'})})]}),"\n",(0,o.jsxs)(n,{children:[(0,o.jsx)("summary",{children:"proteins.json"}),(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-json",children:'{\n "icon": "minecraft:cooked_beef",\n "color": "#d4781c",\n "order": 0,\n "default_value": 0.0,\n "gain_multiplier": 1.0,\n "decay_multiplier": 1.0,\n "beneficial": true\n}\n'})})]}),"\n",(0,o.jsxs)(n,{children:[(0,o.jsx)("summary",{children:"vegetables.json"}),(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-json",children:'{\n "icon": "minecraft:carrot",\n "color": "#31d41c",\n "order": 0,\n "default_value": 0.0,\n "gain_multiplier": 1.0,\n "decay_multiplier": 1.0,\n "beneficial": true\n}\n'})})]}),"\n",(0,o.jsxs)(n,{children:[(0,o.jsx)("summary",{children:"sugars.json"}),(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-json",children:'{\n "icon": "minecraft:honey_bottle",\n "color": "#ff8fe9",\n "order": 10,\n "default_value": 0.0,\n "gain_multiplier": 1.0,\n "decay_multiplier": 1.0,\n "beneficial": true\n}\n'})})]})]})}function h(e={}){const{wrapper:i}={...(0,r.a)(),...e.components};return i?(0,o.jsx)(i,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},1151:(e,i,n)=>{n.d(i,{Z:()=>s,a:()=>d});var o=n(7294);const r={},t=o.createContext(r);function d(e){const i=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function s(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),o.createElement(t.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/20ff6a6d.65c7cfc9.js b/assets/js/20ff6a6d.65c7cfc9.js new file mode 100644 index 0000000..b7ba208 --- /dev/null +++ b/assets/js/20ff6a6d.65c7cfc9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[9456],{3197:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>d});var i=s(5893),n=s(1151);const o={sidebar_position:4},a="Assigning Slots",r={id:"curios/items/assign-slots",title:"Assigning Slots",description:"A tutorial on how to assign items to slot types so that they can be equipped.",source:"@site/docs/curios/items/assign-slots.md",sourceDirName:"curios/items",slug:"/curios/items/assign-slots",permalink:"/curios/items/assign-slots",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/items/assign-slots.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"Creating a Curio",permalink:"/curios/items/curio-creation"},next:{title:"Rendering a Curio",permalink:"/curios/items/rendering-registry"}},l={},d=[{value:"Overview",id:"overview",level:2},{value:"Item Tags",id:"item-tags",level:2},{value:"Example",id:"example",level:3},{value:"Removing Values",id:"removing-values",level:3},{value:"Validators",id:"validators",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,n.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"assigning-slots",children:"Assigning Slots"}),"\n",(0,i.jsx)(t.p,{children:"A tutorial on how to assign items to slot types so that they can be equipped."}),"\n",(0,i.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.p,{children:["By default, items are assigned to slot types based on their item tags. For example, a ",(0,i.jsx)(t.code,{children:"ring"})," slot type would accept any\nitem that is part of the ",(0,i.jsx)(t.code,{children:"curios:ring"})," item tag. To find out more about item tags and their uses, please see the\n",(0,i.jsx)(t.a,{href:"https://minecraft.wiki/w/Tag#Items",children:"Minecraft wiki page"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["More broadly speaking, item assignments are based on the ",(0,i.jsx)(t.code,{children:"validators"})," field from each slot type, more information can be\nfound on the overview for ",(0,i.jsx)(t.a,{href:"/curios/slots/slot-register",children:"slot types"}),". Each of these validators is a predicate, a function\nthat takes a ",(0,i.jsx)(t.code,{children:"SlotContext"})," and ",(0,i.jsx)(t.code,{children:"ItemStack"})," and returns either true or false, and each predicate is registered through\nthe Curios API with a specific ",(0,i.jsx)(t.code,{children:"ResourceLocation"}),". The reason that the default is to accept relevant item tags is\nbecause, unless otherwise defined, each slot type uses an in-built validator called ",(0,i.jsx)(t.code,{children:"curios:tag"})," that tells it to accept\nany item that has its relevant tag."]}),"\n",(0,i.jsx)(t.h2,{id:"item-tags",children:"Item Tags"}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.p,{children:["Without defining validators, the default behavior is for slot types to accept any item that has its relevant item tag,\nwhich is always of the format ",(0,i.jsx)(t.code,{children:"curios:identifier"})," with the identifier of the slot type in the place of ",(0,i.jsx)(t.code,{children:"identifier"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["The sole exception is the special ",(0,i.jsx)(t.code,{children:"curio"})," slot type, which is designed to accept any item that fits into any of the\nother slot types. Conversely, any item that is tagged with ",(0,i.jsx)(t.code,{children:"curios:curio"})," can be inserted into any slot type."]}),"\n",(0,i.jsxs)(t.p,{children:["Item tags are defined through datapacks. If a user or developer is unfamiliar with datapacks, it is recommended to read\nthrough the ",(0,i.jsx)(t.a,{href:"https://minecraft.wiki/w/Data_pack",children:"Minecraft wiki page"})," in order to understand the concept and structure\nbefore proceeding to the rest of this page."]}),"\n",(0,i.jsx)(t.h3,{id:"example",children:"Example"}),"\n",(0,i.jsxs)(t.p,{children:["Inside the datapack, there should be a path of folders that looks like ",(0,i.jsx)(t.code,{children:"data/curios/tags/items"}),". At the end of this,\ninside the ",(0,i.jsx)(t.code,{children:"items"})," folder, is where the item tag data file should go. The name of the file should be the same as the\nname of the identifier of the slot type that the item(s) should go in and the format should be ",(0,i.jsx)(t.code,{children:".json"}),". For this\nexample, the ",(0,i.jsx)(t.code,{children:"ring"})," slot type will be used."]}),"\n",(0,i.jsxs)(t.p,{children:["The path should now look like ",(0,i.jsx)(t.code,{children:"data/curios/tags/items/ring.json"}),". The inside of the ",(0,i.jsx)(t.code,{children:"ring.json"})," file should look like:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-json",children:'{\n "replace": false,\n "values": []\n}\n'})}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.code,{children:"replace"})," field should usually be set to false. It can be set to true instead if the items listed in this file are\nthe ",(0,i.jsx)(t.strong,{children:"only"})," items that should fit into the slot type, as it causes this file to overwrite any previous entries from\nlower-priority datapacks."]}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.code,{children:"values"})," field contains the list of items that should go into the slot. For this example, diamonds and emeralds\nwill be tagged:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-json",children:'{\n "replace": false,\n "values": ["minecraft:diamond", "minecraft:emerald"]\n}\n'})}),"\n",(0,i.jsxs)(t.p,{children:["Now all diamonds and all emeralds should have a tooltip that reads ",(0,i.jsx)(t.code,{children:"Slot: Ring"}),", which indicates that they can now go\ninto the ",(0,i.jsx)(t.code,{children:"ring"})," slot type if available."]}),"\n",(0,i.jsx)(t.h3,{id:"removing-values",children:"Removing Values"}),"\n",(0,i.jsxs)(t.p,{children:["Items can also be removed from item tags instead of added. This is useful for situations where it is necessary to move\nan item from one slot type to another and the original slot type should no longer accept the item. In this case,\nthere is a ",(0,i.jsx)(t.code,{children:"remove"})," field that can be used to list an array of items that should be removed from the slot type."]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-json",children:'{\n "replace": false,\n "values": [],\n "remove": ["minecraft:diamond"]\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"In the example above, diamonds will be removed from the slot type associated with the item tag and no longer be\nconsidered valid for equipping into that slot type (provided that the slot type itself is using the default behavior of\nvalidating based on item tags)."}),"\n",(0,i.jsx)(t.h2,{id:"validators",children:"Validators"}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.p,{children:["For more precise slot type assignments, validators can be used instead. Validators exist as a field on each slot type\nand consist of an array of ",(0,i.jsx)(t.code,{children:"ResourceLocation"})," entries that refer to predicates registered through\n",(0,i.jsx)(t.code,{children:"CuriosApi#registerPredicate(ResourceLocation, Predicate )"}),". The field can be changed through slot data files\nin a datapack, as described in the ",(0,i.jsx)(t.a,{href:"/curios/slots/slot-register",children:"slot types page"}),"."]}),"\n",(0,i.jsx)(t.p,{children:"There are three native validators registered by Curios for use:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"curios:all"})," - Returns true for all items (note: ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"all"})})," items)"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"curios:none"})," - Returns false for all items"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"curios:tag"})," - Returns true for all items in the ",(0,i.jsx)(t.code,{children:"curios:identifier"})," item tag, with ",(0,i.jsx)(t.code,{children:"identifier"})," being the identifier\nof the slot type"]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["All ",(0,i.jsx)(t.a,{href:"/curios/slots/preset-slots",children:"preset slot types"})," use ",(0,i.jsx)(t.code,{children:"curios:tag"})," as one of the validators by default, and any slot\ntype that doesn't have any validators defined will automatically initialize with ",(0,i.jsx)(t.code,{children:"curios:tag"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["In order to register a predicate and use a custom validator, developers will need to call\n",(0,i.jsx)(t.code,{children:"CuriosApi#registerPredicate(ResourceLocation, Predicate )"}),":"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-java",children:'CuriosApi.registerPredicate(new ResourceLocation("examplemod", "my_predicate"), (slotResult) -> {\n // contents of the predicate here - return true or false \n});\n'})}),"\n",(0,i.jsx)(t.p,{children:"This can be registered anywhere, but should be done before server loading as that's when the data is needed."}),"\n",(0,i.jsx)(t.admonition,{type:"tip",children:(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.code,{children:"SlotResult"})," object used in the predicate is a record consisting of a ",(0,i.jsx)(t.code,{children:"SlotContext"})," and an ",(0,i.jsx)(t.code,{children:"ItemStack"}),". Therefore,\npredicates can return true or false based on either/both the slot context and the item stack involved. However, the\nslot context does not always contain all the information. For example, validating potential slot types while looking\nat an item's tooltip will only pass in the slot identifier and the entity because all other information is not yet\navailable in that case."]})}),"\n",(0,i.jsx)(t.p,{children:"Once a predicate is defined, it can then be referenced in the slot data files:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-json",children:'{\n "validators": ["examplemod:my_predicate"]\n}\n'})})]})}function h(e={}){const{wrapper:t}={...(0,n.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},1151:(e,t,s)=>{s.d(t,{Z:()=>r,a:()=>a});var i=s(7294);const n={},o=i.createContext(n);function a(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/20ff6a6d.cd92789a.js b/assets/js/20ff6a6d.cd92789a.js deleted file mode 100644 index 63e9784..0000000 --- a/assets/js/20ff6a6d.cd92789a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[456],{3197:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>d});var i=s(5893),n=s(1151);const o={sidebar_position:4},a="Assigning Slots",r={id:"curios/items/assign-slots",title:"Assigning Slots",description:"A tutorial on how to assign items to slot types so that they can be equipped.",source:"@site/docs/curios/items/assign-slots.md",sourceDirName:"curios/items",slug:"/curios/items/assign-slots",permalink:"/curios/items/assign-slots",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/items/assign-slots.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"Creating a Curio",permalink:"/curios/items/curio-creation"},next:{title:"Rendering a Curio",permalink:"/curios/items/rendering-registry"}},l={},d=[{value:"Overview",id:"overview",level:2},{value:"Item Tags",id:"item-tags",level:2},{value:"Example",id:"example",level:3},{value:"Removing Values",id:"removing-values",level:3},{value:"Validators",id:"validators",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,n.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"assigning-slots",children:"Assigning Slots"}),"\n",(0,i.jsx)(t.p,{children:"A tutorial on how to assign items to slot types so that they can be equipped."}),"\n",(0,i.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.p,{children:["By default, items are assigned to slot types based on their item tags. For example, a ",(0,i.jsx)(t.code,{children:"ring"})," slot type would accept any\nitem that is part of the ",(0,i.jsx)(t.code,{children:"curios:ring"})," item tag. To find out more about item tags and their uses, please see the\n",(0,i.jsx)(t.a,{href:"https://minecraft.wiki/w/Tag#Items",children:"Minecraft wiki page"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["More broadly speaking, item assignments are based on the ",(0,i.jsx)(t.code,{children:"validators"})," field from each slot type, more information can be\nfound on the overview for ",(0,i.jsx)(t.a,{href:"/curios/slots/slot-register",children:"slot types"}),". Each of these validators is a predicate, a function\nthat takes a ",(0,i.jsx)(t.code,{children:"SlotContext"})," and ",(0,i.jsx)(t.code,{children:"ItemStack"})," and returns either true or false, and each predicate is registered through\nthe Curios API with a specific ",(0,i.jsx)(t.code,{children:"ResourceLocation"}),". The reason that the default is to accept relevant item tags is\nbecause, unless otherwise defined, each slot type uses an in-built validator called ",(0,i.jsx)(t.code,{children:"curios:tag"})," that tells it to accept\nany item that has its relevant tag."]}),"\n",(0,i.jsx)(t.h2,{id:"item-tags",children:"Item Tags"}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.p,{children:["Without defining validators, the default behavior is for slot types to accept any item that has its relevant item tag,\nwhich is always of the format ",(0,i.jsx)(t.code,{children:"curios:identifier"})," with the identifier of the slot type in the place of ",(0,i.jsx)(t.code,{children:"identifier"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["The sole exception is the special ",(0,i.jsx)(t.code,{children:"curio"})," slot type, which is designed to accept any item that fits into any of the\nother slot types. Conversely, any item that is tagged with ",(0,i.jsx)(t.code,{children:"curios:curio"})," can be inserted into any slot type."]}),"\n",(0,i.jsxs)(t.p,{children:["Item tags are defined through datapacks. If a user or developer is unfamiliar with datapacks, it is recommended to read\nthrough the ",(0,i.jsx)(t.a,{href:"https://minecraft.wiki/w/Data_pack",children:"Minecraft wiki page"})," in order to understand the concept and structure\nbefore proceeding to the rest of this page."]}),"\n",(0,i.jsx)(t.h3,{id:"example",children:"Example"}),"\n",(0,i.jsxs)(t.p,{children:["Inside the datapack, there should be a path of folders that looks like ",(0,i.jsx)(t.code,{children:"data/curios/tags/items"}),". At the end of this,\ninside the ",(0,i.jsx)(t.code,{children:"items"})," folder, is where the item tag data file should go. The name of the file should be the same as the\nname of the identifier of the slot type that the item(s) should go in and the format should be ",(0,i.jsx)(t.code,{children:".json"}),". For this\nexample, the ",(0,i.jsx)(t.code,{children:"ring"})," slot type will be used."]}),"\n",(0,i.jsxs)(t.p,{children:["The path should now look like ",(0,i.jsx)(t.code,{children:"data/curios/tags/items/ring.json"}),". The inside of the ",(0,i.jsx)(t.code,{children:"ring.json"})," file should look like:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-json",children:'{\n "replace": false,\n "values": []\n}\n'})}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.code,{children:"replace"})," field should usually be set to false. It can be set to true instead if the items listed in this file are\nthe ",(0,i.jsx)(t.strong,{children:"only"})," items that should fit into the slot type, as it causes this file to overwrite any previous entries from\nlower-priority datapacks."]}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.code,{children:"values"})," field contains the list of items that should go into the slot. For this example, diamonds and emeralds\nwill be tagged:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-json",children:'{\n "replace": false,\n "values": ["minecraft:diamond", "minecraft:emerald"]\n}\n'})}),"\n",(0,i.jsxs)(t.p,{children:["Now all diamonds and all emeralds should have a tooltip that reads ",(0,i.jsx)(t.code,{children:"Slot: Ring"}),", which indicates that they can now go\ninto the ",(0,i.jsx)(t.code,{children:"ring"})," slot type if available."]}),"\n",(0,i.jsx)(t.h3,{id:"removing-values",children:"Removing Values"}),"\n",(0,i.jsxs)(t.p,{children:["Items can also be removed from item tags instead of added. This is useful for situations where it is necessary to move\nan item from one slot type to another and the original slot type should no longer accept the item. In this case,\nthere is a ",(0,i.jsx)(t.code,{children:"remove"})," field that can be used to list an array of items that should be removed from the slot type."]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-json",children:'{\n "replace": false,\n "values": [],\n "remove": ["minecraft:diamond"]\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"In the example above, diamonds will be removed from the slot type associated with the item tag and no longer be\nconsidered valid for equipping into that slot type (provided that the slot type itself is using the default behavior of\nvalidating based on item tags)."}),"\n",(0,i.jsx)(t.h2,{id:"validators",children:"Validators"}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.p,{children:["For more precise slot type assignments, validators can be used instead. Validators exist as a field on each slot type\nand consist of an array of ",(0,i.jsx)(t.code,{children:"ResourceLocation"})," entries that refer to predicates registered through\n",(0,i.jsx)(t.code,{children:"CuriosApi#registerPredicate(ResourceLocation, Predicate )"}),". The field can be changed through slot data files\nin a datapack, as described in the ",(0,i.jsx)(t.a,{href:"/curios/slots/slot-register",children:"slot types page"}),"."]}),"\n",(0,i.jsx)(t.p,{children:"There are three native validators registered by Curios for use:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"curios:all"})," - Returns true for all items (note: ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"all"})})," items)"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"curios:none"})," - Returns false for all items"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"curios:tag"})," - Returns true for all items in the ",(0,i.jsx)(t.code,{children:"curios:identifier"})," item tag, with ",(0,i.jsx)(t.code,{children:"identifier"})," being the identifier\nof the slot type"]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["All ",(0,i.jsx)(t.a,{href:"/curios/slots/preset-slots",children:"preset slot types"})," use ",(0,i.jsx)(t.code,{children:"curios:tag"})," as one of the validators by default, and any slot\ntype that doesn't have any validators defined will automatically initialize with ",(0,i.jsx)(t.code,{children:"curios:tag"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["In order to register a predicate and use a custom validator, developers will need to call\n",(0,i.jsx)(t.code,{children:"CuriosApi#registerPredicate(ResourceLocation, Predicate )"}),":"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-java",children:'CuriosApi.registerPredicate(new ResourceLocation("examplemod", "my_predicate"), (slotResult) -> {\n // contents of the predicate here - return true or false \n});\n'})}),"\n",(0,i.jsx)(t.p,{children:"This can be registered anywhere, but should be done before server loading as that's when the data is needed."}),"\n",(0,i.jsx)(t.admonition,{type:"tip",children:(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.code,{children:"SlotResult"})," object used in the predicate is a record consisting of a ",(0,i.jsx)(t.code,{children:"SlotContext"})," and an ",(0,i.jsx)(t.code,{children:"ItemStack"}),". Therefore,\npredicates can return true or false based on either/both the slot context and the item stack involved. However, the\nslot context does not always contain all the information. For example, validating potential slot types while looking\nat an item's tooltip will only pass in the slot identifier and the entity because all other information is not yet\navailable in that case."]})}),"\n",(0,i.jsx)(t.p,{children:"Once a predicate is defined, it can then be referenced in the slot data files:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-json",children:'{\n "validators": ["examplemod:my_predicate"]\n}\n'})})]})}function h(e={}){const{wrapper:t}={...(0,n.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},1151:(e,t,s)=>{s.d(t,{Z:()=>r,a:()=>a});var i=s(7294);const n={},o=i.createContext(n);function a(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/247783bb.55d47034.js b/assets/js/247783bb.55d47034.js new file mode 100644 index 0000000..62b0828 --- /dev/null +++ b/assets/js/247783bb.55d47034.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[9334],{3769:s=>{s.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/247783bb.899a41db.js b/assets/js/247783bb.899a41db.js deleted file mode 100644 index 0f3670d..0000000 --- a/assets/js/247783bb.899a41db.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[334],{3769:s=>{s.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/2e6e5734.8b970756.js b/assets/js/2e6e5734.8b970756.js deleted file mode 100644 index a769854..0000000 --- a/assets/js/2e6e5734.8b970756.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[805],{3841:e=>{e.exports=JSON.parse('{"title":"Items","description":"All about curio items and how to create or manage them.","slug":"/category/items","permalink":"/category/items","navigation":{"previous":{"title":"Example Datapack","permalink":"/curios/slots/datapack-example"},"next":{"title":"Creating a Curio","permalink":"/curios/items/curio-creation"}}}')}}]); \ No newline at end of file diff --git a/assets/js/2e6e5734.9ea579f8.js b/assets/js/2e6e5734.9ea579f8.js new file mode 100644 index 0000000..aeecdaa --- /dev/null +++ b/assets/js/2e6e5734.9ea579f8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[9805],{3841:e=>{e.exports=JSON.parse('{"title":"Items","description":"All about curio items and how to create or manage them.","slug":"/category/items","permalink":"/category/items","navigation":{"previous":{"title":"Example Datapack","permalink":"/curios/slots/datapack-example"},"next":{"title":"Creating a Curio","permalink":"/curios/items/curio-creation"}}}')}}]); \ No newline at end of file diff --git a/assets/js/3a36d978.17c564cb.js b/assets/js/3a36d978.17c564cb.js new file mode 100644 index 0000000..891cd3e --- /dev/null +++ b/assets/js/3a36d978.17c564cb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[4492],{6652:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>d,contentTitle:()=>n,default:()=>h,frontMatter:()=>c,metadata:()=>i,toc:()=>l});var r=t(5893),o=t(1151);const c={sidebar_position:5},n="Preset Slot Types",i={id:"curios/slots/preset-slots",title:"Preset Slot Types",description:"A list of commonly used slot types that are already defined in Curios for developers to use.",source:"@site/docs/curios/slots/preset-slots.md",sourceDirName:"curios/slots",slug:"/curios/slots/preset-slots",permalink:"/curios/slots/preset-slots",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slots/preset-slots.md",tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"tutorialSidebar",previous:{title:"Entity Slot Types",permalink:"/curios/slots/entity-register"},next:{title:"Slot Icon Textures",permalink:"/curios/slots/slot-textures"}},d={},l=[{value:"Overview",id:"overview",level:2},{value:"Slot Types",id:"slot-types",level:2}];function a(e){const s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",hr:"hr",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{id:"preset-slot-types",children:"Preset Slot Types"}),"\n",(0,r.jsx)(s.p,{children:"A list of commonly used slot types that are already defined in Curios for developers to use."}),"\n",(0,r.jsx)(s.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsxs)(s.p,{children:["One of the benefits of using Curios is that multiple developers can share slot types between each other, allowing\nmechanics and items to cooperate seamlessly. As long as the ",(0,r.jsx)(s.code,{children:"identifier"})," for the slot type is the same, the slot types\nwill be merged together upon registration. To reduce the need for redundant code and data, Curios provides a preset\nlist of slot types that are commonly used in the modded community and should be favored over creating wholly unique slot\ntypes when applicable."]}),"\n",(0,r.jsx)(s.admonition,{type:"note",children:(0,r.jsxs)(s.p,{children:["Although these slot types are provided by Curios, they are not added to any entities by default. This needs to be done\nby the developer or user by ",(0,r.jsx)(s.a,{href:"/curios/slots/entity-register",children:"adding slot types to entities"}),"."]})}),"\n",(0,r.jsx)(s.h2,{id:"slot-types",children:"Slot Types"}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Identifier"}),(0,r.jsx)(s.th,{children:"Usage"}),(0,r.jsx)(s.th,{children:"Examples"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"curio"})}),(0,r.jsx)(s.td,{children:"Universal, able to equip or be equipped into any slot type"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/botania",children:"Botania"})})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"back"})}),(0,r.jsx)(s.td,{children:"Items worn on the back, such as capes or backpacks"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/backpacked",children:"Backpacked"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/bountifulbaubles",children:"BountifulBaubles"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/curious-elytra",children:"Elytra Slot"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/curious-shulker-boxes",children:"Shulker Box Slot"})]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"belt"})}),(0,r.jsx)(s.td,{children:"Items worn around the waist, such as belts or pouches"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/artifacts",children:"Artifacts"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/cyclic",children:"Cyclic"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/natures-aura",children:"Nature's Aura"})]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"body"})}),(0,r.jsx)(s.td,{children:"Items worn around the torso, such as cloaks or shirts"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/engineers-tools",children:"Engineer's Tools"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/reliquary-v1-3",children:"Reliquary"})]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"bracelet"})}),(0,r.jsx)(s.td,{children:"Items worn around the wrist, such as bands or bracelets"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"charm"})}),(0,r.jsx)(s.td,{children:"Miscellaneous items, either held or not associated with a body part"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/angel-ring",children:"Angel Ring"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/curio-of-undying",children:"Charm of Undying"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/dark-utilities",children:"Dark Utilities"})]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"head"})}),(0,r.jsx)(s.td,{children:"Items worn on top of the head, such as crowns or hats"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/vanillatweaks",children:"VanillaTweaks"})})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"hands"})}),(0,r.jsx)(s.td,{children:"Items worn on hands, such as gloves or gauntlets"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/artifacts",children:"Artifacts"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/cyclic",children:"Cyclic"})]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"necklace"})}),(0,r.jsx)(s.td,{children:"Items worn around the neck, such as amulets or necklaces"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/azure-rpg-items",children:"Azure RPG Items"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/potion-capsule",children:"Potion Capsule"})]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"ring"})}),(0,r.jsx)(s.td,{children:'Items worn on the "fingers", such as rings'}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/enigmatic-legacy",children:"Enigmatic Legacy"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/gobber",children:"Gobber"})]})]})]})]})]})}function h(e={}){const{wrapper:s}={...(0,o.a)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},1151:(e,s,t)=>{t.d(s,{Z:()=>i,a:()=>n});var r=t(7294);const o={},c=r.createContext(o);function n(e){const s=r.useContext(c);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:n(e.components),r.createElement(c.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3a36d978.8b966a18.js b/assets/js/3a36d978.8b966a18.js deleted file mode 100644 index 5e77c2d..0000000 --- a/assets/js/3a36d978.8b966a18.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[492],{6652:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>d,contentTitle:()=>n,default:()=>h,frontMatter:()=>c,metadata:()=>i,toc:()=>l});var r=t(5893),o=t(1151);const c={sidebar_position:5},n="Preset Slot Types",i={id:"curios/slots/preset-slots",title:"Preset Slot Types",description:"A list of commonly used slot types that are already defined in Curios for developers to use.",source:"@site/docs/curios/slots/preset-slots.md",sourceDirName:"curios/slots",slug:"/curios/slots/preset-slots",permalink:"/curios/slots/preset-slots",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slots/preset-slots.md",tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"tutorialSidebar",previous:{title:"Entity Slot Types",permalink:"/curios/slots/entity-register"},next:{title:"Slot Icon Textures",permalink:"/curios/slots/slot-textures"}},d={},l=[{value:"Overview",id:"overview",level:2},{value:"Slot Types",id:"slot-types",level:2}];function a(e){const s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",hr:"hr",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{id:"preset-slot-types",children:"Preset Slot Types"}),"\n",(0,r.jsx)(s.p,{children:"A list of commonly used slot types that are already defined in Curios for developers to use."}),"\n",(0,r.jsx)(s.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsxs)(s.p,{children:["One of the benefits of using Curios is that multiple developers can share slot types between each other, allowing\nmechanics and items to cooperate seamlessly. As long as the ",(0,r.jsx)(s.code,{children:"identifier"})," for the slot type is the same, the slot types\nwill be merged together upon registration. To reduce the need for redundant code and data, Curios provides a preset\nlist of slot types that are commonly used in the modded community and should be favored over creating wholly unique slot\ntypes when applicable."]}),"\n",(0,r.jsx)(s.admonition,{type:"note",children:(0,r.jsxs)(s.p,{children:["Although these slot types are provided by Curios, they are not added to any entities by default. This needs to be done\nby the developer or user by ",(0,r.jsx)(s.a,{href:"/curios/slots/entity-register",children:"adding slot types to entities"}),"."]})}),"\n",(0,r.jsx)(s.h2,{id:"slot-types",children:"Slot Types"}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Identifier"}),(0,r.jsx)(s.th,{children:"Usage"}),(0,r.jsx)(s.th,{children:"Examples"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"curio"})}),(0,r.jsx)(s.td,{children:"Universal, able to equip or be equipped into any slot type"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/botania",children:"Botania"})})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"back"})}),(0,r.jsx)(s.td,{children:"Items worn on the back, such as capes or backpacks"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/backpacked",children:"Backpacked"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/bountifulbaubles",children:"BountifulBaubles"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/curious-elytra",children:"Elytra Slot"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/curious-shulker-boxes",children:"Shulker Box Slot"})]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"belt"})}),(0,r.jsx)(s.td,{children:"Items worn around the waist, such as belts or pouches"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/artifacts",children:"Artifacts"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/cyclic",children:"Cyclic"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/natures-aura",children:"Nature's Aura"})]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"body"})}),(0,r.jsx)(s.td,{children:"Items worn around the torso, such as cloaks or shirts"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/engineers-tools",children:"Engineer's Tools"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/reliquary-v1-3",children:"Reliquary"})]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"bracelet"})}),(0,r.jsx)(s.td,{children:"Items worn around the wrist, such as bands or bracelets"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"charm"})}),(0,r.jsx)(s.td,{children:"Miscellaneous items, either held or not associated with a body part"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/angel-ring",children:"Angel Ring"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/curio-of-undying",children:"Charm of Undying"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/dark-utilities",children:"Dark Utilities"})]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"head"})}),(0,r.jsx)(s.td,{children:"Items worn on top of the head, such as crowns or hats"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/vanillatweaks",children:"VanillaTweaks"})})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"hands"})}),(0,r.jsx)(s.td,{children:"Items worn on hands, such as gloves or gauntlets"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/artifacts",children:"Artifacts"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/cyclic",children:"Cyclic"})]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"necklace"})}),(0,r.jsx)(s.td,{children:"Items worn around the neck, such as amulets or necklaces"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/azure-rpg-items",children:"Azure RPG Items"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/potion-capsule",children:"Potion Capsule"})]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"ring"})}),(0,r.jsx)(s.td,{children:'Items worn on the "fingers", such as rings'}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/enigmatic-legacy",children:"Enigmatic Legacy"}),", ",(0,r.jsx)(s.a,{href:"https://www.curseforge.com/minecraft/mc-mods/gobber",children:"Gobber"})]})]})]})]})]})}function h(e={}){const{wrapper:s}={...(0,o.a)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},1151:(e,s,t)=>{t.d(s,{Z:()=>i,a:()=>n});var r=t(7294);const o={},c=r.createContext(o);function n(e){const s=r.useContext(c);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:n(e.components),r.createElement(c.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/46c0d933.19808eaf.js b/assets/js/46c0d933.19808eaf.js deleted file mode 100644 index 664cc11..0000000 --- a/assets/js/46c0d933.19808eaf.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[577],{3781:t=>{t.exports=JSON.parse('{"title":"Slots","description":"All about curio slots and how to manage them.","slug":"/category/slots","permalink":"/category/slots","navigation":{"previous":{"title":"Setting Up the Development Environment","permalink":"/curios/getting-started"},"next":{"title":"Slot Types","permalink":"/curios/slots/slot-register"}}}')}}]); \ No newline at end of file diff --git a/assets/js/46c0d933.cf7a778c.js b/assets/js/46c0d933.cf7a778c.js new file mode 100644 index 0000000..99ca5e7 --- /dev/null +++ b/assets/js/46c0d933.cf7a778c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[6577],{3781:t=>{t.exports=JSON.parse('{"title":"Slots","description":"All about curio slots and how to manage them.","slug":"/category/slots","permalink":"/category/slots","navigation":{"previous":{"title":"Setting Up the Development Environment","permalink":"/curios/getting-started"},"next":{"title":"Slot Types","permalink":"/curios/slots/slot-register"}}}')}}]); \ No newline at end of file diff --git a/assets/js/4c92833a.3e9f3bb6.js b/assets/js/4c92833a.3e9f3bb6.js deleted file mode 100644 index 6c9359e..0000000 --- a/assets/js/4c92833a.3e9f3bb6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[270],{1119:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>t,default:()=>a,frontMatter:()=>r,metadata:()=>c,toc:()=>o});var i=s(5893),l=s(1151);const r={sidebar_position:14},t="Commands",c={id:"curios/commands",title:"Commands",description:"A tutorial on the various commands available through Curios.",source:"@site/docs/curios/commands.md",sourceDirName:"curios",slug:"/curios/commands",permalink:"/curios/commands",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/commands.md",tags:[],version:"current",sidebarPosition:14,frontMatter:{sidebar_position:14},sidebar:"tutorialSidebar",previous:{title:"Configuration",permalink:"/curios/configuration"},next:{title:"Diet",permalink:"/category/diet"}},d={},o=[{value:"Command Guide",id:"command-guide",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Arguments",id:"arguments",level:2},{value:"Examples",id:"examples",level:2},{value:"Entity Selector Options",id:"entity-selector-options",level:2},{value:"Tag Format",id:"tag-format",level:3},{value:"Inverting",id:"inverting",level:3},{value:"Examples",id:"examples-1",level:3}];function h(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"commands",children:"Commands"}),"\n",(0,i.jsx)(n.p,{children:"A tutorial on the various commands available through Curios."}),"\n",(0,i.jsx)(n.h2,{id:"command-guide",children:"Command Guide"}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Syntax"}),(0,i.jsx)(n.th,{children:"Meaning"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"plain text"})}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.strong,{children:"Enter this literally"}),", exactly as shown."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:" "})}),(0,i.jsxs)(n.td,{children:["An ",(0,i.jsx)(n.strong,{children:"argument"})," that should be replaced with an appropriate value."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"[entry]"})}),(0,i.jsxs)(n.td,{children:["This entry is ",(0,i.jsx)(n.strong,{children:"optional"}),"."]})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"syntax",children:"Syntax"}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsxs)(n.p,{children:["All the commands begin with ",(0,i.jsx)(n.code,{children:"curios"})," and have the following options:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"list"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Outputs a list of slot identifiers, categorized by mod."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"replace with - [amount]"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Places the specified item in the specified slot on the target player."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"set
[amount]"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Sets a number of slots for the specified slot type on the target player."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"add [amount]"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Adds a number of slots for the specified slot type on the target player."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"remove [amount]"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Removes a number of slots for the specified slot type on the target player."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"clear [slotId]"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Clears the specified slot type of all its items. If no slot type is specified, all curios items will be cleared."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"drop [slotId]"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Drops all the items in the specified slot type. If no slot type is specified, all curios items will be dropped."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"reset "}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Resets the target player's curios inventory to its default slots, also clears all curios items."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"arguments",children:"Arguments"}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:" "}),": ",(0,i.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#minecraft:entity",children:"player"})]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Specifies the player to perform the command on."}),"\n",(0,i.jsx)(n.li,{children:"Must be a player name, a target selector, or a UUID."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:" "}),": ",(0,i.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#int",children:"int"})]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Specifies the quantity of slots or items."}),"\n",(0,i.jsx)(n.li,{children:"Must be a whole number greater than or equal to 1."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:" "}),": ",(0,i.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#int",children:"int"})]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Specifies the index within the slot type."}),"\n",(0,i.jsx)(n.li,{children:"Must be a whole number greater than or equal to 0."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:" "}),": ",(0,i.jsx)(n.a,{href:"/curios/slots/slot-register",children:"slot_identifier"})]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Specifies a slot type."}),"\n",(0,i.jsx)(n.li,{children:"Must be an identifier of a registered slot type."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["To add 3 ",(0,i.jsx)(n.code,{children:'"ring"'})," slots to a player:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"curios add ring Player123 1"})}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["To place a ",(0,i.jsx)(n.code,{children:'"minecraft:totem_of_undying"'})," item in the first ",(0,i.jsx)(n.code,{children:'"charm"'})," slot found on a player:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"curios replace charm 0 Player123 with minecraft:totem_of_undying 1"})}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"entity-selector-options",children:"Entity Selector Options"}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.p,{children:"Curios has a custom entity selector option to use with commands that target entities, such as @a or @p."}),"\n",(0,i.jsxs)(n.p,{children:["The option starts with curios= and takes in a single ",(0,i.jsx)(n.strong,{children:"CompoundTag"})," as an argument. A blank tag would be ",(0,i.jsx)(n.code,{children:"curios={}"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"tag-format",children:"Tag Format"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"CompoundTag"})," has the following fields:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"item"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"required:"})," false"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"type:"})," ",(0,i.jsx)(n.strong,{children:"CompoundTag"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"description:"})," Denotes an item to match in the target's curios inventory."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Example:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:'curios={item:{id:"minecraft:glass_bottle"}}'})}),"\n",(0,i.jsxs)(n.li,{children:["This will search for a ",(0,i.jsx)(n.code,{children:"minecraft:glass_bottle"})," in the target's curios inventory."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"slot"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"required:"})," false"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"type:"})," string[]"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"description:"})," Denotes a slot type to search in the target's curios inventory."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Example:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:'curios={slot:["ring"]}'})}),"\n",(0,i.jsxs)(n.li,{children:["This will search for ",(0,i.jsx)(n.code,{children:'"ring"'})," slots in the target's curios inventory."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"index"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"required:"})," false"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"type:"})," int[min, max]"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"description:"})," Denotes the indices in slots to search in the target's curios inventory."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Example:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"curios={index:[0,1]}"})}),"\n",(0,i.jsx)(n.li,{children:"This will search for the first index of each slot type in the target's curios inventory."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"exclusive"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"required:"})," false"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"type:"})," boolean"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"description:"})," Denotes whether the selector is searching for only one match."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Example:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:'curios={slot:["ring"],exclusive:true}'})}),"\n",(0,i.jsxs)(n.li,{children:["This will search for ",(0,i.jsx)(n.code,{children:'"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."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"inverting",children:"Inverting"}),"\n",(0,i.jsxs)(n.p,{children:["The selector option also supports inverting. Placing a ",(0,i.jsx)(n.code,{children:"!"})," before the ",(0,i.jsx)(n.strong,{children:"CompoundTag"})," will invert the search.\nFor example, ",(0,i.jsx)(n.code,{children:'curios=!{slot:["ring"]}'})," will search for targets that do ",(0,i.jsx)(n.em,{children:"not"})," have ",(0,i.jsx)(n.code,{children:'"ring"'})," slots in their curios inventory."]}),"\n",(0,i.jsx)(n.h3,{id:"examples-1",children:"Examples"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["To kill all players who have a ",(0,i.jsx)(n.code,{children:"minecraft:glass_bottle"})," in a ",(0,i.jsx)(n.code,{children:'"ring"'})," slot of the curios inventory:","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:'/kill @a[curios={item:{id:"minecraft:glass_bottle"},slot:["ring"]}]'})}),"\n"]}),"\n"]}),"\n"]})]})}function a(e={}){const{wrapper:n}={...(0,l.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>c,a:()=>t});var i=s(7294);const l={},r=i.createContext(l);function t(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:t(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4c92833a.c7ae7d48.js b/assets/js/4c92833a.c7ae7d48.js new file mode 100644 index 0000000..4158d6f --- /dev/null +++ b/assets/js/4c92833a.c7ae7d48.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[6270],{1119:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>t,default:()=>a,frontMatter:()=>r,metadata:()=>c,toc:()=>o});var i=s(5893),l=s(1151);const r={sidebar_position:14},t="Commands",c={id:"curios/commands",title:"Commands",description:"A tutorial on the various commands available through Curios.",source:"@site/docs/curios/commands.md",sourceDirName:"curios",slug:"/curios/commands",permalink:"/curios/commands",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/commands.md",tags:[],version:"current",sidebarPosition:14,frontMatter:{sidebar_position:14},sidebar:"tutorialSidebar",previous:{title:"Configuration",permalink:"/curios/configuration"},next:{title:"Diet",permalink:"/category/diet"}},d={},o=[{value:"Command Guide",id:"command-guide",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Arguments",id:"arguments",level:2},{value:"Examples",id:"examples",level:2},{value:"Entity Selector Options",id:"entity-selector-options",level:2},{value:"Tag Format",id:"tag-format",level:3},{value:"Inverting",id:"inverting",level:3},{value:"Examples",id:"examples-1",level:3}];function h(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"commands",children:"Commands"}),"\n",(0,i.jsx)(n.p,{children:"A tutorial on the various commands available through Curios."}),"\n",(0,i.jsx)(n.h2,{id:"command-guide",children:"Command Guide"}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Syntax"}),(0,i.jsx)(n.th,{children:"Meaning"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"plain text"})}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.strong,{children:"Enter this literally"}),", exactly as shown."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:" "})}),(0,i.jsxs)(n.td,{children:["An ",(0,i.jsx)(n.strong,{children:"argument"})," that should be replaced with an appropriate value."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"[entry]"})}),(0,i.jsxs)(n.td,{children:["This entry is ",(0,i.jsx)(n.strong,{children:"optional"}),"."]})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"syntax",children:"Syntax"}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsxs)(n.p,{children:["All the commands begin with ",(0,i.jsx)(n.code,{children:"curios"})," and have the following options:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"list"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Outputs a list of slot identifiers, categorized by mod."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"replace with - [amount]"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Places the specified item in the specified slot on the target player."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"set
[amount]"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Sets a number of slots for the specified slot type on the target player."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"add [amount]"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Adds a number of slots for the specified slot type on the target player."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"remove [amount]"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Removes a number of slots for the specified slot type on the target player."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"clear [slotId]"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Clears the specified slot type of all its items. If no slot type is specified, all curios items will be cleared."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"drop [slotId]"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Drops all the items in the specified slot type. If no slot type is specified, all curios items will be dropped."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"reset "}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Resets the target player's curios inventory to its default slots, also clears all curios items."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"arguments",children:"Arguments"}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:" "}),": ",(0,i.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#minecraft:entity",children:"player"})]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Specifies the player to perform the command on."}),"\n",(0,i.jsx)(n.li,{children:"Must be a player name, a target selector, or a UUID."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:" "}),": ",(0,i.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#int",children:"int"})]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Specifies the quantity of slots or items."}),"\n",(0,i.jsx)(n.li,{children:"Must be a whole number greater than or equal to 1."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:" "}),": ",(0,i.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#int",children:"int"})]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Specifies the index within the slot type."}),"\n",(0,i.jsx)(n.li,{children:"Must be a whole number greater than or equal to 0."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:" "}),": ",(0,i.jsx)(n.a,{href:"/curios/slots/slot-register",children:"slot_identifier"})]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Specifies a slot type."}),"\n",(0,i.jsx)(n.li,{children:"Must be an identifier of a registered slot type."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["To add 3 ",(0,i.jsx)(n.code,{children:'"ring"'})," slots to a player:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"curios add ring Player123 1"})}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["To place a ",(0,i.jsx)(n.code,{children:'"minecraft:totem_of_undying"'})," item in the first ",(0,i.jsx)(n.code,{children:'"charm"'})," slot found on a player:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"curios replace charm 0 Player123 with minecraft:totem_of_undying 1"})}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"entity-selector-options",children:"Entity Selector Options"}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.p,{children:"Curios has a custom entity selector option to use with commands that target entities, such as @a or @p."}),"\n",(0,i.jsxs)(n.p,{children:["The option starts with curios= and takes in a single ",(0,i.jsx)(n.strong,{children:"CompoundTag"})," as an argument. A blank tag would be ",(0,i.jsx)(n.code,{children:"curios={}"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"tag-format",children:"Tag Format"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"CompoundTag"})," has the following fields:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"item"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"required:"})," false"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"type:"})," ",(0,i.jsx)(n.strong,{children:"CompoundTag"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"description:"})," Denotes an item to match in the target's curios inventory."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Example:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:'curios={item:{id:"minecraft:glass_bottle"}}'})}),"\n",(0,i.jsxs)(n.li,{children:["This will search for a ",(0,i.jsx)(n.code,{children:"minecraft:glass_bottle"})," in the target's curios inventory."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"slot"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"required:"})," false"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"type:"})," string[]"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"description:"})," Denotes a slot type to search in the target's curios inventory."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Example:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:'curios={slot:["ring"]}'})}),"\n",(0,i.jsxs)(n.li,{children:["This will search for ",(0,i.jsx)(n.code,{children:'"ring"'})," slots in the target's curios inventory."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"index"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"required:"})," false"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"type:"})," int[min, max]"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"description:"})," Denotes the indices in slots to search in the target's curios inventory."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Example:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"curios={index:[0,1]}"})}),"\n",(0,i.jsx)(n.li,{children:"This will search for the first index of each slot type in the target's curios inventory."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"exclusive"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"required:"})," false"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"type:"})," boolean"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"description:"})," Denotes whether the selector is searching for only one match."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Example:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:'curios={slot:["ring"],exclusive:true}'})}),"\n",(0,i.jsxs)(n.li,{children:["This will search for ",(0,i.jsx)(n.code,{children:'"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."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"inverting",children:"Inverting"}),"\n",(0,i.jsxs)(n.p,{children:["The selector option also supports inverting. Placing a ",(0,i.jsx)(n.code,{children:"!"})," before the ",(0,i.jsx)(n.strong,{children:"CompoundTag"})," will invert the search.\nFor example, ",(0,i.jsx)(n.code,{children:'curios=!{slot:["ring"]}'})," will search for targets that do ",(0,i.jsx)(n.em,{children:"not"})," have ",(0,i.jsx)(n.code,{children:'"ring"'})," slots in their curios inventory."]}),"\n",(0,i.jsx)(n.h3,{id:"examples-1",children:"Examples"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["To kill all players who have a ",(0,i.jsx)(n.code,{children:"minecraft:glass_bottle"})," in a ",(0,i.jsx)(n.code,{children:'"ring"'})," slot of the curios inventory:","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:'/kill @a[curios={item:{id:"minecraft:glass_bottle"},slot:["ring"]}]'})}),"\n"]}),"\n"]}),"\n"]})]})}function a(e={}){const{wrapper:n}={...(0,l.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>c,a:()=>t});var i=s(7294);const l={},r=i.createContext(l);function t(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:t(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/55cacdb9.53a496d5.js b/assets/js/55cacdb9.53a496d5.js new file mode 100644 index 0000000..ba2c85b --- /dev/null +++ b/assets/js/55cacdb9.53a496d5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[3393],{5221:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>t,default:()=>h,frontMatter:()=>o,metadata:()=>a,toc:()=>d});var s=i(5893),r=i(1151);const o={sidebar_position:1},t="Assigning Block Groups",a={id:"veinmining/block-groups",title:"Assigning Block Groups",description:"A tutorial on how to assign blocks to groups so that they are vein mined together when applicable.",source:"@site/docs/veinmining/block-groups.md",sourceDirName:"veinmining",slug:"/veinmining/block-groups",permalink:"/veinmining/block-groups",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/veinmining/block-groups.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Vein Mining",permalink:"/category/vein-mining"}},l={},d=[{value:"Overview",id:"overview",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:3},{value:"Datapack",id:"datapack",level:2},{value:"Syntax",id:"syntax",level:3},{value:"Example",id:"example-1",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"assigning-block-groups",children:"Assigning Block Groups"}),"\n",(0,s.jsx)(n.p,{children:"A tutorial on how to assign blocks to groups so that they are vein mined together when applicable."}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(n.p,{children:"Block groups are used by Vein Mining to determine which blocks should be vein mined together if they are next to each\nother but are not the same type of block. This is useful when there are different blocks in a world that share\nenough similar characteristics that they should be vein mined together and not separately. For example, ores and their\ndeepslate versions are functionally identical. As such, Vein Mining configures these groupings natively already."}),"\n",(0,s.jsx)(n.p,{children:"These groups can be configured through the configuration file or through datapacks, allowing both modpack developers and\nmod developers to specify which groupings should apply within their specific environment."}),"\n",(0,s.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsxs)(n.p,{children:["The configuration field for block groups is located in the ",(0,s.jsx)(n.code,{children:"veinmining-server.toml"})," file in the ",(0,s.jsx)(n.code,{children:"config"})," folder in the\nroot Minecraft instance folder."]}),"\n",(0,s.jsxs)(n.p,{children:["The field is called ",(0,s.jsx)(n.code,{children:"groupsList"})," and will, by default, be auto-populated with a list of common ore tags so that similar\nores can be vein mined together."]}),"\n",(0,s.jsx)(n.p,{children:"This is represented as a list of strings, and each string is a group entry with blocks IDs or tags seperated by a\nsemicolon."}),"\n",(0,s.jsx)(n.h3,{id:"example",children:"Example"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'groupsList = ["minecraft:grass_block;minecraft:dirt", "minecraft:diamond_ore;minecraft:emerald_ore"]\n'})}),"\n",(0,s.jsx)(n.p,{children:"These entries specify two different groups:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Group 1 - Grass blocks and dirt blocks"}),"\n",(0,s.jsx)(n.li,{children:"Group 2 - Diamond ores and emerald ores"}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"This means that, when vein mined, grass blocks and dirt blocks will be vein mined together. This applies regardless of\nwhich block is the origin block. The same will apply to diamond ores and emerald ores."}),"\n",(0,s.jsx)(n.h2,{id:"datapack",children:"Datapack"}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsxs)(n.p,{children:["Block groups can be specified purely through datapacks, allowing specifications to be applied without depending on Vein\nMining directly. The data file should be created as ",(0,s.jsx)(n.code,{children:"~/data/(namespace)/veinmining/groups.json"})," in the datapack."]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"(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."]})}),"\n",(0,s.jsx)(n.h3,{id:"syntax",children:"Syntax"}),"\n",(0,s.jsxs)(n.p,{children:["The structure of the ",(0,s.jsx)(n.code,{children:".json"})," file for the groups consists of a top-level JSON object that holds various fields\nrelated to the groups specifications."]}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Field"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Default"}),(0,s.jsx)(n.th,{children:"Required"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"replace"})}),(0,s.jsx)(n.td,{children:"boolean"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"false"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"false"})}),(0,s.jsx)(n.td,{children:"If true, replaces all entries on lower-priority datapacks with this one"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"groups"})}),(0,s.jsx)(n.td,{children:"string[]"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"[]"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"false"})}),(0,s.jsx)(n.td,{children:"The list of block groups represented as an array of string arrays of block IDs or tags"})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"example-1",children:"Example"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "replace": false,\n "groups": [\n ["minecraft:grass_block", "minecraft:dirt"],\n ["minecraft:diamond_ore", "minecraft:emerald_ore"]\n ]\n}\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Same as the example from ",(0,s.jsx)(n.a,{href:"#-example",children:"the previous section"}),", this ",(0,s.jsx)(n.code,{children:"groups.json"})," file specifies two different groups:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Group 1 - Grass blocks and dirt blocks"}),"\n",(0,s.jsx)(n.li,{children:"Group 2 - Diamond ores and emerald ores"}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"This means that, when vein mined, grass blocks and dirt blocks will be vein mined together. This applies regardless of\nwhich block is the origin block. The same will apply to diamond ores and emerald ores."})]})}function h(e={}){const{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>a,a:()=>t});var s=i(7294);const r={},o=s.createContext(r);function t(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5e95c892.477f59fb.js b/assets/js/5e95c892.477f59fb.js deleted file mode 100644 index f16ae5d..0000000 --- a/assets/js/5e95c892.477f59fb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[661],{1892:(s,e,r)=>{r.r(e),r.d(e,{default:()=>d});r(7294);var u=r(512),l=r(1944),c=r(5281),o=r(8790),a=r(6040),i=r(5893);function d(s){return(0,i.jsx)(l.FG,{className:(0,u.Z)(c.k.wrapper.docsPages),children:(0,i.jsx)(a.Z,{children:(0,o.H)(s.route.routes)})})}}}]); \ No newline at end of file diff --git a/assets/js/5e95c892.6162f7a9.js b/assets/js/5e95c892.6162f7a9.js new file mode 100644 index 0000000..f1781af --- /dev/null +++ b/assets/js/5e95c892.6162f7a9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[9661],{1892:(s,e,r)=>{r.r(e),r.d(e,{default:()=>d});r(7294);var u=r(512),l=r(1944),c=r(5281),o=r(8790),a=r(6040),i=r(5893);function d(s){return(0,i.jsx)(l.FG,{className:(0,u.Z)(c.k.wrapper.docsPages),children:(0,i.jsx)(a.Z,{children:(0,o.H)(s.route.routes)})})}}}]); \ No newline at end of file diff --git a/assets/js/63c2b707.8ff7d1d9.js b/assets/js/63c2b707.8ff7d1d9.js new file mode 100644 index 0000000..3813705 --- /dev/null +++ b/assets/js/63c2b707.8ff7d1d9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[4006],{5781:i=>{i.exports=JSON.parse('{"title":"Vein Mining","description":"A lightweight, highly configurable Vein Mining enchantment for tools.","slug":"/category/vein-mining","permalink":"/category/vein-mining","navigation":{"previous":{"title":"Example Datapack","permalink":"/diet/datapack-example"},"next":{"title":"Assigning Block Groups","permalink":"/veinmining/block-groups"}}}')}}]); \ No newline at end of file diff --git a/assets/js/6c8344a3.0d9deb36.js b/assets/js/6c8344a3.0d9deb36.js new file mode 100644 index 0000000..340cb83 --- /dev/null +++ b/assets/js/6c8344a3.0d9deb36.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[4933],{9580:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>c});var s=i(5893),t=i(1151);const a={sidebar_position:1},r="Game Stages",o={id:"champions/integration/gamestages",title:"Game Stages",description:"Champions supports staging champions and ranks using the Game Stages mod.",source:"@site/versioned_docs/version-1.18.x/champions/integration/gamestages.md",sourceDirName:"champions/integration",slug:"/champions/integration/gamestages",permalink:"/1.18.x/champions/integration/gamestages",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/versioned_docs/version-1.18.x/champions/integration/gamestages.md",tags:[],version:"1.18.x",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Mod Integrations",permalink:"/1.18.x/category/mod-integrations"},next:{title:"Scaling Health",permalink:"/1.18.x/champions/integration/scalinghealth"}},l={},c=[{value:"Configuration",id:"configuration",level:3},{value:"Entity Stages",id:"entity-stages",level:2},{value:"Syntax",id:"syntax",level:3},{value:"Examples",id:"examples",level:3},{value:"Tier Stages",id:"tier-stages",level:2},{value:"Syntax",id:"syntax-1",level:3},{value:"Examples",id:"examples-1",level:3},{value:"Arguments",id:"arguments",level:3}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"game-stages",children:"Game Stages"}),"\n",(0,s.jsxs)(n.p,{children:["Champions supports staging champions and ranks using the ",(0,s.jsx)(n.a,{href:"https://github.com/Darkhax-Minecraft/Game-Stages",children:"Game Stages"})," mod."]}),"\n",(0,s.jsx)(n.p,{children:"This allows users and modpack developers to gate certain entities from becoming champions or champions from achieving certain ranks\nuntil the configured stage has been unlocked by a nearby player."}),"\n",(0,s.jsx)(n.p,{children:"A nearby player is considered to be any player within 256 blocks of the entity."}),"\n",(0,s.jsx)(n.h3,{id:"configuration",children:"Configuration"}),"\n",(0,s.jsxs)(n.p,{children:["Staging configuration can be modified through the ",(0,s.jsx)(n.code,{children:"champions-gamestages.toml"})," configuration file located in the ",(0,s.jsx)(n.code,{children:"world"})," folder's or the ",(0,s.jsx)(n.code,{children:"saves/ "})," folder's ",(0,s.jsx)(n.code,{children:"serverconfig"})," folder."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["The configuration file will only generate if ",(0,s.jsx)(n.strong,{children:"Champions"})," detects ",(0,s.jsx)(n.strong,{children:"Game Stages"})," during mod loading. The configuration file will not be present until the two mods have been loaded together."]})}),"\n",(0,s.jsx)(n.h2,{id:"entity-stages",children:"Entity Stages"}),"\n",(0,s.jsx)(n.p,{children:"Entity stages can be used to gate specific entities from becoming champions until a nearby player has unlocked the required stages."}),"\n",(0,s.jsx)(n.p,{children:"By default, the configuration is empty."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'#A list of entity stages in the format: "stage;modid:entity" or "stage;modid:entity;modid:dimension"\n#Example: "test_stage;minecraft:zombie" or "test_stage;minecraft:spider;minecraft:the_nether"\nentityStages = []\n'})}),"\n",(0,s.jsx)(n.h3,{id:"syntax",children:"Syntax"}),"\n",(0,s.jsx)(n.p,{children:"There are two different formats:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"stage;entity"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The specified entity will not become a champion unless a nearby player has unlocked the specified stage."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"stage;entity;dimension"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The specified entity ",(0,s.jsx)(n.strong,{children:"in the specified dimension"})," will not become a champion unless a nearby player has unlocked the specified stage."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"examples",children:"Examples"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'entityStages = ["first_stage;minecraft:spider"]\n'})}),"\n",(0,s.jsxs)(n.p,{children:["A ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Spider",children:"spider"})," cannot become a champion unless a nearby player has the ",(0,s.jsx)(n.code,{children:"first_stage"})," stage unlocked."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'entityStages = ["first_stage;minecraft:spider", "second_stage;minecraft:ghast;minecraft:the_nether"]\n'})}),"\n",(0,s.jsxs)(n.p,{children:["The same as the previous example except with the addition that a ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Ghast",children:"ghast"})," cannot become a champion ",(0,s.jsx)(n.strong,{children:"in the Nether"})," unless a nearby player has the ",(0,s.jsx)(n.code,{children:"second_stage"})," stage unlocked."]}),"\n",(0,s.jsx)(n.h2,{id:"tier-stages",children:"Tier Stages"}),"\n",(0,s.jsx)(n.p,{children:"Tier stages can be used to gate champions from becoming a specific rank until a nearby player has unlocked the required stages."}),"\n",(0,s.jsx)(n.p,{children:"By default, the configuration is empty."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'#A list of tier stages in the format: "stage;tier" or "stage;tier;modid:dimension"\n#Example: "test_stage;2" or "test_stage;3;minecraft:the_nether"\ntierStages = []\n'})}),"\n",(0,s.jsx)(n.h3,{id:"syntax-1",children:"Syntax"}),"\n",(0,s.jsx)(n.p,{children:"There are two different formats:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"stage;tier"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Champions will not become the rank of the specified tier unless a nearby player has unlocked the specified stage."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"stage;tier;dimension"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Champions ",(0,s.jsx)(n.strong,{children:"in the specified dimension"})," will not become the rank of the specified tier unless a nearby player has unlocked the specified stage."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"examples-1",children:"Examples"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'tierStages = ["first_stage;2"]\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Champions cannot become ranks of tier 2 or above unless a nearby player has the ",(0,s.jsx)(n.code,{children:"first_stage"})," stage unlocked."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'tierStages = ["first_stage;2", "second_stage;3;minecraft:the_nether"]\n'})}),"\n",(0,s.jsxs)(n.p,{children:["The same as the previous example except with the addition that champions ",(0,s.jsx)(n.strong,{children:"in the Nether"})," cannot become ranks of tier 3 or above unless a nearby player has the ",(0,s.jsx)(n.code,{children:"second_stage"})," unlocked."]}),"\n",(0,s.jsx)(n.h3,{id:"arguments",children:"Arguments"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"stage"}),": ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#basic_string",children:"basic_string"})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Specifies the name of the stage required for this entry."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"entity"}),": ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#entity_summon",children:"entity_summon"})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Specifies the entity to be summoned."}),"\n",(0,s.jsxs)(n.li,{children:["Must be a ID of a ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Entity",children:"entity"})," type."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"tier"}),": ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#int",children:"int"})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Specifies the champion tier of the entity."}),"\n",(0,s.jsxs)(n.li,{children:["Must be a valid tier from a rank as specified in the ",(0,s.jsx)(n.code,{children:"champions-rank.toml"})," configuration file."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"dimension"}),": ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#minecraft:dimension",children:"dimension"})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Specifies the dimension of the entity."}),"\n",(0,s.jsx)(n.li,{children:"Must be a ID for a registered dimension."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["Specifying multiple stages for a specific tier or entity will require any nearby player to have ",(0,s.jsx)(n.em,{children:"all"})," of those stages before the requirements are met."]})})]})}function h(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>o,a:()=>r});var s=i(7294);const t={},a=s.createContext(t);function r(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6c8344a3.0f7b0e7b.js b/assets/js/6c8344a3.0f7b0e7b.js deleted file mode 100644 index e124d65..0000000 --- a/assets/js/6c8344a3.0f7b0e7b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[933],{9580:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>c});var s=i(5893),t=i(1151);const a={sidebar_position:1},r="Game Stages",o={id:"champions/integration/gamestages",title:"Game Stages",description:"Champions supports staging champions and ranks using the Game Stages mod.",source:"@site/versioned_docs/version-1.18.x/champions/integration/gamestages.md",sourceDirName:"champions/integration",slug:"/champions/integration/gamestages",permalink:"/1.18.x/champions/integration/gamestages",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/versioned_docs/version-1.18.x/champions/integration/gamestages.md",tags:[],version:"1.18.x",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Mod Integrations",permalink:"/1.18.x/category/mod-integrations"},next:{title:"Scaling Health",permalink:"/1.18.x/champions/integration/scalinghealth"}},l={},c=[{value:"Configuration",id:"configuration",level:3},{value:"Entity Stages",id:"entity-stages",level:2},{value:"Syntax",id:"syntax",level:3},{value:"Examples",id:"examples",level:3},{value:"Tier Stages",id:"tier-stages",level:2},{value:"Syntax",id:"syntax-1",level:3},{value:"Examples",id:"examples-1",level:3},{value:"Arguments",id:"arguments",level:3}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"game-stages",children:"Game Stages"}),"\n",(0,s.jsxs)(n.p,{children:["Champions supports staging champions and ranks using the ",(0,s.jsx)(n.a,{href:"https://github.com/Darkhax-Minecraft/Game-Stages",children:"Game Stages"})," mod."]}),"\n",(0,s.jsx)(n.p,{children:"This allows users and modpack developers to gate certain entities from becoming champions or champions from achieving certain ranks\nuntil the configured stage has been unlocked by a nearby player."}),"\n",(0,s.jsx)(n.p,{children:"A nearby player is considered to be any player within 256 blocks of the entity."}),"\n",(0,s.jsx)(n.h3,{id:"configuration",children:"Configuration"}),"\n",(0,s.jsxs)(n.p,{children:["Staging configuration can be modified through the ",(0,s.jsx)(n.code,{children:"champions-gamestages.toml"})," configuration file located in the ",(0,s.jsx)(n.code,{children:"world"})," folder's or the ",(0,s.jsx)(n.code,{children:"saves/ "})," folder's ",(0,s.jsx)(n.code,{children:"serverconfig"})," folder."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["The configuration file will only generate if ",(0,s.jsx)(n.strong,{children:"Champions"})," detects ",(0,s.jsx)(n.strong,{children:"Game Stages"})," during mod loading. The configuration file will not be present until the two mods have been loaded together."]})}),"\n",(0,s.jsx)(n.h2,{id:"entity-stages",children:"Entity Stages"}),"\n",(0,s.jsx)(n.p,{children:"Entity stages can be used to gate specific entities from becoming champions until a nearby player has unlocked the required stages."}),"\n",(0,s.jsx)(n.p,{children:"By default, the configuration is empty."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'#A list of entity stages in the format: "stage;modid:entity" or "stage;modid:entity;modid:dimension"\n#Example: "test_stage;minecraft:zombie" or "test_stage;minecraft:spider;minecraft:the_nether"\nentityStages = []\n'})}),"\n",(0,s.jsx)(n.h3,{id:"syntax",children:"Syntax"}),"\n",(0,s.jsx)(n.p,{children:"There are two different formats:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"stage;entity"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The specified entity will not become a champion unless a nearby player has unlocked the specified stage."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"stage;entity;dimension"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The specified entity ",(0,s.jsx)(n.strong,{children:"in the specified dimension"})," will not become a champion unless a nearby player has unlocked the specified stage."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"examples",children:"Examples"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'entityStages = ["first_stage;minecraft:spider"]\n'})}),"\n",(0,s.jsxs)(n.p,{children:["A ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Spider",children:"spider"})," cannot become a champion unless a nearby player has the ",(0,s.jsx)(n.code,{children:"first_stage"})," stage unlocked."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'entityStages = ["first_stage;minecraft:spider", "second_stage;minecraft:ghast;minecraft:the_nether"]\n'})}),"\n",(0,s.jsxs)(n.p,{children:["The same as the previous example except with the addition that a ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Ghast",children:"ghast"})," cannot become a champion ",(0,s.jsx)(n.strong,{children:"in the Nether"})," unless a nearby player has the ",(0,s.jsx)(n.code,{children:"second_stage"})," stage unlocked."]}),"\n",(0,s.jsx)(n.h2,{id:"tier-stages",children:"Tier Stages"}),"\n",(0,s.jsx)(n.p,{children:"Tier stages can be used to gate champions from becoming a specific rank until a nearby player has unlocked the required stages."}),"\n",(0,s.jsx)(n.p,{children:"By default, the configuration is empty."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'#A list of tier stages in the format: "stage;tier" or "stage;tier;modid:dimension"\n#Example: "test_stage;2" or "test_stage;3;minecraft:the_nether"\ntierStages = []\n'})}),"\n",(0,s.jsx)(n.h3,{id:"syntax-1",children:"Syntax"}),"\n",(0,s.jsx)(n.p,{children:"There are two different formats:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"stage;tier"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Champions will not become the rank of the specified tier unless a nearby player has unlocked the specified stage."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"stage;tier;dimension"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Champions ",(0,s.jsx)(n.strong,{children:"in the specified dimension"})," will not become the rank of the specified tier unless a nearby player has unlocked the specified stage."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"examples-1",children:"Examples"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'tierStages = ["first_stage;2"]\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Champions cannot become ranks of tier 2 or above unless a nearby player has the ",(0,s.jsx)(n.code,{children:"first_stage"})," stage unlocked."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'tierStages = ["first_stage;2", "second_stage;3;minecraft:the_nether"]\n'})}),"\n",(0,s.jsxs)(n.p,{children:["The same as the previous example except with the addition that champions ",(0,s.jsx)(n.strong,{children:"in the Nether"})," cannot become ranks of tier 3 or above unless a nearby player has the ",(0,s.jsx)(n.code,{children:"second_stage"})," unlocked."]}),"\n",(0,s.jsx)(n.h3,{id:"arguments",children:"Arguments"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"stage"}),": ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#basic_string",children:"basic_string"})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Specifies the name of the stage required for this entry."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"entity"}),": ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#entity_summon",children:"entity_summon"})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Specifies the entity to be summoned."}),"\n",(0,s.jsxs)(n.li,{children:["Must be a ID of a ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Entity",children:"entity"})," type."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"tier"}),": ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#int",children:"int"})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Specifies the champion tier of the entity."}),"\n",(0,s.jsxs)(n.li,{children:["Must be a valid tier from a rank as specified in the ",(0,s.jsx)(n.code,{children:"champions-rank.toml"})," configuration file."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"dimension"}),": ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#minecraft:dimension",children:"dimension"})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Specifies the dimension of the entity."}),"\n",(0,s.jsx)(n.li,{children:"Must be a ID for a registered dimension."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["Specifying multiple stages for a specific tier or entity will require any nearby player to have ",(0,s.jsx)(n.em,{children:"all"})," of those stages before the requirements are met."]})})]})}function h(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>o,a:()=>r});var s=i(7294);const t={},a=s.createContext(t);function r(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6e5aa4fa.5ab8692f.js b/assets/js/6e5aa4fa.5ab8692f.js deleted file mode 100644 index e3790e5..0000000 --- a/assets/js/6e5aa4fa.5ab8692f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[499],{4888:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>a,frontMatter:()=>s,metadata:()=>c,toc:()=>o});var t=i(5893),d=i(1151);const s={sidebar_position:1},r="ICurioRenderer",c={id:"curios/api/renderer-interface",title:"ICurioRenderer",description:"Methods",source:"@site/docs/curios/api/renderer-interface.md",sourceDirName:"curios/api",slug:"/curios/api/renderer-interface",permalink:"/curios/api/renderer-interface",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/api/renderer-interface.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"API",permalink:"/category/api"},next:{title:"Configuration",permalink:"/curios/configuration"}},l={},o=[{value:"Methods",id:"methods",level:2},{value:"Reference",id:"reference",level:2},{value:" render()
",id:"render",level:3},{value:"static translateIfSneaking()
",id:"static-translateifsneaking",level:3},{value:"static rotateIfSneaking()
",id:"static-rotateifsneaking",level:3},{value:"static followHeadRotations()
",id:"static-followheadrotations",level:3},{value:"static followBodyRotations()
",id:"static-followbodyrotations",level:3}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"icuriorenderer",children:(0,t.jsx)(n.code,{children:"ICurioRenderer"})}),"\n",(0,t.jsx)(n.h2,{id:"methods",children:"Methods"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"#reference",children:"Reference"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#render",children:"render()"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#static-translateifsneaking",children:"static translateIfSneaking()"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#static-rotateifsneaking",children:"static rotateIfSneaking()"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#static-followheadrotations",children:"static followHeadRotations()"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#static-followbodyrotations",children:"static followBodyRotations()"})}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"reference",children:"Reference"}),"\n",(0,t.jsx)(n.h3,{id:"render",children:(0,t.jsx)(n.code,{children:"render()"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.p,{children:"Runs the rendering code when an associated item is equipped in a curio slot and the visibility of the rendering is\nenabled. An equipped cosmetic item will override the rendering of its related functional item."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters:"})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Name"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"stack"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ItemStack"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"ItemStack"})," being rendered"]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"slotContext"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"SlotContext"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"SlotContext"})," for the slot with the ",(0,t.jsx)(n.code,{children:"ItemStack"})," being rendered"]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"poseStack"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"PoseStack"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"PoseStack"})," passed from the parent ",(0,t.jsx)(n.code,{children:"RenderLayer"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"renderLayerParent"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"RenderLayerParent"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"RenderLayerParent"})," passed from the parent ",(0,t.jsx)(n.code,{children:"RenderLayer"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"light"})}),(0,t.jsx)(n.td,{children:"integer"}),(0,t.jsx)(n.td,{children:"Light value"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"limbSwing"})}),(0,t.jsx)(n.td,{children:"float"}),(0,t.jsx)(n.td,{children:"Limb swing value"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"limbSwingAmount"})}),(0,t.jsx)(n.td,{children:"float"}),(0,t.jsx)(n.td,{children:"Limb swing amount value"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"partialTicks"})}),(0,t.jsx)(n.td,{children:"float"}),(0,t.jsx)(n.td,{children:"Partial ticks value"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ageInTicks"})}),(0,t.jsx)(n.td,{children:"float"}),(0,t.jsx)(n.td,{children:"Age in ticks value"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"netHeadYaw"})}),(0,t.jsx)(n.td,{children:"float"}),(0,t.jsx)(n.td,{children:"Net head yaw value"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"headPitch"})}),(0,t.jsx)(n.td,{children:"float"}),(0,t.jsx)(n.td,{children:"Head pitch value"})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"static-translateifsneaking",children:(0,t.jsx)(n.code,{children:"static translateIfSneaking()"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["Applies a translation to the given ",(0,t.jsx)(n.code,{children:"PoseStack"})," if the given ",(0,t.jsx)(n.code,{children:"LivingEntity"})," is crouching. This is called to have the\nrender appropriately adjust its positioning up or down based on the crouching status of the entity."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters:"})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Name"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"poseStack"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"PoseStack"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"PoseStack"})," passed from the parent ",(0,t.jsx)(n.code,{children:"RenderLayer"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"livingEntity"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"LivingEntity"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"LivingEntity"})," to check ",(0,t.jsx)(n.code,{children:"isCrouching()"})]})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"static-rotateifsneaking",children:(0,t.jsx)(n.code,{children:"static rotateIfSneaking()"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["Applies a rotation to the given ",(0,t.jsx)(n.code,{children:"PoseStack"})," if the given ",(0,t.jsx)(n.code,{children:"LivingEntity"})," is crouching. This is called to have the\nrender appropriately adjust its rotations based on the crouching status of the entity. Specifically, these rotations\nare based on the body/torso rotations of the entity."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters:"})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Name"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"poseStack"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"PoseStack"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"PoseStack"})," passed from the parent ",(0,t.jsx)(n.code,{children:"RenderLayer"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"livingEntity"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"LivingEntity"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"LivingEntity"})," to check ",(0,t.jsx)(n.code,{children:"isCrouching()"})," and rotate around"]})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"static-followheadrotations",children:(0,t.jsx)(n.code,{children:"static followHeadRotations()"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["Applies rotations to the given ",(0,t.jsx)(n.code,{children:"ModelPart"}),"s based on the given ",(0,t.jsx)(n.code,{children:"LivingEntity"})," and its head rotations. This is called to\nrender the model parts in alignment with the entity's head. This does nothing if the entity's renderer does not\nimplement ",(0,t.jsx)(n.code,{children:"LivingEntityRenderer"})," or if the model does not have a head inherited from the ",(0,t.jsx)(n.code,{children:"HumanoidModel"})," class."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters:"})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Name"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"livingEntity"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"LivingEntity"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"LivingEntity"})," to align the rotations around"]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"modelParts"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ModelPart..."})}),(0,t.jsx)(n.td,{children:"List of model parts to align to the head movement"})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"static-followbodyrotations",children:(0,t.jsx)(n.code,{children:"static followBodyRotations()"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["Applies rotations to the given ",(0,t.jsx)(n.code,{children:"HumanoidModel"}),"s based on the given ",(0,t.jsx)(n.code,{children:"LivingEntity"})," and its rotations. This is called to\nrender the model parts in alignment with the entity's movements, such as their leg and arm movements when walking or\ninteracting with objects."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters:"})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Name"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"livingEntity"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"LivingEntity"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"LivingEntity"})," to align the rotations around"]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"models"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"HumanoidModel..."})}),(0,t.jsx)(n.td,{children:"List of model parts to align to the body movement"})]})]})]})]})}function a(e={}){const{wrapper:n}={...(0,d.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>c,a:()=>r});var t=i(7294);const d={},s=t.createContext(d);function r(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:r(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6e5aa4fa.a8d5de98.js b/assets/js/6e5aa4fa.a8d5de98.js new file mode 100644 index 0000000..9b51792 --- /dev/null +++ b/assets/js/6e5aa4fa.a8d5de98.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[2499],{4888:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>a,frontMatter:()=>s,metadata:()=>c,toc:()=>o});var t=i(5893),d=i(1151);const s={sidebar_position:1},r="ICurioRenderer",c={id:"curios/api/renderer-interface",title:"ICurioRenderer",description:"Methods",source:"@site/docs/curios/api/renderer-interface.md",sourceDirName:"curios/api",slug:"/curios/api/renderer-interface",permalink:"/curios/api/renderer-interface",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/api/renderer-interface.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"API",permalink:"/category/api"},next:{title:"Configuration",permalink:"/curios/configuration"}},l={},o=[{value:"Methods",id:"methods",level:2},{value:"Reference",id:"reference",level:2},{value:"render()
",id:"render",level:3},{value:"static translateIfSneaking()
",id:"static-translateifsneaking",level:3},{value:"static rotateIfSneaking()
",id:"static-rotateifsneaking",level:3},{value:"static followHeadRotations()
",id:"static-followheadrotations",level:3},{value:"static followBodyRotations()
",id:"static-followbodyrotations",level:3}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"icuriorenderer",children:(0,t.jsx)(n.code,{children:"ICurioRenderer"})}),"\n",(0,t.jsx)(n.h2,{id:"methods",children:"Methods"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"#reference",children:"Reference"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#render",children:"render()"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#static-translateifsneaking",children:"static translateIfSneaking()"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#static-rotateifsneaking",children:"static rotateIfSneaking()"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#static-followheadrotations",children:"static followHeadRotations()"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#static-followbodyrotations",children:"static followBodyRotations()"})}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"reference",children:"Reference"}),"\n",(0,t.jsx)(n.h3,{id:"render",children:(0,t.jsx)(n.code,{children:"render()"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.p,{children:"Runs the rendering code when an associated item is equipped in a curio slot and the visibility of the rendering is\nenabled. An equipped cosmetic item will override the rendering of its related functional item."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters:"})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Name"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"stack"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ItemStack"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"ItemStack"})," being rendered"]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"slotContext"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"SlotContext"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"SlotContext"})," for the slot with the ",(0,t.jsx)(n.code,{children:"ItemStack"})," being rendered"]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"poseStack"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"PoseStack"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"PoseStack"})," passed from the parent ",(0,t.jsx)(n.code,{children:"RenderLayer"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"renderLayerParent"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"RenderLayerParent"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"RenderLayerParent"})," passed from the parent ",(0,t.jsx)(n.code,{children:"RenderLayer"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"light"})}),(0,t.jsx)(n.td,{children:"integer"}),(0,t.jsx)(n.td,{children:"Light value"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"limbSwing"})}),(0,t.jsx)(n.td,{children:"float"}),(0,t.jsx)(n.td,{children:"Limb swing value"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"limbSwingAmount"})}),(0,t.jsx)(n.td,{children:"float"}),(0,t.jsx)(n.td,{children:"Limb swing amount value"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"partialTicks"})}),(0,t.jsx)(n.td,{children:"float"}),(0,t.jsx)(n.td,{children:"Partial ticks value"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ageInTicks"})}),(0,t.jsx)(n.td,{children:"float"}),(0,t.jsx)(n.td,{children:"Age in ticks value"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"netHeadYaw"})}),(0,t.jsx)(n.td,{children:"float"}),(0,t.jsx)(n.td,{children:"Net head yaw value"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"headPitch"})}),(0,t.jsx)(n.td,{children:"float"}),(0,t.jsx)(n.td,{children:"Head pitch value"})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"static-translateifsneaking",children:(0,t.jsx)(n.code,{children:"static translateIfSneaking()"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["Applies a translation to the given ",(0,t.jsx)(n.code,{children:"PoseStack"})," if the given ",(0,t.jsx)(n.code,{children:"LivingEntity"})," is crouching. This is called to have the\nrender appropriately adjust its positioning up or down based on the crouching status of the entity."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters:"})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Name"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"poseStack"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"PoseStack"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"PoseStack"})," passed from the parent ",(0,t.jsx)(n.code,{children:"RenderLayer"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"livingEntity"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"LivingEntity"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"LivingEntity"})," to check ",(0,t.jsx)(n.code,{children:"isCrouching()"})]})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"static-rotateifsneaking",children:(0,t.jsx)(n.code,{children:"static rotateIfSneaking()"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["Applies a rotation to the given ",(0,t.jsx)(n.code,{children:"PoseStack"})," if the given ",(0,t.jsx)(n.code,{children:"LivingEntity"})," is crouching. This is called to have the\nrender appropriately adjust its rotations based on the crouching status of the entity. Specifically, these rotations\nare based on the body/torso rotations of the entity."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters:"})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Name"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"poseStack"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"PoseStack"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"PoseStack"})," passed from the parent ",(0,t.jsx)(n.code,{children:"RenderLayer"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"livingEntity"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"LivingEntity"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"LivingEntity"})," to check ",(0,t.jsx)(n.code,{children:"isCrouching()"})," and rotate around"]})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"static-followheadrotations",children:(0,t.jsx)(n.code,{children:"static followHeadRotations()"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["Applies rotations to the given ",(0,t.jsx)(n.code,{children:"ModelPart"}),"s based on the given ",(0,t.jsx)(n.code,{children:"LivingEntity"})," and its head rotations. This is called to\nrender the model parts in alignment with the entity's head. This does nothing if the entity's renderer does not\nimplement ",(0,t.jsx)(n.code,{children:"LivingEntityRenderer"})," or if the model does not have a head inherited from the ",(0,t.jsx)(n.code,{children:"HumanoidModel"})," class."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters:"})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Name"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"livingEntity"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"LivingEntity"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"LivingEntity"})," to align the rotations around"]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"modelParts"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ModelPart..."})}),(0,t.jsx)(n.td,{children:"List of model parts to align to the head movement"})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"static-followbodyrotations",children:(0,t.jsx)(n.code,{children:"static followBodyRotations()"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["Applies rotations to the given ",(0,t.jsx)(n.code,{children:"HumanoidModel"}),"s based on the given ",(0,t.jsx)(n.code,{children:"LivingEntity"})," and its rotations. This is called to\nrender the model parts in alignment with the entity's movements, such as their leg and arm movements when walking or\ninteracting with objects."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters:"})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Name"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"livingEntity"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"LivingEntity"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"LivingEntity"})," to align the rotations around"]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"models"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"HumanoidModel..."})}),(0,t.jsx)(n.td,{children:"List of model parts to align to the body movement"})]})]})]})]})}function a(e={}){const{wrapper:n}={...(0,d.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>c,a:()=>r});var t=i(7294);const d={},s=t.createContext(d);function r(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:r(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/71c056c1.a62eac6f.js b/assets/js/71c056c1.a62eac6f.js new file mode 100644 index 0000000..c941b24 --- /dev/null +++ b/assets/js/71c056c1.a62eac6f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[4977],{7338:e=>{e.exports=JSON.parse('{"title":"Inventory","description":"All about the curio inventory and how to manage it.","slug":"/category/inventory","permalink":"/category/inventory","navigation":{"previous":{"title":"Curios Attribute Modifiers (NBT)","permalink":"/curios/items/curios-nbt"},"next":{"title":"Basic Inventory Management","permalink":"/curios/inventory/basic-inventory"}}}')}}]); \ No newline at end of file diff --git a/assets/js/71c056c1.eb08e33a.js b/assets/js/71c056c1.eb08e33a.js deleted file mode 100644 index e8c2d87..0000000 --- a/assets/js/71c056c1.eb08e33a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[977],{7338:e=>{e.exports=JSON.parse('{"title":"Inventory","description":"All about the curio inventory and how to manage it.","slug":"/category/inventory","permalink":"/category/inventory","navigation":{"previous":{"title":"Curios Attribute Modifiers (NBT)","permalink":"/curios/items/curios-nbt"},"next":{"title":"Basic Inventory Management","permalink":"/curios/inventory/basic-inventory"}}}')}}]); \ No newline at end of file diff --git a/assets/js/772.4402a9bd.js b/assets/js/772.4402a9bd.js deleted file mode 100644 index a359394..0000000 --- a/assets/js/772.4402a9bd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[772],{5658:(e,t,s)=>{s.d(t,{Z:()=>r});s(7294);var i=s(512),o=s(5999),n=s(7955),l=s(5893);function r(e){let{className:t}=e;return(0,l.jsx)("main",{className:(0,i.Z)("container margin-vert--xl",t),children:(0,l.jsx)("div",{className:"row",children:(0,l.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,l.jsx)(n.Z,{as:"h1",className:"hero__title",children:(0,l.jsx)(o.Z,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,l.jsx)("p",{children:(0,l.jsx)(o.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,l.jsx)("p",{children:(0,l.jsx)(o.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},1772:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});s(7294);var i=s(5999),o=s(1944),n=s(6040),l=s(5658),r=s(5893);function a(){const e=(0,i.I)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.d,{title:e}),(0,r.jsx)(n.Z,{children:(0,r.jsx)(l.Z,{})})]})}}}]); \ No newline at end of file diff --git a/assets/js/7ffb7c5f.a42c9b9a.js b/assets/js/7ffb7c5f.a42c9b9a.js deleted file mode 100644 index 2076119..0000000 --- a/assets/js/7ffb7c5f.a42c9b9a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[551],{4250:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>c});var t=i(5893),s=i(1151);const r={sidebar_position:4},o="Customizing Diet Suites",a={id:"diet/diet-suites",title:"Customizing Diet Suites",description:"A tutorial on how to customize suites of food groups and diet effects.",source:"@site/docs/diet/diet-suites.md",sourceDirName:"diet",slug:"/diet/diet-suites",permalink:"/diet/diet-suites",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/diet/diet-suites.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"Categorizing Food to Groups",permalink:"/diet/food-classification"},next:{title:"Example Datapack",permalink:"/diet/datapack-example"}},d={},c=[{value:"Overview",id:"overview",level:2},{value:"Directory",id:"directory",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Customizing Effects",id:"customizing-effects",level:2},{value:"Attribute Modifiers",id:"attribute-modifiers",level:3},{value:"Fields",id:"fields",level:3},{value:"Status Effects",id:"status-effects",level:2},{value:"Fields",id:"fields-1",level:3},{value:"Conditions",id:"conditions",level:2},{value:"Fields",id:"fields-2",level:3},{value:"Example",id:"example",level:2},{value:"Built-in Diet Suite",id:"built-in-diet-suite",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.a)(),...e.components},{Details:i}=n;return i||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"customizing-diet-suites",children:"Customizing Diet Suites"}),"\n",(0,t.jsx)(n.p,{children:"A tutorial on how to customize suites of food groups and diet effects."}),"\n",(0,t.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(n.p,{children:"Diet suites are a collection of food groups and effects that are applied to the player based on the values of those\nfood groups. A player can only have one existing diet suite at a time, but an instance can have as many diet suites as\nit needs. Suites exist on a per-player basis and players can have a different suite than another."}),"\n",(0,t.jsx)(n.p,{children:"Suites are divided into two major components: food groups and effects. Effects are further divided into three major\ncomponents: status effects, attribute modifiers, and conditions."}),"\n",(0,t.jsx)(n.h2,{id:"directory",children:"Directory"}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["The file should be a ",(0,t.jsx)(n.code,{children:".json"})," file located in the ",(0,t.jsx)(n.code,{children:"~/data/(namespace)/diet/suites/"})," folder of the datapack."]}),"\n",(0,t.jsxs)(n.p,{children:["The file name is the ",(0,t.jsx)(n.code,{children:"identifier"})," used for the suite. An ",(0,t.jsx)(n.code,{children:"identifier"})," can be anything that is lowercased with no\nspecial characters. If customizing or replacing the default suite, the file should be named ",(0,t.jsx)(n.code,{children:"builtin.json"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"(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."]})}),"\n",(0,t.jsx)(n.h2,{id:"syntax",children:"Syntax"}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["The structure of the ",(0,t.jsx)(n.code,{children:".json"})," file for the suite configuration consists of a top-level JSON object that holds three\npotential fields."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"replace"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"If true, the file will override pre-existing suites of the same name instead of adding the arrays together."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"groups"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["An array of food group ",(0,t.jsx)(n.code,{children:"name"})," entries as defined by ",(0,t.jsx)(n.a,{href:"/diet/diet-groups",children:"Customizing Food Groups"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"effects"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["An array of effects to apply to the player as defined by ",(0,t.jsx)(n.a,{href:"#customizing-effects",children:"Customizing Effects"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"customizing-effects",children:"Customizing Effects"}),"\n",(0,t.jsx)(n.p,{children:"Dietary effects are custom status effects or attribute modifiers applied to players when certain conditions are met.\nEach effect entry is divided into three different components: attribute modifiers, status effects, and conditions.\nEffects can have multiple attribute modifiers, status effects, and conditions tied to a single entry."}),"\n",(0,t.jsx)(n.h3,{id:"attribute-modifiers",children:"Attribute Modifiers"}),"\n",(0,t.jsx)(n.p,{children:"An attribute modifier represents a direct modifier to an entity attribute."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "effects": [\n {\n "attributes": [\n {\n "name": "minecraft:generic.movement_speed",\n "operation": "multiply_base",\n "amount": 0.25\n }\n ]\n }\n ]\n}\n'})}),"\n",(0,t.jsx)(n.h3,{id:"fields",children:"Fields"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"name"})," - ",(0,t.jsx)(n.code,{children:"string"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The namespaced registry name of the entity attribute to apply this entry on."}),"\n",(0,t.jsxs)(n.li,{children:["List of vanilla Minecraft entity attribute names:","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Max Health - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.max_health"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Knockback Resistance - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.knockback_resistance"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Movement Speed - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.movement_speed"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Attack Damage - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.attack_damage"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Attack Knockback - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.attack_knockback"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Attack Speed - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.attack_speed"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Armor - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.armor"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Armor Toughness - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.armor_toughness"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Luck - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.luck"'})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"operation"})," - ",(0,t.jsx)(n.code,{children:"string"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The type of operation to perform on the entity attribute"}),"\n",(0,t.jsxs)(n.li,{children:["Possible values:","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"multiply_total"'})," - Increment the attribute by (value * amount)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"multiply_base"'})," - Increment the attribute by (base * amount)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"add"'})," - Increment the attribute by the amount"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"amount"})," - ",(0,t.jsx)(n.code,{children:"decimal"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The amount to use for the operation on the attribute modifier"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"status-effects",children:"Status Effects"}),"\n",(0,t.jsx)(n.p,{children:"A status effect represents a status effect applied to an entity."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "effects": [\n {\n "status_effects": [\n {\n "name": "minecraft:hunger",\n "power": 3\n }\n ]\n }\n ]\n}\n'})}),"\n",(0,t.jsx)(n.h3,{id:"fields-1",children:"Fields"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"name"})," - ",(0,t.jsx)(n.code,{children:"string"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The namespaced registry name of the potion effect to apply"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"power"})," - ",(0,t.jsx)(n.code,{children:"integer"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The integer amount representing the strength of the potion effect"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"conditions",children:"Conditions"}),"\n",(0,t.jsx)(n.p,{children:"A condition is an entry defining a test that needs to pass in order to activate the corresponding effect. There can be\nmultiple conditions for a single effect, and all conditions must pass in order to activate the effect."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "effects": [\n {\n "conditions": [\n {\n "groups": ["sugars", "proteins"],\n "match": "all",\n "above": 0.8,\n "below": 1.0\n }\n ]\n }\n ]\n}\n'})}),"\n",(0,t.jsx)(n.h3,{id:"fields-2",children:"Fields"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"groups"})," - ",(0,t.jsx)(n.code,{children:"string[]"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"A list of groups that this condition is testing against"}),"\n",(0,t.jsxs)(n.li,{children:["The names correspond to the names given to the groups in the ",(0,t.jsx)(n.code,{children:"diet-groups.toml"})," configuration"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"above"})," - ",(0,t.jsx)(n.code,{children:"decimal"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["A decimal value between ",(0,t.jsx)(n.code,{children:"0.0"})," and ",(0,t.jsx)(n.code,{children:"1.0"})," that indicates the lower bound that the value must be at or above"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"below"})," - ",(0,t.jsx)(n.code,{children:"decimal"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["A decimal value between ",(0,t.jsx)(n.code,{children:"0.0"})," and ",(0,t.jsx)(n.code,{children:"1.0"})," that indicates the upper bound that the value must be at or below"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"match"})," - ",(0,t.jsx)(n.code,{children:"string"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The match method used for the condition testing"}),"\n",(0,t.jsxs)(n.li,{children:["Possible values:","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"all"'})," - Condition passes if all the groups meet the threshold."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"any"'})," - Condition passes if any the groups meet the threshold."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"average"'})," - Condition passes if the average value of the groups meets the threshold."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"none"'})," - Condition passes if none of the groups meet the threshold."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"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.","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Example: If three groups pass an ",(0,t.jsx)(n.code,{children:'"every"'}),' test, then a "Strength I" potion effect becomes "Strength III"']}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"example",children:"Example"}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "replace": false,\n "groups": [\n "fruits",\n "grains",\n "proteins",\n "sugars",\n "vegetables"\n ],\n "effects": [\n {\n "attributes": [\n {\n "name": "minecraft:generic.max_health",\n "operation": "add",\n "amount": 2.0\n }\n ],\n "conditions": [\n {\n "groups": ["proteins", "fruits", "vegetables", "grains"],\n "match": "all",\n "above": 0.8,\n "below": 1.0\n }\n ]\n },\n {\n "status_effects": [\n {\n "name": "minecraft:hunger",\n "power": 3\n }\n ],\n "conditions": [\n {\n "groups": ["sugars"],\n "match": "all",\n "above": 0.8,\n "below": 1.0\n }\n ]\n }\n ]\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["This configuration will grant ",(0,t.jsx)(n.code,{children:"2.0"})," additional ",(0,t.jsx)(n.code,{children:"max_health"})," when ",(0,t.jsx)(n.code,{children:"all"})," the ",(0,t.jsx)(n.code,{children:"proteins"}),", ",(0,t.jsx)(n.code,{children:"vegetables"}),", ",(0,t.jsx)(n.code,{children:"grains"}),", and\n",(0,t.jsx)(n.code,{children:"fruits"})," food groups are above 80% (",(0,t.jsx)(n.code,{children:"0.8"}),") and below or equal to 100% (",(0,t.jsx)(n.code,{children:"1.0"}),")."]}),"\n",(0,t.jsxs)(n.p,{children:["In addition, there is an additional effect that grants ",(0,t.jsx)(n.code,{children:"hunger"})," at power ",(0,t.jsx)(n.code,{children:"3"})," when ",(0,t.jsx)(n.code,{children:"sugars"})," is above 80% (",(0,t.jsx)(n.code,{children:"0.8"}),") and\nbelow or equal to 100% (",(0,t.jsx)(n.code,{children:"1.0"}),")."]}),"\n",(0,t.jsx)(n.h2,{id:"built-in-diet-suite",children:"Built-in Diet Suite"}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["This is the built-in diet suite that is configured by default, aptly named ",(0,t.jsx)(n.code,{children:"builtin"}),"."]}),"\n",(0,t.jsxs)(i,{children:[(0,t.jsx)("summary",{children:"builtin.json"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "replace": false,\n "groups": [\n "fruits",\n "grains",\n "proteins",\n "sugars",\n "vegetables"\n ],\n "effects": [\n {\n "attributes": [\n {\n "name": "minecraft:generic.max_health",\n "operation": "add",\n "amount": 2.0\n },\n {\n "name": "minecraft:generic.attack_damage",\n "operation": "add",\n "amount": 2.0\n },\n {\n "name": "minecraft:generic.attack_speed",\n "operation": "multiply_total",\n "amount": 0.1\n }\n ],\n "conditions": [\n {\n "groups": ["proteins", "fruits", "vegetables", "grains"],\n "match": "all",\n "above": 0.8,\n "below": 1.0\n }\n ]\n },\n {\n "attributes": [\n {\n "name": "minecraft:generic.max_health",\n "operation": "add",\n "amount": 2.0\n },\n {\n "name": "minecraft:generic.knockback_resistance",\n "operation": "add",\n "amount": 0.10\n },\n {\n "name": "minecraft:generic.armor_toughness",\n "operation": "add",\n "amount": 1.0\n }\n ],\n "conditions": [\n {\n "groups": ["proteins", "fruits", "vegetables", "grains"],\n "match": "every",\n "above": 0.8,\n "below": 1.0\n }\n ]\n },\n {\n "attributes": [\n {\n "name": "minecraft:generic.movement_speed",\n "operation": "multiply_base",\n "amount": 0.25\n }\n ],\n "status_effects": [\n {\n "name": "minecraft:hunger",\n "power": 3\n }\n ],\n "conditions": [\n {\n "groups": ["sugars"],\n "match": "all",\n "above": 0.8,\n "below": 1.0\n }\n ]\n }\n ]\n}\n'})})]})]})}function h(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>a,a:()=>o});var t=i(7294);const s={},r=t.createContext(s);function o(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7ffb7c5f.e75d1ad8.js b/assets/js/7ffb7c5f.e75d1ad8.js new file mode 100644 index 0000000..9b2ab6e --- /dev/null +++ b/assets/js/7ffb7c5f.e75d1ad8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[3551],{4250:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>c});var t=i(5893),s=i(1151);const r={sidebar_position:4},o="Customizing Diet Suites",a={id:"diet/diet-suites",title:"Customizing Diet Suites",description:"A tutorial on how to customize suites of food groups and diet effects.",source:"@site/docs/diet/diet-suites.md",sourceDirName:"diet",slug:"/diet/diet-suites",permalink:"/diet/diet-suites",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/diet/diet-suites.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"Categorizing Food to Groups",permalink:"/diet/food-classification"},next:{title:"Example Datapack",permalink:"/diet/datapack-example"}},d={},c=[{value:"Overview",id:"overview",level:2},{value:"Directory",id:"directory",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Customizing Effects",id:"customizing-effects",level:2},{value:"Attribute Modifiers",id:"attribute-modifiers",level:3},{value:"Fields",id:"fields",level:3},{value:"Status Effects",id:"status-effects",level:2},{value:"Fields",id:"fields-1",level:3},{value:"Conditions",id:"conditions",level:2},{value:"Fields",id:"fields-2",level:3},{value:"Example",id:"example",level:2},{value:"Built-in Diet Suite",id:"built-in-diet-suite",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.a)(),...e.components},{Details:i}=n;return i||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"customizing-diet-suites",children:"Customizing Diet Suites"}),"\n",(0,t.jsx)(n.p,{children:"A tutorial on how to customize suites of food groups and diet effects."}),"\n",(0,t.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(n.p,{children:"Diet suites are a collection of food groups and effects that are applied to the player based on the values of those\nfood groups. A player can only have one existing diet suite at a time, but an instance can have as many diet suites as\nit needs. Suites exist on a per-player basis and players can have a different suite than another."}),"\n",(0,t.jsx)(n.p,{children:"Suites are divided into two major components: food groups and effects. Effects are further divided into three major\ncomponents: status effects, attribute modifiers, and conditions."}),"\n",(0,t.jsx)(n.h2,{id:"directory",children:"Directory"}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["The file should be a ",(0,t.jsx)(n.code,{children:".json"})," file located in the ",(0,t.jsx)(n.code,{children:"~/data/(namespace)/diet/suites/"})," folder of the datapack."]}),"\n",(0,t.jsxs)(n.p,{children:["The file name is the ",(0,t.jsx)(n.code,{children:"identifier"})," used for the suite. An ",(0,t.jsx)(n.code,{children:"identifier"})," can be anything that is lowercased with no\nspecial characters. If customizing or replacing the default suite, the file should be named ",(0,t.jsx)(n.code,{children:"builtin.json"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"(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."]})}),"\n",(0,t.jsx)(n.h2,{id:"syntax",children:"Syntax"}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["The structure of the ",(0,t.jsx)(n.code,{children:".json"})," file for the suite configuration consists of a top-level JSON object that holds three\npotential fields."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"replace"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"If true, the file will override pre-existing suites of the same name instead of adding the arrays together."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"groups"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["An array of food group ",(0,t.jsx)(n.code,{children:"name"})," entries as defined by ",(0,t.jsx)(n.a,{href:"/diet/diet-groups",children:"Customizing Food Groups"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"effects"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["An array of effects to apply to the player as defined by ",(0,t.jsx)(n.a,{href:"#customizing-effects",children:"Customizing Effects"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"customizing-effects",children:"Customizing Effects"}),"\n",(0,t.jsx)(n.p,{children:"Dietary effects are custom status effects or attribute modifiers applied to players when certain conditions are met.\nEach effect entry is divided into three different components: attribute modifiers, status effects, and conditions.\nEffects can have multiple attribute modifiers, status effects, and conditions tied to a single entry."}),"\n",(0,t.jsx)(n.h3,{id:"attribute-modifiers",children:"Attribute Modifiers"}),"\n",(0,t.jsx)(n.p,{children:"An attribute modifier represents a direct modifier to an entity attribute."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "effects": [\n {\n "attributes": [\n {\n "name": "minecraft:generic.movement_speed",\n "operation": "multiply_base",\n "amount": 0.25\n }\n ]\n }\n ]\n}\n'})}),"\n",(0,t.jsx)(n.h3,{id:"fields",children:"Fields"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"name"})," - ",(0,t.jsx)(n.code,{children:"string"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The namespaced registry name of the entity attribute to apply this entry on."}),"\n",(0,t.jsxs)(n.li,{children:["List of vanilla Minecraft entity attribute names:","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Max Health - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.max_health"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Knockback Resistance - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.knockback_resistance"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Movement Speed - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.movement_speed"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Attack Damage - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.attack_damage"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Attack Knockback - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.attack_knockback"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Attack Speed - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.attack_speed"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Armor - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.armor"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Armor Toughness - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.armor_toughness"'})]}),"\n",(0,t.jsxs)(n.li,{children:["Luck - ",(0,t.jsx)(n.code,{children:'"minecraft:generic.luck"'})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"operation"})," - ",(0,t.jsx)(n.code,{children:"string"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The type of operation to perform on the entity attribute"}),"\n",(0,t.jsxs)(n.li,{children:["Possible values:","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"multiply_total"'})," - Increment the attribute by (value * amount)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"multiply_base"'})," - Increment the attribute by (base * amount)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"add"'})," - Increment the attribute by the amount"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"amount"})," - ",(0,t.jsx)(n.code,{children:"decimal"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The amount to use for the operation on the attribute modifier"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"status-effects",children:"Status Effects"}),"\n",(0,t.jsx)(n.p,{children:"A status effect represents a status effect applied to an entity."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "effects": [\n {\n "status_effects": [\n {\n "name": "minecraft:hunger",\n "power": 3\n }\n ]\n }\n ]\n}\n'})}),"\n",(0,t.jsx)(n.h3,{id:"fields-1",children:"Fields"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"name"})," - ",(0,t.jsx)(n.code,{children:"string"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The namespaced registry name of the potion effect to apply"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"power"})," - ",(0,t.jsx)(n.code,{children:"integer"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The integer amount representing the strength of the potion effect"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"conditions",children:"Conditions"}),"\n",(0,t.jsx)(n.p,{children:"A condition is an entry defining a test that needs to pass in order to activate the corresponding effect. There can be\nmultiple conditions for a single effect, and all conditions must pass in order to activate the effect."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "effects": [\n {\n "conditions": [\n {\n "groups": ["sugars", "proteins"],\n "match": "all",\n "above": 0.8,\n "below": 1.0\n }\n ]\n }\n ]\n}\n'})}),"\n",(0,t.jsx)(n.h3,{id:"fields-2",children:"Fields"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"groups"})," - ",(0,t.jsx)(n.code,{children:"string[]"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"A list of groups that this condition is testing against"}),"\n",(0,t.jsxs)(n.li,{children:["The names correspond to the names given to the groups in the ",(0,t.jsx)(n.code,{children:"diet-groups.toml"})," configuration"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"above"})," - ",(0,t.jsx)(n.code,{children:"decimal"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["A decimal value between ",(0,t.jsx)(n.code,{children:"0.0"})," and ",(0,t.jsx)(n.code,{children:"1.0"})," that indicates the lower bound that the value must be at or above"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"below"})," - ",(0,t.jsx)(n.code,{children:"decimal"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["A decimal value between ",(0,t.jsx)(n.code,{children:"0.0"})," and ",(0,t.jsx)(n.code,{children:"1.0"})," that indicates the upper bound that the value must be at or below"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"match"})," - ",(0,t.jsx)(n.code,{children:"string"})]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The match method used for the condition testing"}),"\n",(0,t.jsxs)(n.li,{children:["Possible values:","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"all"'})," - Condition passes if all the groups meet the threshold."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"any"'})," - Condition passes if any the groups meet the threshold."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"average"'})," - Condition passes if the average value of the groups meets the threshold."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"none"'})," - Condition passes if none of the groups meet the threshold."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"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.","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Example: If three groups pass an ",(0,t.jsx)(n.code,{children:'"every"'}),' test, then a "Strength I" potion effect becomes "Strength III"']}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"example",children:"Example"}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "replace": false,\n "groups": [\n "fruits",\n "grains",\n "proteins",\n "sugars",\n "vegetables"\n ],\n "effects": [\n {\n "attributes": [\n {\n "name": "minecraft:generic.max_health",\n "operation": "add",\n "amount": 2.0\n }\n ],\n "conditions": [\n {\n "groups": ["proteins", "fruits", "vegetables", "grains"],\n "match": "all",\n "above": 0.8,\n "below": 1.0\n }\n ]\n },\n {\n "status_effects": [\n {\n "name": "minecraft:hunger",\n "power": 3\n }\n ],\n "conditions": [\n {\n "groups": ["sugars"],\n "match": "all",\n "above": 0.8,\n "below": 1.0\n }\n ]\n }\n ]\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["This configuration will grant ",(0,t.jsx)(n.code,{children:"2.0"})," additional ",(0,t.jsx)(n.code,{children:"max_health"})," when ",(0,t.jsx)(n.code,{children:"all"})," the ",(0,t.jsx)(n.code,{children:"proteins"}),", ",(0,t.jsx)(n.code,{children:"vegetables"}),", ",(0,t.jsx)(n.code,{children:"grains"}),", and\n",(0,t.jsx)(n.code,{children:"fruits"})," food groups are above 80% (",(0,t.jsx)(n.code,{children:"0.8"}),") and below or equal to 100% (",(0,t.jsx)(n.code,{children:"1.0"}),")."]}),"\n",(0,t.jsxs)(n.p,{children:["In addition, there is an additional effect that grants ",(0,t.jsx)(n.code,{children:"hunger"})," at power ",(0,t.jsx)(n.code,{children:"3"})," when ",(0,t.jsx)(n.code,{children:"sugars"})," is above 80% (",(0,t.jsx)(n.code,{children:"0.8"}),") and\nbelow or equal to 100% (",(0,t.jsx)(n.code,{children:"1.0"}),")."]}),"\n",(0,t.jsx)(n.h2,{id:"built-in-diet-suite",children:"Built-in Diet Suite"}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["This is the built-in diet suite that is configured by default, aptly named ",(0,t.jsx)(n.code,{children:"builtin"}),"."]}),"\n",(0,t.jsxs)(i,{children:[(0,t.jsx)("summary",{children:"builtin.json"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "replace": false,\n "groups": [\n "fruits",\n "grains",\n "proteins",\n "sugars",\n "vegetables"\n ],\n "effects": [\n {\n "attributes": [\n {\n "name": "minecraft:generic.max_health",\n "operation": "add",\n "amount": 2.0\n },\n {\n "name": "minecraft:generic.attack_damage",\n "operation": "add",\n "amount": 2.0\n },\n {\n "name": "minecraft:generic.attack_speed",\n "operation": "multiply_total",\n "amount": 0.1\n }\n ],\n "conditions": [\n {\n "groups": ["proteins", "fruits", "vegetables", "grains"],\n "match": "all",\n "above": 0.8,\n "below": 1.0\n }\n ]\n },\n {\n "attributes": [\n {\n "name": "minecraft:generic.max_health",\n "operation": "add",\n "amount": 2.0\n },\n {\n "name": "minecraft:generic.knockback_resistance",\n "operation": "add",\n "amount": 0.10\n },\n {\n "name": "minecraft:generic.armor_toughness",\n "operation": "add",\n "amount": 1.0\n }\n ],\n "conditions": [\n {\n "groups": ["proteins", "fruits", "vegetables", "grains"],\n "match": "every",\n "above": 0.8,\n "below": 1.0\n }\n ]\n },\n {\n "attributes": [\n {\n "name": "minecraft:generic.movement_speed",\n "operation": "multiply_base",\n "amount": 0.25\n }\n ],\n "status_effects": [\n {\n "name": "minecraft:hunger",\n "power": 3\n }\n ],\n "conditions": [\n {\n "groups": ["sugars"],\n "match": "all",\n "above": 0.8,\n "below": 1.0\n }\n ]\n }\n ]\n}\n'})})]})]})}function h(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>a,a:()=>o});var t=i(7294);const s={},r=t.createContext(s);function o(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/85ac19f8.6d43aa8c.js b/assets/js/85ac19f8.6d43aa8c.js deleted file mode 100644 index a6af48b..0000000 --- a/assets/js/85ac19f8.6d43aa8c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[755],{8153:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>r,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>l,toc:()=>d});var n=s(5893),i=s(1151);const a={sidebar_position:17},o="Example Datapack",l={id:"curios/slots/datapack-example",title:"Example Datapack",description:"An example datapack for configuring various curio mechanics, including adding slot types to entities and modifying",source:"@site/docs/curios/slots/datapack-example.md",sourceDirName:"curios/slots",slug:"/curios/slots/datapack-example",permalink:"/curios/slots/datapack-example",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slots/datapack-example.md",tags:[],version:"current",sidebarPosition:17,frontMatter:{sidebar_position:17},sidebar:"tutorialSidebar",previous:{title:"Data Generation",permalink:"/curios/slots/data-generation"},next:{title:"Items",permalink:"/category/items"}},r={},d=[{value:"Getting Started",id:"getting-started",level:2},{value:"Registering a New Slot Type",id:"registering-a-new-slot-type",level:2},{value:"Modifying an Existing Slot Type",id:"modifying-an-existing-slot-type",level:2},{value:"Adding Slot Types to One or More Entities",id:"adding-slot-types-to-one-or-more-entities",level:2},{value:"Adding an Item to a Curio Slot",id:"adding-an-item-to-a-curio-slot",level:2},{value:"Activating the Datapack",id:"activating-the-datapack",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"example-datapack",children:"Example Datapack"}),"\n",(0,n.jsx)(t.p,{children:"An example datapack for configuring various curio mechanics, including adding slot types to entities and modifying\nexisting slot types."}),"\n",(0,n.jsx)(t.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,n.jsxs)(t.p,{children:["First, download the ",(0,n.jsx)(t.a,{target:"_blank",href:s(1121).Z+"",children:"example datapack"}),"."]}),"\n",(0,n.jsx)(t.p,{children:"Unzip the file and there will be the following folder structure:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"|data\n--|curios\n --|tags\n --|items\n --|ring.json\n--|curios_example\n --|curios\n --|entities\n --|entities.json\n --|slots\n --|ring.json\n|pack.mcmeta\n"})}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:".mcmeta"})," file and ",(0,n.jsx)(t.code,{children:".json"})," files can be opened and edited in any text editor, such as Notepad."]}),"\n",(0,n.jsxs)(t.admonition,{type:"note",children:[(0,n.jsx)(t.p,{children:(0,n.jsxs)(t.strong,{children:["Why are there two folders for ",(0,n.jsx)(t.em,{children:"curios"})," and ",(0,n.jsx)(t.em,{children:"curios_example"}),"?"]})}),(0,n.jsxs)(t.p,{children:["The namespace used for this datapack is ",(0,n.jsx)(t.code,{children:"curios_example"}),". The ",(0,n.jsx)(t.code,{children:"curios_example"})," folder has a sub-folder called ",(0,n.jsx)(t.code,{children:"curios"}),"\nwhich houses the ",(0,n.jsx)(t.code,{children:"entities"})," and ",(0,n.jsx)(t.code,{children:"slots"})," folder. This is the custom data that is specifically for the Curios mod. On the\nother hand, the ",(0,n.jsx)(t.code,{children:"curios"})," folder that houses the ",(0,n.jsx)(t.code,{children:"tags"})," folder is using the name as a separate namespace for the purposes\nof adding item tags, which are read by vanilla."]})]}),"\n",(0,n.jsx)(t.h2,{id:"registering-a-new-slot-type",children:"Registering a New Slot Type"}),"\n",(0,n.jsxs)(t.p,{children:["Adding a new slot type is controlled by the ",(0,n.jsx)(t.code,{children:"data/curios_example/curios/slots/example.json"})," file:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-json",children:'{\n "size": 1,\n "add_cosmetic": true\n}\n'})}),"\n",(0,n.jsx)(t.p,{children:"The file and file name specifies these properties for the slot type:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["The identifier for the slot type is ",(0,n.jsx)(t.code,{children:"example"}),", as denoted by the file name"]}),"\n",(0,n.jsxs)(t.li,{children:["The number of slots available is ",(0,n.jsx)(t.code,{children:"1"}),", as denoted by the ",(0,n.jsx)(t.code,{children:'"size"'})," field"]}),"\n",(0,n.jsxs)(t.li,{children:["Each slot of this slot type has an associated cosmetic slot, as denoted by the ",(0,n.jsx)(t.code,{children:'"add_cosmetic"'})," field"]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["For more information on the fields and customization of slot types, please refer to ",(0,n.jsx)(t.a,{href:"/curios/slots/slot-register",children:"the slot types page"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"modifying-an-existing-slot-type",children:"Modifying an Existing Slot Type"}),"\n",(0,n.jsxs)(t.p,{children:["Modifying an existing slot type is controlled by the ",(0,n.jsx)(t.code,{children:"data/curios_example/curios/slots/ring.json"})," file:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-json",children:'{\n "size": 2,\n "add_cosmetic": true\n}\n'})}),"\n",(0,n.jsx)(t.p,{children:"The file and file name specifies these properties for the slot type:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["The identifier for the slot type to change is ",(0,n.jsx)(t.code,{children:"ring"}),", as denoted by the file name"]}),"\n",(0,n.jsxs)(t.li,{children:["The number of slots available is ",(0,n.jsx)(t.code,{children:"2"}),", as denoted by the ",(0,n.jsx)(t.code,{children:'"size"'})," field"]}),"\n",(0,n.jsxs)(t.li,{children:["Each slot of this slot type has an associated cosmetic slot, as denoted by the ",(0,n.jsx)(t.code,{children:'"add_cosmetic"'})," field"]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"Note that this is exactly the same syntax as registering a new slot type. This is because modifying and registering a\nslot type both have the exact same process, the difference solely being whether multiple files exist for the same slot\ntype or not."}),"\n",(0,n.jsxs)(t.p,{children:["For more information on how slot types are modified from multiple files, please refer to ",(0,n.jsx)(t.a,{href:"/curios/slots/slot-register",children:"the slot types page"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"adding-slot-types-to-one-or-more-entities",children:"Adding Slot Types to One or More Entities"}),"\n",(0,n.jsxs)(t.p,{children:["Just creating the slot type isn't enough, as now it has to be added to one or more entities in order to appear anywhere.\nThis is configured by the ",(0,n.jsx)(t.code,{children:"data/curios_example/curios/entities/entities.json"})," file:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-json",children:'{\n "entities": [\n "minecraft:player",\n "minecraft:armor_stand"\n ],\n "slots": [\n "back",\n "body",\n "belt",\n "bracelet",\n "charm",\n "curio",\n "example",\n "hands",\n "head",\n "necklace",\n "ring"\n ]\n}\n'})}),"\n",(0,n.jsx)(t.p,{children:"The file specifies these properties:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["The slots being given are all the ",(0,n.jsx)(t.a,{href:"/curios/slots/preset-slots",children:"preset slot types"})," and the ",(0,n.jsx)(t.code,{children:"example"})," slot type created by this\ndatapack, as denoted by the ",(0,n.jsx)(t.code,{children:'"slots"'})," list"]}),"\n",(0,n.jsxs)(t.li,{children:["The entities being given slots are all players and armor stands, as denoted by the ",(0,n.jsx)(t.code,{children:'"entities"'})," list"]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["For more information on the fields and customization of entity slots, please refer to ",(0,n.jsx)(t.a,{href:"/curios/slots/entity-register",children:"the entity slots page"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"adding-an-item-to-a-curio-slot",children:"Adding an Item to a Curio Slot"}),"\n",(0,n.jsxs)(t.p,{children:["Items are added to slot types by adding them to the relevant item tag. In the example datapack, an item tag for the\n",(0,n.jsx)(t.code,{children:"ring"})," slot type is created at ",(0,n.jsx)(t.code,{children:"data/curios/tags/items/ring.json"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-json",children:'{\n "replace": false,\n "values": [\n "minecraft:diamond"\n ]\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["The file name is the same as the identifier for the slot type and will be the name of the tag that is created. By\nsetting ",(0,n.jsx)(t.code,{children:"replace"})," to ",(0,n.jsx)(t.code,{children:"false"}),", the values are added to the tag instead of replacing them. Listing ",(0,n.jsx)(t.code,{children:"minecraft:diamond"})," in\nthe ",(0,n.jsx)(t.code,{children:"values"})," array will add the diamond item to the tag and consequently diamonds will be equippable in the ",(0,n.jsx)(t.code,{children:"ring"})," slots."]}),"\n",(0,n.jsxs)(t.p,{children:["For more information on tags and item tags, please refer to the ",(0,n.jsx)(t.a,{href:"https://minecraft.wiki/w/Tag",children:"page on the Minecraft wiki"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"activating-the-datapack",children:"Activating the Datapack"}),"\n",(0,n.jsxs)(t.p,{children:["Datapacks are created on a per-world basis and need to be placed in the ",(0,n.jsx)(t.code,{children:"datapacks"})," folder of the ",(0,n.jsx)(t.code,{children:"world"})," folder on a\ndedicated server or the ",(0,n.jsx)(t.code,{children:"saves/(World Name)"})," folder in single player. They should automatically be enabled upon loading\nthe datapack for the first time in the world."]})]})}function h(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1121:(e,t,s)=>{s.d(t,{Z:()=>n});const n=s.p+"assets/files/curios_example-b9398f30472c661860955db867e85daa.zip"},1151:(e,t,s)=>{s.d(t,{Z:()=>l,a:()=>o});var n=s(7294);const i={},a=n.createContext(i);function o(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/85ac19f8.878f4e7b.js b/assets/js/85ac19f8.878f4e7b.js new file mode 100644 index 0000000..cf3a5fa --- /dev/null +++ b/assets/js/85ac19f8.878f4e7b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[5755],{8153:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>r,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>l,toc:()=>d});var n=s(5893),i=s(1151);const a={sidebar_position:17},o="Example Datapack",l={id:"curios/slots/datapack-example",title:"Example Datapack",description:"An example datapack for configuring various curio mechanics, including adding slot types to entities and modifying",source:"@site/docs/curios/slots/datapack-example.md",sourceDirName:"curios/slots",slug:"/curios/slots/datapack-example",permalink:"/curios/slots/datapack-example",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slots/datapack-example.md",tags:[],version:"current",sidebarPosition:17,frontMatter:{sidebar_position:17},sidebar:"tutorialSidebar",previous:{title:"Data Generation",permalink:"/curios/slots/data-generation"},next:{title:"Items",permalink:"/category/items"}},r={},d=[{value:"Getting Started",id:"getting-started",level:2},{value:"Registering a New Slot Type",id:"registering-a-new-slot-type",level:2},{value:"Modifying an Existing Slot Type",id:"modifying-an-existing-slot-type",level:2},{value:"Adding Slot Types to One or More Entities",id:"adding-slot-types-to-one-or-more-entities",level:2},{value:"Adding an Item to a Curio Slot",id:"adding-an-item-to-a-curio-slot",level:2},{value:"Activating the Datapack",id:"activating-the-datapack",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"example-datapack",children:"Example Datapack"}),"\n",(0,n.jsx)(t.p,{children:"An example datapack for configuring various curio mechanics, including adding slot types to entities and modifying\nexisting slot types."}),"\n",(0,n.jsx)(t.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,n.jsxs)(t.p,{children:["First, download the ",(0,n.jsx)(t.a,{target:"_blank",href:s(1121).Z+"",children:"example datapack"}),"."]}),"\n",(0,n.jsx)(t.p,{children:"Unzip the file and there will be the following folder structure:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"|data\n--|curios\n --|tags\n --|items\n --|ring.json\n--|curios_example\n --|curios\n --|entities\n --|entities.json\n --|slots\n --|ring.json\n|pack.mcmeta\n"})}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:".mcmeta"})," file and ",(0,n.jsx)(t.code,{children:".json"})," files can be opened and edited in any text editor, such as Notepad."]}),"\n",(0,n.jsxs)(t.admonition,{type:"note",children:[(0,n.jsx)(t.p,{children:(0,n.jsxs)(t.strong,{children:["Why are there two folders for ",(0,n.jsx)(t.em,{children:"curios"})," and ",(0,n.jsx)(t.em,{children:"curios_example"}),"?"]})}),(0,n.jsxs)(t.p,{children:["The namespace used for this datapack is ",(0,n.jsx)(t.code,{children:"curios_example"}),". The ",(0,n.jsx)(t.code,{children:"curios_example"})," folder has a sub-folder called ",(0,n.jsx)(t.code,{children:"curios"}),"\nwhich houses the ",(0,n.jsx)(t.code,{children:"entities"})," and ",(0,n.jsx)(t.code,{children:"slots"})," folder. This is the custom data that is specifically for the Curios mod. On the\nother hand, the ",(0,n.jsx)(t.code,{children:"curios"})," folder that houses the ",(0,n.jsx)(t.code,{children:"tags"})," folder is using the name as a separate namespace for the purposes\nof adding item tags, which are read by vanilla."]})]}),"\n",(0,n.jsx)(t.h2,{id:"registering-a-new-slot-type",children:"Registering a New Slot Type"}),"\n",(0,n.jsxs)(t.p,{children:["Adding a new slot type is controlled by the ",(0,n.jsx)(t.code,{children:"data/curios_example/curios/slots/example.json"})," file:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-json",children:'{\n "size": 1,\n "add_cosmetic": true\n}\n'})}),"\n",(0,n.jsx)(t.p,{children:"The file and file name specifies these properties for the slot type:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["The identifier for the slot type is ",(0,n.jsx)(t.code,{children:"example"}),", as denoted by the file name"]}),"\n",(0,n.jsxs)(t.li,{children:["The number of slots available is ",(0,n.jsx)(t.code,{children:"1"}),", as denoted by the ",(0,n.jsx)(t.code,{children:'"size"'})," field"]}),"\n",(0,n.jsxs)(t.li,{children:["Each slot of this slot type has an associated cosmetic slot, as denoted by the ",(0,n.jsx)(t.code,{children:'"add_cosmetic"'})," field"]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["For more information on the fields and customization of slot types, please refer to ",(0,n.jsx)(t.a,{href:"/curios/slots/slot-register",children:"the slot types page"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"modifying-an-existing-slot-type",children:"Modifying an Existing Slot Type"}),"\n",(0,n.jsxs)(t.p,{children:["Modifying an existing slot type is controlled by the ",(0,n.jsx)(t.code,{children:"data/curios_example/curios/slots/ring.json"})," file:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-json",children:'{\n "size": 2,\n "add_cosmetic": true\n}\n'})}),"\n",(0,n.jsx)(t.p,{children:"The file and file name specifies these properties for the slot type:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["The identifier for the slot type to change is ",(0,n.jsx)(t.code,{children:"ring"}),", as denoted by the file name"]}),"\n",(0,n.jsxs)(t.li,{children:["The number of slots available is ",(0,n.jsx)(t.code,{children:"2"}),", as denoted by the ",(0,n.jsx)(t.code,{children:'"size"'})," field"]}),"\n",(0,n.jsxs)(t.li,{children:["Each slot of this slot type has an associated cosmetic slot, as denoted by the ",(0,n.jsx)(t.code,{children:'"add_cosmetic"'})," field"]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"Note that this is exactly the same syntax as registering a new slot type. This is because modifying and registering a\nslot type both have the exact same process, the difference solely being whether multiple files exist for the same slot\ntype or not."}),"\n",(0,n.jsxs)(t.p,{children:["For more information on how slot types are modified from multiple files, please refer to ",(0,n.jsx)(t.a,{href:"/curios/slots/slot-register",children:"the slot types page"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"adding-slot-types-to-one-or-more-entities",children:"Adding Slot Types to One or More Entities"}),"\n",(0,n.jsxs)(t.p,{children:["Just creating the slot type isn't enough, as now it has to be added to one or more entities in order to appear anywhere.\nThis is configured by the ",(0,n.jsx)(t.code,{children:"data/curios_example/curios/entities/entities.json"})," file:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-json",children:'{\n "entities": [\n "minecraft:player",\n "minecraft:armor_stand"\n ],\n "slots": [\n "back",\n "body",\n "belt",\n "bracelet",\n "charm",\n "curio",\n "example",\n "hands",\n "head",\n "necklace",\n "ring"\n ]\n}\n'})}),"\n",(0,n.jsx)(t.p,{children:"The file specifies these properties:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["The slots being given are all the ",(0,n.jsx)(t.a,{href:"/curios/slots/preset-slots",children:"preset slot types"})," and the ",(0,n.jsx)(t.code,{children:"example"})," slot type created by this\ndatapack, as denoted by the ",(0,n.jsx)(t.code,{children:'"slots"'})," list"]}),"\n",(0,n.jsxs)(t.li,{children:["The entities being given slots are all players and armor stands, as denoted by the ",(0,n.jsx)(t.code,{children:'"entities"'})," list"]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["For more information on the fields and customization of entity slots, please refer to ",(0,n.jsx)(t.a,{href:"/curios/slots/entity-register",children:"the entity slots page"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"adding-an-item-to-a-curio-slot",children:"Adding an Item to a Curio Slot"}),"\n",(0,n.jsxs)(t.p,{children:["Items are added to slot types by adding them to the relevant item tag. In the example datapack, an item tag for the\n",(0,n.jsx)(t.code,{children:"ring"})," slot type is created at ",(0,n.jsx)(t.code,{children:"data/curios/tags/items/ring.json"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-json",children:'{\n "replace": false,\n "values": [\n "minecraft:diamond"\n ]\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["The file name is the same as the identifier for the slot type and will be the name of the tag that is created. By\nsetting ",(0,n.jsx)(t.code,{children:"replace"})," to ",(0,n.jsx)(t.code,{children:"false"}),", the values are added to the tag instead of replacing them. Listing ",(0,n.jsx)(t.code,{children:"minecraft:diamond"})," in\nthe ",(0,n.jsx)(t.code,{children:"values"})," array will add the diamond item to the tag and consequently diamonds will be equippable in the ",(0,n.jsx)(t.code,{children:"ring"})," slots."]}),"\n",(0,n.jsxs)(t.p,{children:["For more information on tags and item tags, please refer to the ",(0,n.jsx)(t.a,{href:"https://minecraft.wiki/w/Tag",children:"page on the Minecraft wiki"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"activating-the-datapack",children:"Activating the Datapack"}),"\n",(0,n.jsxs)(t.p,{children:["Datapacks are created on a per-world basis and need to be placed in the ",(0,n.jsx)(t.code,{children:"datapacks"})," folder of the ",(0,n.jsx)(t.code,{children:"world"})," folder on a\ndedicated server or the ",(0,n.jsx)(t.code,{children:"saves/(World Name)"})," folder in single player. They should automatically be enabled upon loading\nthe datapack for the first time in the world."]})]})}function h(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1121:(e,t,s)=>{s.d(t,{Z:()=>n});const n=s.p+"assets/files/curios_example-b9398f30472c661860955db867e85daa.zip"},1151:(e,t,s)=>{s.d(t,{Z:()=>l,a:()=>o});var n=s(7294);const i={},a=n.createContext(i);function o(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.78f3c854.js b/assets/js/935f2afb.78f3c854.js deleted file mode 100644 index f9a3d80..0000000 --- a/assets/js/935f2afb.78f3c854.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[53],{1109:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"1.20.x","banner":null,"badge":true,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Overview","href":"/","docId":"intro","unlisted":false},{"type":"category","label":"Curios","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Setting Up the Development Environment","href":"/curios/getting-started","docId":"curios/getting-started","unlisted":false},{"type":"category","label":"Slots","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Slot Types","href":"/curios/slots/slot-register","docId":"curios/slots/slot-register","unlisted":false},{"type":"link","label":"Entity Slot Types","href":"/curios/slots/entity-register","docId":"curios/slots/entity-register","unlisted":false},{"type":"link","label":"Preset Slot Types","href":"/curios/slots/preset-slots","docId":"curios/slots/preset-slots","unlisted":false},{"type":"link","label":"Slot Icon Textures","href":"/curios/slots/slot-textures","docId":"curios/slots/slot-textures","unlisted":false},{"type":"link","label":"Slot Modifiers","href":"/curios/slots/slot-modifiers","docId":"curios/slots/slot-modifiers","unlisted":false},{"type":"link","label":"Data Generation","href":"/curios/slots/data-generation","docId":"curios/slots/data-generation","unlisted":false},{"type":"link","label":"Example Datapack","href":"/curios/slots/datapack-example","docId":"curios/slots/datapack-example","unlisted":false}],"href":"/category/slots"},{"type":"category","label":"Items","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Creating a Curio","href":"/curios/items/curio-creation","docId":"curios/items/curio-creation","unlisted":false},{"type":"link","label":"Assigning Slots","href":"/curios/items/assign-slots","docId":"curios/items/assign-slots","unlisted":false},{"type":"link","label":"Rendering a Curio","href":"/curios/items/rendering-registry","docId":"curios/items/rendering-registry","unlisted":false},{"type":"link","label":"Curios Attribute Modifiers (NBT)","href":"/curios/items/curios-nbt","docId":"curios/items/curios-nbt","unlisted":false}],"href":"/category/items"},{"type":"category","label":"Inventory","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Basic Inventory Management","href":"/curios/inventory/basic-inventory","docId":"curios/inventory/basic-inventory","unlisted":false}],"href":"/category/inventory"},{"type":"category","label":"API","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"ICurioRenderer","href":"/curios/api/renderer-interface","docId":"curios/api/renderer-interface","unlisted":false}],"href":"/category/api"},{"type":"link","label":"Configuration","href":"/curios/configuration","docId":"curios/configuration","unlisted":false},{"type":"link","label":"Commands","href":"/curios/commands","docId":"curios/commands","unlisted":false}],"href":"/category/curios"},{"type":"category","label":"Diet","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Customizing Food Groups","href":"/diet/diet-groups","docId":"diet/diet-groups","unlisted":false},{"type":"link","label":"Categorizing Food to Groups","href":"/diet/food-classification","docId":"diet/food-classification","unlisted":false},{"type":"link","label":"Customizing Diet Suites","href":"/diet/diet-suites","docId":"diet/diet-suites","unlisted":false},{"type":"link","label":"Example Datapack","href":"/diet/datapack-example","docId":"diet/datapack-example","unlisted":false}],"href":"/category/diet"}]},"docs":{"curios/api/renderer-interface":{"id":"curios/api/renderer-interface","title":"ICurioRenderer","description":"Methods","sidebar":"tutorialSidebar"},"curios/commands":{"id":"curios/commands","title":"Commands","description":"A tutorial on the various commands available through Curios.","sidebar":"tutorialSidebar"},"curios/configuration":{"id":"curios/configuration","title":"Configuration","description":"Curios has various configuration files that can be used to change settings related to the user interface, curios","sidebar":"tutorialSidebar"},"curios/getting-started":{"id":"curios/getting-started","title":"Setting Up the Development Environment","description":"A tutorial on how to set up your development workspace to work with Curios API interfaces and methods.","sidebar":"tutorialSidebar"},"curios/inventory/basic-inventory":{"id":"curios/inventory/basic-inventory","title":"Basic Inventory Management","description":"Learn how to access and manage the Curios inventory attached to an entity.","sidebar":"tutorialSidebar"},"curios/items/assign-slots":{"id":"curios/items/assign-slots","title":"Assigning Slots","description":"A tutorial on how to assign items to slot types so that they can be equipped.","sidebar":"tutorialSidebar"},"curios/items/curio-creation":{"id":"curios/items/curio-creation","title":"Creating a Curio","description":"A tutorial on how to attach curio capabilities to your items.","sidebar":"tutorialSidebar"},"curios/items/curios-nbt":{"id":"curios/items/curios-nbt","title":"Curios Attribute Modifiers (NBT)","description":"A tutorial on how to edit a curio item\'s NBT data to add attribute modifiers when the item is worn in a curio slot.","sidebar":"tutorialSidebar"},"curios/items/rendering-registry":{"id":"curios/items/rendering-registry","title":"Rendering a Curio","description":"A tutorial on how to run rendering code when a specific curio item is equipped on an entity.","sidebar":"tutorialSidebar"},"curios/slots/data-generation":{"id":"curios/slots/data-generation","title":"Data Generation","description":"A tutorial on how to programmatically generate the Curios data files.","sidebar":"tutorialSidebar"},"curios/slots/datapack-example":{"id":"curios/slots/datapack-example","title":"Example Datapack","description":"An example datapack for configuring various curio mechanics, including adding slot types to entities and modifying","sidebar":"tutorialSidebar"},"curios/slots/entity-register":{"id":"curios/slots/entity-register","title":"Entity Slot Types","description":"A tutorial on how to add registered slot types to entities.","sidebar":"tutorialSidebar"},"curios/slots/preset-slots":{"id":"curios/slots/preset-slots","title":"Preset Slot Types","description":"A list of commonly used slot types that are already defined in Curios for developers to use.","sidebar":"tutorialSidebar"},"curios/slots/slot-modifiers":{"id":"curios/slots/slot-modifiers","title":"Slot Modifiers","description":"A tutorial on how to add and remove slots from the curios inventory on entities.","sidebar":"tutorialSidebar"},"curios/slots/slot-register":{"id":"curios/slots/slot-register","title":"Slot Types","description":"A tutorial on how to register and modify slot types that are recognized by Curios.","sidebar":"tutorialSidebar"},"curios/slots/slot-textures":{"id":"curios/slots/slot-textures","title":"Slot Icon Textures","description":"A tutorial on how to add custom slot textures to slot types.","sidebar":"tutorialSidebar"},"diet/datapack-example":{"id":"diet/datapack-example","title":"Example Datapack","description":"An example datapack for configuring various diet mechanics, including adding a new food group and adding food to that","sidebar":"tutorialSidebar"},"diet/diet-groups":{"id":"diet/diet-groups","title":"Customizing Food Groups","description":"A tutorial on how to edit available food groups and their respective metadata.","sidebar":"tutorialSidebar"},"diet/diet-suites":{"id":"diet/diet-suites","title":"Customizing Diet Suites","description":"A tutorial on how to customize suites of food groups and diet effects.","sidebar":"tutorialSidebar"},"diet/food-classification":{"id":"diet/food-classification","title":"Categorizing Food to Groups","description":"Food classification into groups is done through item tags.","sidebar":"tutorialSidebar"},"intro":{"id":"intro","title":"Overview","description":"WIP! Check back later for updates.","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.d2ffae94.js b/assets/js/935f2afb.d2ffae94.js new file mode 100644 index 0000000..d0e860a --- /dev/null +++ b/assets/js/935f2afb.d2ffae94.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[53],{1109:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"1.20.x","banner":null,"badge":true,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Overview","href":"/","docId":"intro","unlisted":false},{"type":"category","label":"Curios","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Setting Up the Development Environment","href":"/curios/getting-started","docId":"curios/getting-started","unlisted":false},{"type":"category","label":"Slots","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Slot Types","href":"/curios/slots/slot-register","docId":"curios/slots/slot-register","unlisted":false},{"type":"link","label":"Entity Slot Types","href":"/curios/slots/entity-register","docId":"curios/slots/entity-register","unlisted":false},{"type":"link","label":"Preset Slot Types","href":"/curios/slots/preset-slots","docId":"curios/slots/preset-slots","unlisted":false},{"type":"link","label":"Slot Icon Textures","href":"/curios/slots/slot-textures","docId":"curios/slots/slot-textures","unlisted":false},{"type":"link","label":"Slot Modifiers","href":"/curios/slots/slot-modifiers","docId":"curios/slots/slot-modifiers","unlisted":false},{"type":"link","label":"Data Generation","href":"/curios/slots/data-generation","docId":"curios/slots/data-generation","unlisted":false},{"type":"link","label":"Example Datapack","href":"/curios/slots/datapack-example","docId":"curios/slots/datapack-example","unlisted":false}],"href":"/category/slots"},{"type":"category","label":"Items","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Creating a Curio","href":"/curios/items/curio-creation","docId":"curios/items/curio-creation","unlisted":false},{"type":"link","label":"Assigning Slots","href":"/curios/items/assign-slots","docId":"curios/items/assign-slots","unlisted":false},{"type":"link","label":"Rendering a Curio","href":"/curios/items/rendering-registry","docId":"curios/items/rendering-registry","unlisted":false},{"type":"link","label":"Curios Attribute Modifiers (NBT)","href":"/curios/items/curios-nbt","docId":"curios/items/curios-nbt","unlisted":false}],"href":"/category/items"},{"type":"category","label":"Inventory","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Basic Inventory Management","href":"/curios/inventory/basic-inventory","docId":"curios/inventory/basic-inventory","unlisted":false}],"href":"/category/inventory"},{"type":"category","label":"API","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"ICurioRenderer","href":"/curios/api/renderer-interface","docId":"curios/api/renderer-interface","unlisted":false}],"href":"/category/api"},{"type":"link","label":"Configuration","href":"/curios/configuration","docId":"curios/configuration","unlisted":false},{"type":"link","label":"Commands","href":"/curios/commands","docId":"curios/commands","unlisted":false}],"href":"/category/curios"},{"type":"category","label":"Diet","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Customizing Food Groups","href":"/diet/diet-groups","docId":"diet/diet-groups","unlisted":false},{"type":"link","label":"Categorizing Food to Groups","href":"/diet/food-classification","docId":"diet/food-classification","unlisted":false},{"type":"link","label":"Customizing Diet Suites","href":"/diet/diet-suites","docId":"diet/diet-suites","unlisted":false},{"type":"link","label":"Example Datapack","href":"/diet/datapack-example","docId":"diet/datapack-example","unlisted":false}],"href":"/category/diet"},{"type":"category","label":"Vein Mining","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Assigning Block Groups","href":"/veinmining/block-groups","docId":"veinmining/block-groups","unlisted":false}],"href":"/category/vein-mining"}]},"docs":{"curios/api/renderer-interface":{"id":"curios/api/renderer-interface","title":"ICurioRenderer","description":"Methods","sidebar":"tutorialSidebar"},"curios/commands":{"id":"curios/commands","title":"Commands","description":"A tutorial on the various commands available through Curios.","sidebar":"tutorialSidebar"},"curios/configuration":{"id":"curios/configuration","title":"Configuration","description":"Curios has various configuration files that can be used to change settings related to the user interface, curios","sidebar":"tutorialSidebar"},"curios/getting-started":{"id":"curios/getting-started","title":"Setting Up the Development Environment","description":"A tutorial on how to set up your development workspace to work with Curios API interfaces and methods.","sidebar":"tutorialSidebar"},"curios/inventory/basic-inventory":{"id":"curios/inventory/basic-inventory","title":"Basic Inventory Management","description":"Learn how to access and manage the Curios inventory attached to an entity.","sidebar":"tutorialSidebar"},"curios/items/assign-slots":{"id":"curios/items/assign-slots","title":"Assigning Slots","description":"A tutorial on how to assign items to slot types so that they can be equipped.","sidebar":"tutorialSidebar"},"curios/items/curio-creation":{"id":"curios/items/curio-creation","title":"Creating a Curio","description":"A tutorial on how to attach curio capabilities to your items.","sidebar":"tutorialSidebar"},"curios/items/curios-nbt":{"id":"curios/items/curios-nbt","title":"Curios Attribute Modifiers (NBT)","description":"A tutorial on how to edit a curio item\'s NBT data to add attribute modifiers when the item is worn in a curio slot.","sidebar":"tutorialSidebar"},"curios/items/rendering-registry":{"id":"curios/items/rendering-registry","title":"Rendering a Curio","description":"A tutorial on how to run rendering code when a specific curio item is equipped on an entity.","sidebar":"tutorialSidebar"},"curios/slots/data-generation":{"id":"curios/slots/data-generation","title":"Data Generation","description":"A tutorial on how to programmatically generate the Curios data files.","sidebar":"tutorialSidebar"},"curios/slots/datapack-example":{"id":"curios/slots/datapack-example","title":"Example Datapack","description":"An example datapack for configuring various curio mechanics, including adding slot types to entities and modifying","sidebar":"tutorialSidebar"},"curios/slots/entity-register":{"id":"curios/slots/entity-register","title":"Entity Slot Types","description":"A tutorial on how to add registered slot types to entities.","sidebar":"tutorialSidebar"},"curios/slots/preset-slots":{"id":"curios/slots/preset-slots","title":"Preset Slot Types","description":"A list of commonly used slot types that are already defined in Curios for developers to use.","sidebar":"tutorialSidebar"},"curios/slots/slot-modifiers":{"id":"curios/slots/slot-modifiers","title":"Slot Modifiers","description":"A tutorial on how to add and remove slots from the curios inventory on entities.","sidebar":"tutorialSidebar"},"curios/slots/slot-register":{"id":"curios/slots/slot-register","title":"Slot Types","description":"A tutorial on how to register and modify slot types that are recognized by Curios.","sidebar":"tutorialSidebar"},"curios/slots/slot-textures":{"id":"curios/slots/slot-textures","title":"Slot Icon Textures","description":"A tutorial on how to add custom slot textures to slot types.","sidebar":"tutorialSidebar"},"diet/datapack-example":{"id":"diet/datapack-example","title":"Example Datapack","description":"An example datapack for configuring various diet mechanics, including adding a new food group and adding food to that","sidebar":"tutorialSidebar"},"diet/diet-groups":{"id":"diet/diet-groups","title":"Customizing Food Groups","description":"A tutorial on how to edit available food groups and their respective metadata.","sidebar":"tutorialSidebar"},"diet/diet-suites":{"id":"diet/diet-suites","title":"Customizing Diet Suites","description":"A tutorial on how to customize suites of food groups and diet effects.","sidebar":"tutorialSidebar"},"diet/food-classification":{"id":"diet/food-classification","title":"Categorizing Food to Groups","description":"Food classification into groups is done through item tags.","sidebar":"tutorialSidebar"},"intro":{"id":"intro","title":"Overview","description":"WIP! Check back later for updates.","sidebar":"tutorialSidebar"},"veinmining/block-groups":{"id":"veinmining/block-groups","title":"Assigning Block Groups","description":"A tutorial on how to assign blocks to groups so that they are vein mined together when applicable.","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/93c91ab0.cbba8fbc.js b/assets/js/93c91ab0.cbba8fbc.js new file mode 100644 index 0000000..2b748a5 --- /dev/null +++ b/assets/js/93c91ab0.cbba8fbc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[5058],{8504:e=>{e.exports=JSON.parse('{"title":"Mod Integrations","slug":"/category/mod-integrations","permalink":"/1.18.x/category/mod-integrations","navigation":{"previous":{"title":"NBT Tags","permalink":"/1.18.x/champions/nbt"},"next":{"title":"Game Stages","permalink":"/1.18.x/champions/integration/gamestages"}}}')}}]); \ No newline at end of file diff --git a/assets/js/93c91ab0.dca9feb8.js b/assets/js/93c91ab0.dca9feb8.js deleted file mode 100644 index 3ad7141..0000000 --- a/assets/js/93c91ab0.dca9feb8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[58],{8504:e=>{e.exports=JSON.parse('{"title":"Mod Integrations","slug":"/category/mod-integrations","permalink":"/1.18.x/category/mod-integrations","navigation":{"previous":{"title":"NBT Tags","permalink":"/1.18.x/champions/nbt"},"next":{"title":"Game Stages","permalink":"/1.18.x/champions/integration/gamestages"}}}')}}]); \ No newline at end of file diff --git a/assets/js/93d27ab8.6a983903.js b/assets/js/93d27ab8.6a983903.js new file mode 100644 index 0000000..d5ac2b0 --- /dev/null +++ b/assets/js/93d27ab8.6a983903.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[6789],{6080:e=>{e.exports=JSON.parse('{"title":"Champions","description":"A Minecraft mod introducing elite mobs with enhanced stats and abilities.","slug":"/category/champions","permalink":"/1.18.x/category/champions","navigation":{"previous":{"title":"Overview","permalink":"/1.18.x/"},"next":{"title":"Loot","permalink":"/1.18.x/champions/loottable"}}}')}}]); \ No newline at end of file diff --git a/assets/js/93d27ab8.789c181b.js b/assets/js/93d27ab8.789c181b.js deleted file mode 100644 index e1bf384..0000000 --- a/assets/js/93d27ab8.789c181b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[789],{6080:e=>{e.exports=JSON.parse('{"title":"Champions","description":"A Minecraft mod introducing elite mobs with enhanced stats and abilities.","slug":"/category/champions","permalink":"/1.18.x/category/champions","navigation":{"previous":{"title":"Overview","permalink":"/1.18.x/"},"next":{"title":"Loot","permalink":"/1.18.x/champions/loottable"}}}')}}]); \ No newline at end of file diff --git a/assets/js/96cf4fb7.325d709e.js b/assets/js/96cf4fb7.325d709e.js deleted file mode 100644 index 9dadfe1..0000000 --- a/assets/js/96cf4fb7.325d709e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[495],{5880:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var s=i(5893),t=i(1151);const o={sidebar_position:6},r="Commands",c={id:"champions/commands",title:"Commands",description:"All the Champions commands are available through /champions.",source:"@site/versioned_docs/version-1.18.x/champions/commands.md",sourceDirName:"champions",slug:"/champions/commands",permalink:"/1.18.x/champions/commands",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/versioned_docs/version-1.18.x/champions/commands.md",tags:[],version:"1.18.x",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"tutorialSidebar",previous:{title:"Loot",permalink:"/1.18.x/champions/loottable"},next:{title:"NBT Tags",permalink:"/1.18.x/champions/nbt"}},d={},l=[{value:"Command Guide",id:"command-guide",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Arguments",id:"arguments",level:2},{value:"Examples",id:"examples",level:2}];function a(n){const e={a:"a",code:"code",h1:"h1",h2:"h2",hr:"hr",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.a)(),...n.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.h1,{id:"commands",children:"Commands"}),"\n",(0,s.jsxs)(e.p,{children:["All the Champions commands are available through ",(0,s.jsx)(e.code,{children:"/champions"}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"command-guide",children:"Command Guide"}),"\n",(0,s.jsxs)(e.table,{children:[(0,s.jsx)(e.thead,{children:(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.th,{children:"Syntax"}),(0,s.jsx)(e.th,{children:"Meaning"})]})}),(0,s.jsxs)(e.tbody,{children:[(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:(0,s.jsx)(e.code,{children:"plain text"})}),(0,s.jsxs)(e.td,{children:[(0,s.jsx)(e.strong,{children:"Enter this literally"}),", exactly as shown."]})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:(0,s.jsx)(e.code,{children:""})}),(0,s.jsxs)(e.td,{children:["An ",(0,s.jsx)(e.strong,{children:"argument"})," that should be replaced with an appropriate value."]})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:(0,s.jsx)(e.code,{children:"[entry]"})}),(0,s.jsxs)(e.td,{children:["This entry is ",(0,s.jsx)(e.strong,{children:"optional"}),"."]})]})]})]}),"\n",(0,s.jsx)(e.h2,{id:"syntax",children:"Syntax"}),"\n",(0,s.jsx)(e.hr,{}),"\n",(0,s.jsxs)(e.p,{children:["There are three instructions for ",(0,s.jsx)(e.code,{children:"/champion"})," which are ",(0,s.jsx)(e.code,{children:"summon"}),", ",(0,s.jsx)(e.code,{children:"egg"}),", and ",(0,s.jsx)(e.code,{children:"summonpos"}),"."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"summon [ ] [ ]"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Summons a champion entity."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"egg [ ] [ ]"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Gives the command sender a spawn egg that spawns a champion entity."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"summonpos [ ] [ ]"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Summons a champion entity at a location."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["In order to summon a champion with NBT tags, use ",(0,s.jsx)(e.code,{children:"/summon"})," in combination with the ",(0,s.jsx)(e.a,{href:"nbt",children:"Champions NBT tags"}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"arguments",children:"Arguments"}),"\n",(0,s.jsx)(e.hr,{}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:" "}),": ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#entity_summon",children:"entity_summon"})]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Specifies the entity to be summoned."}),"\n",(0,s.jsxs)(e.li,{children:["Must be an ID of a summonable ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Entity",children:"entity"})," type."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:" "}),": ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#int",children:"int"})]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Specifies the champion tier of the entity to be summoned."}),"\n",(0,s.jsxs)(e.li,{children:["Must be a valid tier from a rank as specified in the ",(0,s.jsx)(e.code,{children:"champions-rank.toml"})," configuration file."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:" "}),": [affix_identifier]"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Specifies an affix to attach to the entity to be summoned."}),"\n",(0,s.jsx)(e.li,{children:"Must be an identifier of a registered [affix]."}),"\n",(0,s.jsx)(e.li,{children:"Multiple space-delimited affixes can be specified."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:" "}),": ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#vec3",children:"vec3"})]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Specifies the position to summon the entity. If not specified, defaults to the position of the command's execution."}),"\n",(0,s.jsxs)(e.li,{children:["Must be a three-dimensional coordinates with floating-point number elements. Accepts ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Coordinates#Commands",children:"tilde and caret notations"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"examples",children:"Examples"}),"\n",(0,s.jsx)(e.hr,{}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["To summon a tier 3 champion ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Spider",children:"spider"})," entity with the Enkindling affix:","\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"champion summon spider 3 enkindling"})}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["To give a spawn egg that summons a tier 2 champion ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Skeleton",children:"skeleton"})," entity with random affixes:","\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"champion egg skeleton 2"})}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["To summon a tier 1 champion ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Zombie",children:"zombie"})," entity with random affixes 10 blocks west of the current position of the executing sender:","\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"champion summonpos ~-10 ~ ~ zombie 1"})}),"\n"]}),"\n"]}),"\n"]})]})}function h(n={}){const{wrapper:e}={...(0,t.a)(),...n.components};return e?(0,s.jsx)(e,{...n,children:(0,s.jsx)(a,{...n})}):a(n)}},1151:(n,e,i)=>{i.d(e,{Z:()=>c,a:()=>r});var s=i(7294);const t={},o=s.createContext(t);function r(n){const e=s.useContext(o);return s.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function c(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(t):n.components||t:r(n.components),s.createElement(o.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/96cf4fb7.77356a3e.js b/assets/js/96cf4fb7.77356a3e.js new file mode 100644 index 0000000..adfa25b --- /dev/null +++ b/assets/js/96cf4fb7.77356a3e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[8495],{5880:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var s=i(5893),t=i(1151);const o={sidebar_position:6},r="Commands",c={id:"champions/commands",title:"Commands",description:"All the Champions commands are available through /champions.",source:"@site/versioned_docs/version-1.18.x/champions/commands.md",sourceDirName:"champions",slug:"/champions/commands",permalink:"/1.18.x/champions/commands",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/versioned_docs/version-1.18.x/champions/commands.md",tags:[],version:"1.18.x",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"tutorialSidebar",previous:{title:"Loot",permalink:"/1.18.x/champions/loottable"},next:{title:"NBT Tags",permalink:"/1.18.x/champions/nbt"}},d={},l=[{value:"Command Guide",id:"command-guide",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Arguments",id:"arguments",level:2},{value:"Examples",id:"examples",level:2}];function a(n){const e={a:"a",code:"code",h1:"h1",h2:"h2",hr:"hr",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.a)(),...n.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.h1,{id:"commands",children:"Commands"}),"\n",(0,s.jsxs)(e.p,{children:["All the Champions commands are available through ",(0,s.jsx)(e.code,{children:"/champions"}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"command-guide",children:"Command Guide"}),"\n",(0,s.jsxs)(e.table,{children:[(0,s.jsx)(e.thead,{children:(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.th,{children:"Syntax"}),(0,s.jsx)(e.th,{children:"Meaning"})]})}),(0,s.jsxs)(e.tbody,{children:[(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:(0,s.jsx)(e.code,{children:"plain text"})}),(0,s.jsxs)(e.td,{children:[(0,s.jsx)(e.strong,{children:"Enter this literally"}),", exactly as shown."]})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:(0,s.jsx)(e.code,{children:" "})}),(0,s.jsxs)(e.td,{children:["An ",(0,s.jsx)(e.strong,{children:"argument"})," that should be replaced with an appropriate value."]})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:(0,s.jsx)(e.code,{children:"[entry]"})}),(0,s.jsxs)(e.td,{children:["This entry is ",(0,s.jsx)(e.strong,{children:"optional"}),"."]})]})]})]}),"\n",(0,s.jsx)(e.h2,{id:"syntax",children:"Syntax"}),"\n",(0,s.jsx)(e.hr,{}),"\n",(0,s.jsxs)(e.p,{children:["There are three instructions for ",(0,s.jsx)(e.code,{children:"/champion"})," which are ",(0,s.jsx)(e.code,{children:"summon"}),", ",(0,s.jsx)(e.code,{children:"egg"}),", and ",(0,s.jsx)(e.code,{children:"summonpos"}),"."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"summon [ ] [ ]"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Summons a champion entity."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"egg [ ] [ ]"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Gives the command sender a spawn egg that spawns a champion entity."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"summonpos [ ] [ ]"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Summons a champion entity at a location."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["In order to summon a champion with NBT tags, use ",(0,s.jsx)(e.code,{children:"/summon"})," in combination with the ",(0,s.jsx)(e.a,{href:"nbt",children:"Champions NBT tags"}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"arguments",children:"Arguments"}),"\n",(0,s.jsx)(e.hr,{}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:" "}),": ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#entity_summon",children:"entity_summon"})]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Specifies the entity to be summoned."}),"\n",(0,s.jsxs)(e.li,{children:["Must be an ID of a summonable ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Entity",children:"entity"})," type."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:" "}),": ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#int",children:"int"})]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Specifies the champion tier of the entity to be summoned."}),"\n",(0,s.jsxs)(e.li,{children:["Must be a valid tier from a rank as specified in the ",(0,s.jsx)(e.code,{children:"champions-rank.toml"})," configuration file."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:" "}),": [affix_identifier]"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Specifies an affix to attach to the entity to be summoned."}),"\n",(0,s.jsx)(e.li,{children:"Must be an identifier of a registered [affix]."}),"\n",(0,s.jsx)(e.li,{children:"Multiple space-delimited affixes can be specified."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:" "}),": ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#vec3",children:"vec3"})]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Specifies the position to summon the entity. If not specified, defaults to the position of the command's execution."}),"\n",(0,s.jsxs)(e.li,{children:["Must be a three-dimensional coordinates with floating-point number elements. Accepts ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Coordinates#Commands",children:"tilde and caret notations"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"examples",children:"Examples"}),"\n",(0,s.jsx)(e.hr,{}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["To summon a tier 3 champion ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Spider",children:"spider"})," entity with the Enkindling affix:","\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"champion summon spider 3 enkindling"})}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["To give a spawn egg that summons a tier 2 champion ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Skeleton",children:"skeleton"})," entity with random affixes:","\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"champion egg skeleton 2"})}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["To summon a tier 1 champion ",(0,s.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Zombie",children:"zombie"})," entity with random affixes 10 blocks west of the current position of the executing sender:","\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"champion summonpos ~-10 ~ ~ zombie 1"})}),"\n"]}),"\n"]}),"\n"]})]})}function h(n={}){const{wrapper:e}={...(0,t.a)(),...n.components};return e?(0,s.jsx)(e,{...n,children:(0,s.jsx)(a,{...n})}):a(n)}},1151:(n,e,i)=>{i.d(e,{Z:()=>c,a:()=>r});var s=i(7294);const t={},o=s.createContext(t);function r(n){const e=s.useContext(o);return s.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function c(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(t):n.components||t:r(n.components),s.createElement(o.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/99097929.2c00f282.js b/assets/js/99097929.2c00f282.js deleted file mode 100644 index 5e8d1db..0000000 --- a/assets/js/99097929.2c00f282.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[368],{1754:e=>{e.exports=JSON.parse('{"title":"Diet","description":"A Minecraft mod featuring a customizable food group-based nutrition and diet system.","slug":"/category/diet","permalink":"/category/diet","navigation":{"previous":{"title":"Commands","permalink":"/curios/commands"},"next":{"title":"Customizing Food Groups","permalink":"/diet/diet-groups"}}}')}}]); \ No newline at end of file diff --git a/assets/js/99097929.5e105eff.js b/assets/js/99097929.5e105eff.js new file mode 100644 index 0000000..6f5abd9 --- /dev/null +++ b/assets/js/99097929.5e105eff.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[5368],{1754:e=>{e.exports=JSON.parse('{"title":"Diet","description":"A Minecraft mod featuring a customizable food group-based nutrition and diet system.","slug":"/category/diet","permalink":"/category/diet","navigation":{"previous":{"title":"Commands","permalink":"/curios/commands"},"next":{"title":"Customizing Food Groups","permalink":"/diet/diet-groups"}}}')}}]); \ No newline at end of file diff --git a/assets/js/99b1d78b.43c227b6.js b/assets/js/99b1d78b.43c227b6.js deleted file mode 100644 index ea7e86b..0000000 --- a/assets/js/99b1d78b.43c227b6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[664],{6343:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>s,default:()=>u,frontMatter:()=>o,metadata:()=>d,toc:()=>c});var i=r(5893),t=r(1151);const o={sidebar_position:8},s="Rendering a Curio",d={id:"curios/items/rendering-registry",title:"Rendering a Curio",description:"A tutorial on how to run rendering code when a specific curio item is equipped on an entity.",source:"@site/docs/curios/items/rendering-registry.md",sourceDirName:"curios/items",slug:"/curios/items/rendering-registry",permalink:"/curios/items/rendering-registry",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/items/rendering-registry.md",tags:[],version:"current",sidebarPosition:8,frontMatter:{sidebar_position:8},sidebar:"tutorialSidebar",previous:{title:"Assigning Slots",permalink:"/curios/items/assign-slots"},next:{title:"Curios Attribute Modifiers (NBT)",permalink:"/curios/items/curios-nbt"}},a={},c=[{value:"Create an ICurioRenderer
",id:"create-an-icuriorenderer",level:2},{value:"Register your renderer",id:"register-your-renderer",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",hr:"hr",p:"p",pre:"pre",...(0,t.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"rendering-a-curio",children:"Rendering a Curio"}),"\n",(0,i.jsx)(n.p,{children:"A tutorial on how to run rendering code when a specific curio item is equipped on an entity."}),"\n",(0,i.jsxs)(n.h2,{id:"create-an-icuriorenderer",children:["Create an ",(0,i.jsx)(n.code,{children:"ICurioRenderer"})]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsxs)(n.p,{children:["In the ",(0,i.jsx)(n.code,{children:"top.theillusivec4.curios.api.client"})," package, you'll find an interface called ",(0,i.jsx)(n.code,{children:"ICurioRenderer"}),". This interface\nneeds to be implemented on an object of your choice, as its ",(0,i.jsx)(n.code,{children:"render"})," method is what will be called to run your rendering\ncode later."]}),"\n",(0,i.jsxs)(n.p,{children:["For the full guide on the interface, see ",(0,i.jsx)(n.a,{href:"/curios/api/renderer-interface",children:"here"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-java",children:"public class MyCurioRenderer implements ICurioRenderer {\n \n @Override\n public> void render(ItemStack stack,\n SlotContext slotContext,\n PoseStack matrixStack,\n RenderLayerParent renderLayerParent,\n MultiBufferSource renderTypeBuffer,\n int light, float limbSwing,\n float limbSwingAmount,\n float partialTicks,\n float ageInTicks,\n float netHeadYaw,\n float headPitch) {\n // Render code goes here\n }\n}\n"})}),"\n",(0,i.jsx)(n.h2,{id:"register-your-renderer",children:"Register your renderer"}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsxs)(n.p,{children:["Once you have an implementation of ",(0,i.jsx)(n.code,{children:"ICurioRenderer"}),", you need to register an instance of that to an item. This is done\nby calling the ",(0,i.jsx)(n.code,{children:"register"})," method in ",(0,i.jsx)(n.code,{children:"top.theillusivec4.curios.api.client.CuriosRendererRegistry"})," during the\n",(0,i.jsx)(n.code,{children:"FMLClientSetupEvent"})," in mod loading."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-java",children:'@Mod("CurioMod")\npublic class CurioMod {\n \n public CurioMod() {\n final IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();\n eventBus.addListener(this::clientSetup);\n }\n\n private void clientSetup(final FMLClientSetupEvent evt) {\n CuriosRendererRegistry.register(CurioModItems.MY_ITEM, () -> new MyCurioRenderer());\n }\n}\n'})}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["Multiple items are allowed to share a renderer instance or type. This can be handy if your ",(0,i.jsx)(n.code,{children:"ICurioRenderer"}),"\nimplementation shares a lot of common code or if your items have very similar renders, in which case you may find it\nadvantageous to simply register those items with a single renderer rather than multiple."]})})]})}function u(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},1151:(e,n,r)=>{r.d(n,{Z:()=>d,a:()=>s});var i=r(7294);const t={},o=i.createContext(t);function s(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/99b1d78b.4ae595b9.js b/assets/js/99b1d78b.4ae595b9.js new file mode 100644 index 0000000..8452515 --- /dev/null +++ b/assets/js/99b1d78b.4ae595b9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[5664],{6343:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>s,default:()=>u,frontMatter:()=>o,metadata:()=>d,toc:()=>c});var i=r(5893),t=r(1151);const o={sidebar_position:8},s="Rendering a Curio",d={id:"curios/items/rendering-registry",title:"Rendering a Curio",description:"A tutorial on how to run rendering code when a specific curio item is equipped on an entity.",source:"@site/docs/curios/items/rendering-registry.md",sourceDirName:"curios/items",slug:"/curios/items/rendering-registry",permalink:"/curios/items/rendering-registry",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/items/rendering-registry.md",tags:[],version:"current",sidebarPosition:8,frontMatter:{sidebar_position:8},sidebar:"tutorialSidebar",previous:{title:"Assigning Slots",permalink:"/curios/items/assign-slots"},next:{title:"Curios Attribute Modifiers (NBT)",permalink:"/curios/items/curios-nbt"}},a={},c=[{value:"Create an ICurioRenderer
",id:"create-an-icuriorenderer",level:2},{value:"Register your renderer",id:"register-your-renderer",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",hr:"hr",p:"p",pre:"pre",...(0,t.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"rendering-a-curio",children:"Rendering a Curio"}),"\n",(0,i.jsx)(n.p,{children:"A tutorial on how to run rendering code when a specific curio item is equipped on an entity."}),"\n",(0,i.jsxs)(n.h2,{id:"create-an-icuriorenderer",children:["Create an ",(0,i.jsx)(n.code,{children:"ICurioRenderer"})]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsxs)(n.p,{children:["In the ",(0,i.jsx)(n.code,{children:"top.theillusivec4.curios.api.client"})," package, you'll find an interface called ",(0,i.jsx)(n.code,{children:"ICurioRenderer"}),". This interface\nneeds to be implemented on an object of your choice, as its ",(0,i.jsx)(n.code,{children:"render"})," method is what will be called to run your rendering\ncode later."]}),"\n",(0,i.jsxs)(n.p,{children:["For the full guide on the interface, see ",(0,i.jsx)(n.a,{href:"/curios/api/renderer-interface",children:"here"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-java",children:"public class MyCurioRenderer implements ICurioRenderer {\n \n @Override\n public> void render(ItemStack stack,\n SlotContext slotContext,\n PoseStack matrixStack,\n RenderLayerParent renderLayerParent,\n MultiBufferSource renderTypeBuffer,\n int light, float limbSwing,\n float limbSwingAmount,\n float partialTicks,\n float ageInTicks,\n float netHeadYaw,\n float headPitch) {\n // Render code goes here\n }\n}\n"})}),"\n",(0,i.jsx)(n.h2,{id:"register-your-renderer",children:"Register your renderer"}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsxs)(n.p,{children:["Once you have an implementation of ",(0,i.jsx)(n.code,{children:"ICurioRenderer"}),", you need to register an instance of that to an item. This is done\nby calling the ",(0,i.jsx)(n.code,{children:"register"})," method in ",(0,i.jsx)(n.code,{children:"top.theillusivec4.curios.api.client.CuriosRendererRegistry"})," during the\n",(0,i.jsx)(n.code,{children:"FMLClientSetupEvent"})," in mod loading."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-java",children:'@Mod("CurioMod")\npublic class CurioMod {\n \n public CurioMod() {\n final IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();\n eventBus.addListener(this::clientSetup);\n }\n\n private void clientSetup(final FMLClientSetupEvent evt) {\n CuriosRendererRegistry.register(CurioModItems.MY_ITEM, () -> new MyCurioRenderer());\n }\n}\n'})}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["Multiple items are allowed to share a renderer instance or type. This can be handy if your ",(0,i.jsx)(n.code,{children:"ICurioRenderer"}),"\nimplementation shares a lot of common code or if your items have very similar renders, in which case you may find it\nadvantageous to simply register those items with a single renderer rather than multiple."]})})]})}function u(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},1151:(e,n,r)=>{r.d(n,{Z:()=>d,a:()=>s});var i=r(7294);const t={},o=i.createContext(t);function s(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a0145bdd.7ddcf081.js b/assets/js/a0145bdd.7ddcf081.js deleted file mode 100644 index 4e66036..0000000 --- a/assets/js/a0145bdd.7ddcf081.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[168],{3894:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"1.18.x","label":"1.18.x","banner":"unmaintained","badge":true,"noIndex":false,"className":"docs-version-1.18.x","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Overview","href":"/1.18.x/","docId":"intro","unlisted":false},{"type":"category","label":"Champions","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Loot","href":"/1.18.x/champions/loottable","docId":"champions/loottable","unlisted":false},{"type":"link","label":"Commands","href":"/1.18.x/champions/commands","docId":"champions/commands","unlisted":false},{"type":"link","label":"NBT Tags","href":"/1.18.x/champions/nbt","docId":"champions/nbt","unlisted":false},{"type":"category","label":"Mod Integrations","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Game Stages","href":"/1.18.x/champions/integration/gamestages","docId":"champions/integration/gamestages","unlisted":false},{"type":"link","label":"Scaling Health","href":"/1.18.x/champions/integration/scalinghealth","docId":"champions/integration/scalinghealth","unlisted":false}],"href":"/1.18.x/category/mod-integrations"}],"href":"/1.18.x/category/champions"}]},"docs":{"champions/commands":{"id":"champions/commands","title":"Commands","description":"All the Champions commands are available through /champions.","sidebar":"tutorialSidebar"},"champions/integration/gamestages":{"id":"champions/integration/gamestages","title":"Game Stages","description":"Champions supports staging champions and ranks using the Game Stages mod.","sidebar":"tutorialSidebar"},"champions/integration/scalinghealth":{"id":"champions/integration/scalinghealth","title":"Scaling Health","description":"Champions supports increasing champion spawn chances when using the Scaling Health mod.","sidebar":"tutorialSidebar"},"champions/loottable":{"id":"champions/loottable","title":"Loot","description":"All champions get their drops from the Champions loot table, which is enabled when the lootSource configuration value in the","sidebar":"tutorialSidebar"},"champions/nbt":{"id":"champions/nbt","title":"NBT Tags","description":"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.","sidebar":"tutorialSidebar"},"intro":{"id":"intro","title":"Overview","description":"WIP! Check back later for updates.","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/a0145bdd.afbbde18.js b/assets/js/a0145bdd.afbbde18.js new file mode 100644 index 0000000..8dbeb80 --- /dev/null +++ b/assets/js/a0145bdd.afbbde18.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[1168],{3894:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"1.18.x","label":"1.18.x","banner":"unmaintained","badge":true,"noIndex":false,"className":"docs-version-1.18.x","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Overview","href":"/1.18.x/","docId":"intro","unlisted":false},{"type":"category","label":"Champions","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Loot","href":"/1.18.x/champions/loottable","docId":"champions/loottable","unlisted":false},{"type":"link","label":"Commands","href":"/1.18.x/champions/commands","docId":"champions/commands","unlisted":false},{"type":"link","label":"NBT Tags","href":"/1.18.x/champions/nbt","docId":"champions/nbt","unlisted":false},{"type":"category","label":"Mod Integrations","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Game Stages","href":"/1.18.x/champions/integration/gamestages","docId":"champions/integration/gamestages","unlisted":false},{"type":"link","label":"Scaling Health","href":"/1.18.x/champions/integration/scalinghealth","docId":"champions/integration/scalinghealth","unlisted":false}],"href":"/1.18.x/category/mod-integrations"}],"href":"/1.18.x/category/champions"}]},"docs":{"champions/commands":{"id":"champions/commands","title":"Commands","description":"All the Champions commands are available through /champions.","sidebar":"tutorialSidebar"},"champions/integration/gamestages":{"id":"champions/integration/gamestages","title":"Game Stages","description":"Champions supports staging champions and ranks using the Game Stages mod.","sidebar":"tutorialSidebar"},"champions/integration/scalinghealth":{"id":"champions/integration/scalinghealth","title":"Scaling Health","description":"Champions supports increasing champion spawn chances when using the Scaling Health mod.","sidebar":"tutorialSidebar"},"champions/loottable":{"id":"champions/loottable","title":"Loot","description":"All champions get their drops from the Champions loot table, which is enabled when the lootSource configuration value in the","sidebar":"tutorialSidebar"},"champions/nbt":{"id":"champions/nbt","title":"NBT Tags","description":"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.","sidebar":"tutorialSidebar"},"intro":{"id":"intro","title":"Overview","description":"WIP! Check back later for updates.","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/a4f7be8a.032640f0.js b/assets/js/a4f7be8a.032640f0.js new file mode 100644 index 0000000..aa57222 --- /dev/null +++ b/assets/js/a4f7be8a.032640f0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[8750],{6966:e=>{e.exports=JSON.parse('{"title":"API","description":"All about the Curio API interfaces.","slug":"/category/api","permalink":"/category/api","navigation":{"previous":{"title":"Basic Inventory Management","permalink":"/curios/inventory/basic-inventory"},"next":{"title":"ICurioRenderer","permalink":"/curios/api/renderer-interface"}}}')}}]); \ No newline at end of file diff --git a/assets/js/a4f7be8a.8c4ddd02.js b/assets/js/a4f7be8a.8c4ddd02.js deleted file mode 100644 index 4f20084..0000000 --- a/assets/js/a4f7be8a.8c4ddd02.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[750],{6966:e=>{e.exports=JSON.parse('{"title":"API","description":"All about the Curio API interfaces.","slug":"/category/api","permalink":"/category/api","navigation":{"previous":{"title":"Basic Inventory Management","permalink":"/curios/inventory/basic-inventory"},"next":{"title":"ICurioRenderer","permalink":"/curios/api/renderer-interface"}}}')}}]); \ No newline at end of file diff --git a/assets/js/a54b83c5.48ac735e.js b/assets/js/a54b83c5.48ac735e.js deleted file mode 100644 index 057e507..0000000 --- a/assets/js/a54b83c5.48ac735e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[842],{7345:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>r,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>d,toc:()=>l});var i=o(5893),n=o(1151);const a={sidebar_position:3},s="Categorizing Food to Groups",d={id:"diet/food-classification",title:"Categorizing Food to Groups",description:"Food classification into groups is done through item tags.",source:"@site/docs/diet/food-classification.md",sourceDirName:"diet",slug:"/diet/food-classification",permalink:"/diet/food-classification",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/diet/food-classification.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Customizing Food Groups",permalink:"/diet/diet-groups"},next:{title:"Customizing Diet Suites",permalink:"/diet/diet-suites"}},r={},l=[{value:"Special Tags",id:"special-tags",level:2},{value:" diet:ingredients
",id:"dietingredients",level:3},{value:"diet:special_food
",id:"dietspecial_food",level:3},{value:"Guided Walkthrough",id:"guided-walkthrough",level:2},{value:"Creating a data pack",id:"creating-a-data-pack",level:3},{value:"Creating a tag file",id:"creating-a-tag-file",level:3}];function c(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,n.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"categorizing-food-to-groups",children:"Categorizing Food to Groups"}),"\n",(0,i.jsx)(t.p,{children:"Food classification into groups is done through item tags."}),"\n",(0,i.jsxs)(t.p,{children:["Please see the general overview of the tag system at ",(0,i.jsx)(t.a,{href:"https://minecraft.gamepedia.com/Tag",children:"the Minecraft wiki"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["The tags follow the format ",(0,i.jsx)(t.code,{children:"diet:[group name]"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"special-tags",children:"Special Tags"}),"\n",(0,i.jsx)(t.h3,{id:"dietingredients",children:(0,i.jsx)(t.code,{children:"diet:ingredients"})}),"\n",(0,i.jsx)(t.p,{children:"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."}),"\n",(0,i.jsx)(t.p,{children:"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."}),"\n",(0,i.jsx)(t.h3,{id:"dietspecial_food",children:(0,i.jsx)(t.code,{children:"diet:special_food"})}),"\n",(0,i.jsx)(t.p,{children:"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)."}),"\n",(0,i.jsx)(t.h2,{id:"guided-walkthrough",children:"Guided Walkthrough"}),"\n",(0,i.jsx)(t.h3,{id:"creating-a-data-pack",children:"Creating a data pack"}),"\n",(0,i.jsxs)(t.p,{children:["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 ",(0,i.jsx)(t.code,{children:".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 ",(0,i.jsx)(t.code,{children:".minecraft/saves/(world-name)/datapacks/(datapack-name)"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["Once you're inside, create a ",(0,i.jsx)(t.code,{children:"pack.mcmeta"})," file, named exactly like that. Open the file and fill it with this:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'{\n "pack": {\n "pack_format": 6,\n "description": "put a description here, or not"\n }\n}\n'})}),"\n",(0,i.jsxs)(t.p,{children:["Once you're done, save it. You should be back at the data pack's root folder at ",(0,i.jsx)(t.code,{children:".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 ",(0,i.jsx)(t.code,{children:"data"}),", then another folder in ",(0,i.jsx)(t.code,{children:"data"})," called ",(0,i.jsx)(t.code,{children:"diet"}),", then another folder in ",(0,i.jsx)(t.code,{children:"diet"})," called ",(0,i.jsx)(t.code,{children:"tags"}),", then another in ",(0,i.jsx)(t.code,{children:"tags"})," called ",(0,i.jsx)(t.code,{children:"items"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["By this point, you should be in the ",(0,i.jsx)(t.code,{children:".minecraft/saves/(world-name)/datapacks/(datapack-name)/data/diet/tags/items"})," folder. That's it for the folder structure."]}),"\n",(0,i.jsx)(t.h3,{id:"creating-a-tag-file",children:"Creating a tag file"}),"\n",(0,i.jsxs)(t.p,{children:["Now create a new file here called ",(0,i.jsx)(t.code,{children:"(insert group name here).json"}),". If you're adding to a group called ",(0,i.jsx)(t.code,{children:"fruits"}),", we would name it ",(0,i.jsx)(t.code,{children:"fruits.json"}),". It's very important that the name matches the name of the group."]}),"\n",(0,i.jsx)(t.p,{children:"In this file, type this:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'{\n "replace": false,\n "values": []\n}\n'})}),"\n",(0,i.jsxs)(t.p,{children:["This is the basic structure for a tag file. ",(0,i.jsx)(t.code,{children:"replace"})," dictates whether you're just adding tags or completely overriding tags. I recommend leaving this at ",(0,i.jsx)(t.code,{children:"false"})," unless you know what you're doing. ",(0,i.jsx)(t.code,{children:"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 ",(0,i.jsx)(t.code,{children:'"examplemod:bacon"'}),":"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'{\n "replace": "false",\n "values": ["examplemod:bacon"]\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"You can put as many values as you want here, but they must all be comma separated inside the brackets. Like so:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'{\n "replace": "false",\n "values": ["examplemod:bacon", "examplemod:cheese"]\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"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."}),"\n",(0,i.jsxs)(t.p,{children:["If you want to ",(0,i.jsx)(t.strong,{children:"remove"})," items from a tag, Forge provides an additional ",(0,i.jsx)(t.code,{children:"remove"})," array for the json file:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'{\n "replace": "false",\n "values": ["examplemod:bacon", "examplemod:cheese"],\n "remove": ["examplemod:fish"]\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"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."}),"\n",(0,i.jsx)(t.p,{children:"And that's it! If you have any questions or need help troubleshooting, please feel free to contact the developer directly."})]})}function h(e={}){const{wrapper:t}={...(0,n.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},1151:(e,t,o)=>{o.d(t,{Z:()=>d,a:()=>s});var i=o(7294);const n={},a=i.createContext(n);function s(e){const t=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),i.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a54b83c5.bcae102a.js b/assets/js/a54b83c5.bcae102a.js new file mode 100644 index 0000000..79546d9 --- /dev/null +++ b/assets/js/a54b83c5.bcae102a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[4842],{7345:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>r,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>d,toc:()=>l});var i=o(5893),n=o(1151);const a={sidebar_position:3},s="Categorizing Food to Groups",d={id:"diet/food-classification",title:"Categorizing Food to Groups",description:"Food classification into groups is done through item tags.",source:"@site/docs/diet/food-classification.md",sourceDirName:"diet",slug:"/diet/food-classification",permalink:"/diet/food-classification",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/diet/food-classification.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Customizing Food Groups",permalink:"/diet/diet-groups"},next:{title:"Customizing Diet Suites",permalink:"/diet/diet-suites"}},r={},l=[{value:"Special Tags",id:"special-tags",level:2},{value:"diet:ingredients
",id:"dietingredients",level:3},{value:"diet:special_food
",id:"dietspecial_food",level:3},{value:"Guided Walkthrough",id:"guided-walkthrough",level:2},{value:"Creating a data pack",id:"creating-a-data-pack",level:3},{value:"Creating a tag file",id:"creating-a-tag-file",level:3}];function c(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,n.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"categorizing-food-to-groups",children:"Categorizing Food to Groups"}),"\n",(0,i.jsx)(t.p,{children:"Food classification into groups is done through item tags."}),"\n",(0,i.jsxs)(t.p,{children:["Please see the general overview of the tag system at ",(0,i.jsx)(t.a,{href:"https://minecraft.gamepedia.com/Tag",children:"the Minecraft wiki"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["The tags follow the format ",(0,i.jsx)(t.code,{children:"diet:[group name]"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"special-tags",children:"Special Tags"}),"\n",(0,i.jsx)(t.h3,{id:"dietingredients",children:(0,i.jsx)(t.code,{children:"diet:ingredients"})}),"\n",(0,i.jsx)(t.p,{children:"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."}),"\n",(0,i.jsx)(t.p,{children:"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."}),"\n",(0,i.jsx)(t.h3,{id:"dietspecial_food",children:(0,i.jsx)(t.code,{children:"diet:special_food"})}),"\n",(0,i.jsx)(t.p,{children:"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)."}),"\n",(0,i.jsx)(t.h2,{id:"guided-walkthrough",children:"Guided Walkthrough"}),"\n",(0,i.jsx)(t.h3,{id:"creating-a-data-pack",children:"Creating a data pack"}),"\n",(0,i.jsxs)(t.p,{children:["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 ",(0,i.jsx)(t.code,{children:".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 ",(0,i.jsx)(t.code,{children:".minecraft/saves/(world-name)/datapacks/(datapack-name)"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["Once you're inside, create a ",(0,i.jsx)(t.code,{children:"pack.mcmeta"})," file, named exactly like that. Open the file and fill it with this:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'{\n "pack": {\n "pack_format": 6,\n "description": "put a description here, or not"\n }\n}\n'})}),"\n",(0,i.jsxs)(t.p,{children:["Once you're done, save it. You should be back at the data pack's root folder at ",(0,i.jsx)(t.code,{children:".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 ",(0,i.jsx)(t.code,{children:"data"}),", then another folder in ",(0,i.jsx)(t.code,{children:"data"})," called ",(0,i.jsx)(t.code,{children:"diet"}),", then another folder in ",(0,i.jsx)(t.code,{children:"diet"})," called ",(0,i.jsx)(t.code,{children:"tags"}),", then another in ",(0,i.jsx)(t.code,{children:"tags"})," called ",(0,i.jsx)(t.code,{children:"items"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["By this point, you should be in the ",(0,i.jsx)(t.code,{children:".minecraft/saves/(world-name)/datapacks/(datapack-name)/data/diet/tags/items"})," folder. That's it for the folder structure."]}),"\n",(0,i.jsx)(t.h3,{id:"creating-a-tag-file",children:"Creating a tag file"}),"\n",(0,i.jsxs)(t.p,{children:["Now create a new file here called ",(0,i.jsx)(t.code,{children:"(insert group name here).json"}),". If you're adding to a group called ",(0,i.jsx)(t.code,{children:"fruits"}),", we would name it ",(0,i.jsx)(t.code,{children:"fruits.json"}),". It's very important that the name matches the name of the group."]}),"\n",(0,i.jsx)(t.p,{children:"In this file, type this:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'{\n "replace": false,\n "values": []\n}\n'})}),"\n",(0,i.jsxs)(t.p,{children:["This is the basic structure for a tag file. ",(0,i.jsx)(t.code,{children:"replace"})," dictates whether you're just adding tags or completely overriding tags. I recommend leaving this at ",(0,i.jsx)(t.code,{children:"false"})," unless you know what you're doing. ",(0,i.jsx)(t.code,{children:"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 ",(0,i.jsx)(t.code,{children:'"examplemod:bacon"'}),":"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'{\n "replace": "false",\n "values": ["examplemod:bacon"]\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"You can put as many values as you want here, but they must all be comma separated inside the brackets. Like so:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'{\n "replace": "false",\n "values": ["examplemod:bacon", "examplemod:cheese"]\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"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."}),"\n",(0,i.jsxs)(t.p,{children:["If you want to ",(0,i.jsx)(t.strong,{children:"remove"})," items from a tag, Forge provides an additional ",(0,i.jsx)(t.code,{children:"remove"})," array for the json file:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'{\n "replace": "false",\n "values": ["examplemod:bacon", "examplemod:cheese"],\n "remove": ["examplemod:fish"]\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"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."}),"\n",(0,i.jsx)(t.p,{children:"And that's it! If you have any questions or need help troubleshooting, please feel free to contact the developer directly."})]})}function h(e={}){const{wrapper:t}={...(0,n.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},1151:(e,t,o)=>{o.d(t,{Z:()=>d,a:()=>s});var i=o(7294);const n={},a=i.createContext(n);function s(e){const t=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),i.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a61686b6.3b96c0df.js b/assets/js/a61686b6.3b96c0df.js deleted file mode 100644 index 3be8b92..0000000 --- a/assets/js/a61686b6.3b96c0df.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[922],{3610:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>a,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>l,toc:()=>d});var n=s(5893),i=s(1151);const r={sidebar_position:3},o="Entity Slot Types",l={id:"curios/slots/entity-register",title:"Entity Slot Types",description:"A tutorial on how to add registered slot types to entities.",source:"@site/docs/curios/slots/entity-register.md",sourceDirName:"curios/slots",slug:"/curios/slots/entity-register",permalink:"/curios/slots/entity-register",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slots/entity-register.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Slot Types",permalink:"/curios/slots/slot-register"},next:{title:"Preset Slot Types",permalink:"/curios/slots/preset-slots"}},a={},d=[{value:"Overview",id:"overview",level:2},{value:"Directory",id:"directory",level:2},{value:"Syntax",id:"syntax",level:2},{value:"replace (boolean)",id:"replace-boolean",level:3},{value:"entities (string[])",id:"entities-string",level:3},{value:"slots (string[])",id:"slots-string",level:3},{value:"conditions (string[])",id:"conditions-string",level:3},{value:"Example",id:"example",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"entity-slot-types",children:"Entity Slot Types"}),"\n",(0,n.jsx)(t.p,{children:"A tutorial on how to add registered slot types to entities."}),"\n",(0,n.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsxs)(t.p,{children:["The recommended way to add a registered slot type to an entity is through a datapack. If you are unfamiliar with\ndatapacks, it is recommended to read through the ",(0,n.jsx)(t.a,{href:"https://minecraft.fandom.com/wiki/Data_pack",children:"wiki page"})," in order to\nunderstand the concept and structure before proceeding to the rest of this page."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"/curios/slots/slot-register",children:"Registered slot types"})," will all be available for use but will not appear in-game until they are\nadded to one or more entities."]}),"\n",(0,n.jsxs)(t.p,{children:["Alternatively, users can instead choose to use the ",(0,n.jsx)(t.a,{href:"../configuration#slot-configuration",children:"Curios configuration"})," to create\nand assign slot types to ",(0,n.jsx)(t.strong,{children:"players only"}),". There are fewer features than those offered in the datapack method, but some\nusers may find the process to be more straightforward."]}),"\n",(0,n.jsx)(t.h2,{id:"directory",children:"Directory"}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsxs)(t.p,{children:["The file should be a ",(0,n.jsx)(t.code,{children:".json"})," file located in the ",(0,n.jsx)(t.code,{children:"~/data/(namespace)/curios/entities/"})," folder of the datapack."]}),"\n",(0,n.jsxs)(t.admonition,{type:"note",children:[(0,n.jsx)(t.p,{children:"The file can be named anything."}),(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"(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."]})]}),"\n",(0,n.jsx)(t.h2,{id:"syntax",children:"Syntax"}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsxs)(t.p,{children:["The structure of the ",(0,n.jsx)(t.code,{children:".json"})," file for the entity configuration consists of a top-level JSON object that holds several\npotential fields."]}),"\n",(0,n.jsx)(t.p,{children:"All fields are optional unless otherwise noted."}),"\n",(0,n.jsxs)(t.h3,{id:"replace-boolean",children:[(0,n.jsx)(t.strong,{children:"replace"})," (boolean)"]}),"\n",(0,n.jsxs)(t.p,{children:["When ",(0,n.jsx)(t.code,{children:"true"}),", replaces data from lower-priority datapacks."]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"default:"})," ",(0,n.jsx)(t.code,{children:"false"})]}),"\n"]}),"\n",(0,n.jsxs)(t.h3,{id:"entities-string",children:[(0,n.jsx)(t.strong,{children:"entities"})," (string[])"]}),"\n",(0,n.jsx)(t.p,{children:"An array of registry names of entity types or entity type tags."}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"default:"})," ",(0,n.jsx)(t.code,{children:"[]"})]}),"\n"]}),"\n",(0,n.jsxs)(t.h3,{id:"slots-string",children:[(0,n.jsx)(t.strong,{children:"slots"})," (string[])"]}),"\n",(0,n.jsxs)(t.p,{children:["An array of ",(0,n.jsx)(t.code,{children:"identifier"})," names for registered slot types."]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"default:"})," ",(0,n.jsx)(t.code,{children:"[]"})]}),"\n"]}),"\n",(0,n.jsxs)(t.h3,{id:"conditions-string",children:[(0,n.jsx)(t.strong,{children:"conditions"})," (string[])"]}),"\n",(0,n.jsxs)(t.p,{children:["An array of ",(0,n.jsx)(t.code,{children:"ICondition"})," implementations that must all pass before these slots are loaded into these entities."]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"default:"})," ",(0,n.jsx)(t.code,{children:"[]"})]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"All the listed slots will be associated to all the listed entities."}),"\n",(0,n.jsx)(t.admonition,{type:"caution",children:(0,n.jsxs)(t.p,{children:["Adding multiple of the same ",(0,n.jsx)(t.code,{children:"identifier"})," to the ",(0,n.jsx)(t.code,{children:"slots"})," array will ",(0,n.jsx)(t.strong,{children:"not"})," add multiple slots. Each entry in the ",(0,n.jsx)(t.code,{children:"slots"}),"\narray represents a ",(0,n.jsx)(t.a,{href:"/curios/slots/slot-register",children:"registered slot type"})," and the entries do not stack, please refer to that page in\norder to change slot type behavior including default size."]})}),"\n",(0,n.jsx)(t.h2,{id:"example",children:"Example"}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-json",children:'{\n "entities": ["player", "minecraft:zombie"],\n "slots": ["head", "back"]\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["This configuration will give two slot types, ",(0,n.jsx)(t.code,{children:"head"})," and ",(0,n.jsx)(t.code,{children:"back"}),", to all players and all zombies."]})]})}function h(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1151:(e,t,s)=>{s.d(t,{Z:()=>l,a:()=>o});var n=s(7294);const i={},r=n.createContext(i);function o(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a61686b6.48b2e104.js b/assets/js/a61686b6.48b2e104.js new file mode 100644 index 0000000..6ec9e96 --- /dev/null +++ b/assets/js/a61686b6.48b2e104.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[2922],{3610:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>a,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>l,toc:()=>d});var n=s(5893),i=s(1151);const r={sidebar_position:3},o="Entity Slot Types",l={id:"curios/slots/entity-register",title:"Entity Slot Types",description:"A tutorial on how to add registered slot types to entities.",source:"@site/docs/curios/slots/entity-register.md",sourceDirName:"curios/slots",slug:"/curios/slots/entity-register",permalink:"/curios/slots/entity-register",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slots/entity-register.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Slot Types",permalink:"/curios/slots/slot-register"},next:{title:"Preset Slot Types",permalink:"/curios/slots/preset-slots"}},a={},d=[{value:"Overview",id:"overview",level:2},{value:"Directory",id:"directory",level:2},{value:"Syntax",id:"syntax",level:2},{value:"replace (boolean)",id:"replace-boolean",level:3},{value:"entities (string[])",id:"entities-string",level:3},{value:"slots (string[])",id:"slots-string",level:3},{value:"conditions (string[])",id:"conditions-string",level:3},{value:"Example",id:"example",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"entity-slot-types",children:"Entity Slot Types"}),"\n",(0,n.jsx)(t.p,{children:"A tutorial on how to add registered slot types to entities."}),"\n",(0,n.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsxs)(t.p,{children:["The recommended way to add a registered slot type to an entity is through a datapack. If you are unfamiliar with\ndatapacks, it is recommended to read through the ",(0,n.jsx)(t.a,{href:"https://minecraft.fandom.com/wiki/Data_pack",children:"wiki page"})," in order to\nunderstand the concept and structure before proceeding to the rest of this page."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"/curios/slots/slot-register",children:"Registered slot types"})," will all be available for use but will not appear in-game until they are\nadded to one or more entities."]}),"\n",(0,n.jsxs)(t.p,{children:["Alternatively, users can instead choose to use the ",(0,n.jsx)(t.a,{href:"../configuration#slot-configuration",children:"Curios configuration"})," to create\nand assign slot types to ",(0,n.jsx)(t.strong,{children:"players only"}),". There are fewer features than those offered in the datapack method, but some\nusers may find the process to be more straightforward."]}),"\n",(0,n.jsx)(t.h2,{id:"directory",children:"Directory"}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsxs)(t.p,{children:["The file should be a ",(0,n.jsx)(t.code,{children:".json"})," file located in the ",(0,n.jsx)(t.code,{children:"~/data/(namespace)/curios/entities/"})," folder of the datapack."]}),"\n",(0,n.jsxs)(t.admonition,{type:"note",children:[(0,n.jsx)(t.p,{children:"The file can be named anything."}),(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"(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."]})]}),"\n",(0,n.jsx)(t.h2,{id:"syntax",children:"Syntax"}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsxs)(t.p,{children:["The structure of the ",(0,n.jsx)(t.code,{children:".json"})," file for the entity configuration consists of a top-level JSON object that holds several\npotential fields."]}),"\n",(0,n.jsx)(t.p,{children:"All fields are optional unless otherwise noted."}),"\n",(0,n.jsxs)(t.h3,{id:"replace-boolean",children:[(0,n.jsx)(t.strong,{children:"replace"})," (boolean)"]}),"\n",(0,n.jsxs)(t.p,{children:["When ",(0,n.jsx)(t.code,{children:"true"}),", replaces data from lower-priority datapacks."]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"default:"})," ",(0,n.jsx)(t.code,{children:"false"})]}),"\n"]}),"\n",(0,n.jsxs)(t.h3,{id:"entities-string",children:[(0,n.jsx)(t.strong,{children:"entities"})," (string[])"]}),"\n",(0,n.jsx)(t.p,{children:"An array of registry names of entity types or entity type tags."}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"default:"})," ",(0,n.jsx)(t.code,{children:"[]"})]}),"\n"]}),"\n",(0,n.jsxs)(t.h3,{id:"slots-string",children:[(0,n.jsx)(t.strong,{children:"slots"})," (string[])"]}),"\n",(0,n.jsxs)(t.p,{children:["An array of ",(0,n.jsx)(t.code,{children:"identifier"})," names for registered slot types."]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"default:"})," ",(0,n.jsx)(t.code,{children:"[]"})]}),"\n"]}),"\n",(0,n.jsxs)(t.h3,{id:"conditions-string",children:[(0,n.jsx)(t.strong,{children:"conditions"})," (string[])"]}),"\n",(0,n.jsxs)(t.p,{children:["An array of ",(0,n.jsx)(t.code,{children:"ICondition"})," implementations that must all pass before these slots are loaded into these entities."]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"default:"})," ",(0,n.jsx)(t.code,{children:"[]"})]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"All the listed slots will be associated to all the listed entities."}),"\n",(0,n.jsx)(t.admonition,{type:"caution",children:(0,n.jsxs)(t.p,{children:["Adding multiple of the same ",(0,n.jsx)(t.code,{children:"identifier"})," to the ",(0,n.jsx)(t.code,{children:"slots"})," array will ",(0,n.jsx)(t.strong,{children:"not"})," add multiple slots. Each entry in the ",(0,n.jsx)(t.code,{children:"slots"}),"\narray represents a ",(0,n.jsx)(t.a,{href:"/curios/slots/slot-register",children:"registered slot type"})," and the entries do not stack, please refer to that page in\norder to change slot type behavior including default size."]})}),"\n",(0,n.jsx)(t.h2,{id:"example",children:"Example"}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-json",children:'{\n "entities": ["player", "minecraft:zombie"],\n "slots": ["head", "back"]\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["This configuration will give two slot types, ",(0,n.jsx)(t.code,{children:"head"})," and ",(0,n.jsx)(t.code,{children:"back"}),", to all players and all zombies."]})]})}function h(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1151:(e,t,s)=>{s.d(t,{Z:()=>l,a:()=>o});var n=s(7294);const i={},r=n.createContext(i);function o(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a7434565.67c709ab.js b/assets/js/a7434565.67c709ab.js new file mode 100644 index 0000000..42f9a41 --- /dev/null +++ b/assets/js/a7434565.67c709ab.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[7645],{5745:s=>{s.exports=JSON.parse('{"name":"docusaurus-plugin-content-pages","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/a7434565.82edb565.js b/assets/js/a7434565.82edb565.js deleted file mode 100644 index 507a8c7..0000000 --- a/assets/js/a7434565.82edb565.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[645],{5745:s=>{s.exports=JSON.parse('{"name":"docusaurus-plugin-content-pages","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/a7bd4aaa.84b976bc.js b/assets/js/a7bd4aaa.84b976bc.js deleted file mode 100644 index ffe157d..0000000 --- a/assets/js/a7bd4aaa.84b976bc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[518],{8564:(s,n,e)=>{e.r(n),e.d(n,{default:()=>d});e(7294);var o=e(1944),r=e(3320),i=e(4477),t=e(8790),l=e(197),c=e(5893);function u(s){const{version:n}=s;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l.Z,{version:n.version,tag:(0,r.os)(n.pluginId,n.version)}),(0,c.jsx)(o.d,{children:n.noIndex&&(0,c.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function a(s){const{version:n,route:e}=s;return(0,c.jsx)(o.FG,{className:n.className,children:(0,c.jsx)(i.q,{version:n,children:(0,t.H)(e.routes)})})}function d(s){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u,{...s}),(0,c.jsx)(a,{...s})]})}}}]); \ No newline at end of file diff --git a/assets/js/a7bd4aaa.e26124b7.js b/assets/js/a7bd4aaa.e26124b7.js new file mode 100644 index 0000000..cda5cb4 --- /dev/null +++ b/assets/js/a7bd4aaa.e26124b7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[8518],{8564:(s,n,e)=>{e.r(n),e.d(n,{default:()=>d});e(7294);var o=e(1944),r=e(3320),i=e(4477),t=e(8790),l=e(197),c=e(5893);function u(s){const{version:n}=s;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l.Z,{version:n.version,tag:(0,r.os)(n.pluginId,n.version)}),(0,c.jsx)(o.d,{children:n.noIndex&&(0,c.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function a(s){const{version:n,route:e}=s;return(0,c.jsx)(o.FG,{className:n.className,children:(0,c.jsx)(i.q,{version:n,children:(0,t.H)(e.routes)})})}function d(s){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u,{...s}),(0,c.jsx)(a,{...s})]})}}}]); \ No newline at end of file diff --git a/assets/js/a94703ab.7d1258e4.js b/assets/js/a94703ab.7d1258e4.js deleted file mode 100644 index b0b2548..0000000 --- a/assets/js/a94703ab.7d1258e4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[107],{2674:(e,t,n)=>{n.r(t),n.d(t,{default:()=>be});var a=n(7294),o=n(512),i=n(1944),s=n(5281),l=n(3438),r=n(1116),c=n(5999),d=n(2466),u=n(5936);const m={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};var b=n(5893);function h(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,o]=(0,a.useState)(!1),i=(0,a.useRef)(!1),{startScroll:s,cancelScroll:l}=(0,d.Ct)();return(0,d.RF)(((e,n)=>{let{scrollY:a}=e;const s=n?.scrollY;s&&(i.current?i.current=!1:a>=s?(l(),o(!1)):a{e.location.hash&&(i.current=!0,o(!1))})),{shown:n,scrollToTop:()=>s(0)}}({threshold:300});return(0,b.jsx)("button",{"aria-label":(0,c.I)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,o.Z)("clean-btn",s.k.common.backToTopButton,m.backToTopButton,e&&m.backToTopButtonShow),type:"button",onClick:t})}var p=n(1442),x=n(6550),f=n(7524),j=n(6668),k=n(1327);function _(e){return(0,b.jsx)("svg",{width:"20",height:"20","aria-hidden":"true",...e,children:(0,b.jsxs)("g",{fill:"#7a7a7a",children:[(0,b.jsx)("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),(0,b.jsx)("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})]})})}const v={collapseSidebarButton:"collapseSidebarButton_PEFL",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_kv0_"};function g(e){let{onClick:t}=e;return(0,b.jsx)("button",{type:"button",title:(0,c.I)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,c.I)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,o.Z)("button button--secondary button--outline",v.collapseSidebarButton),onClick:t,children:(0,b.jsx)(_,{className:v.collapseSidebarButtonIcon})})}var C=n(9689),S=n(902);const I=Symbol("EmptyContext"),N=a.createContext(I);function T(e){let{children:t}=e;const[n,o]=(0,a.useState)(null),i=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:o})),[n]);return(0,b.jsx)(N.Provider,{value:i,children:t})}var B=n(6043),Z=n(8596),A=n(9960),L=n(2389);function y(e){let{collapsed:t,categoryLabel:n,onClick:a}=e;return(0,b.jsx)("button",{"aria-label":t?(0,c.I)({id:"theme.DocSidebarItem.expandCategoryAriaLabel",message:"Expand sidebar category '{label}'",description:"The ARIA label to expand the sidebar category"},{label:n}):(0,c.I)({id:"theme.DocSidebarItem.collapseCategoryAriaLabel",message:"Collapse sidebar category '{label}'",description:"The ARIA label to collapse the sidebar category"},{label:n}),type:"button",className:"clean-btn menu__caret",onClick:a})}function w(e){let{item:t,onItemClick:n,activePath:i,level:r,index:c,...d}=e;const{items:u,label:m,collapsible:h,className:p,href:x}=t,{docs:{sidebar:{autoCollapseCategories:f}}}=(0,j.L)(),k=function(e){const t=(0,L.Z)();return(0,a.useMemo)((()=>e.href&&!e.linkUnlisted?e.href:!t&&e.collapsible?(0,l.LM)(e):void 0),[e,t])}(t),_=(0,l._F)(t,i),v=(0,Z.Mg)(x,i),{collapsed:g,setCollapsed:C}=(0,B.u)({initialState:()=>!!h&&(!_&&t.collapsed)}),{expandedItem:T,setExpandedItem:w}=function(){const e=(0,a.useContext)(N);if(e===I)throw new S.i6("DocSidebarItemsExpandedStateProvider");return e}(),E=function(e){void 0===e&&(e=!g),w(e?null:c),C(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:o}=e;const i=(0,S.D9)(t);(0,a.useEffect)((()=>{t&&!i&&n&&o(!1)}),[t,i,n,o])}({isActive:_,collapsed:g,updateCollapsed:E}),(0,a.useEffect)((()=>{h&&null!=T&&T!==c&&f&&C(!0)}),[h,T,c,C,f]),(0,b.jsxs)("li",{className:(0,o.Z)(s.k.docs.docSidebarItemCategory,s.k.docs.docSidebarItemCategoryLevel(r),"menu__list-item",{"menu__list-item--collapsed":g},p),children:[(0,b.jsxs)("div",{className:(0,o.Z)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":v}),children:[(0,b.jsx)(A.Z,{className:(0,o.Z)("menu__link",{"menu__link--sublist":h,"menu__link--sublist-caret":!x&&h,"menu__link--active":_}),onClick:h?e=>{n?.(t),x?E(!1):(e.preventDefault(),E())}:()=>{n?.(t)},"aria-current":v?"page":void 0,"aria-expanded":h?!g:void 0,href:h?k??"#":k,...d,children:m}),x&&h&&(0,b.jsx)(y,{collapsed:g,categoryLabel:m,onClick:e=>{e.preventDefault(),E()}})]}),(0,b.jsx)(B.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:g,children:(0,b.jsx)(V,{items:u,tabIndex:g?-1:0,onItemClick:n,activePath:i,level:r+1})})]})}var E=n(3919),H=n(9471);const M={menuExternalLink:"menuExternalLink_NmtK"};function R(e){let{item:t,onItemClick:n,activePath:a,level:i,index:r,...c}=e;const{href:d,label:u,className:m,autoAddBaseUrl:h}=t,p=(0,l._F)(t,a),x=(0,E.Z)(d);return(0,b.jsx)("li",{className:(0,o.Z)(s.k.docs.docSidebarItemLink,s.k.docs.docSidebarItemLinkLevel(i),"menu__list-item",m),children:(0,b.jsxs)(A.Z,{className:(0,o.Z)("menu__link",!x&&M.menuExternalLink,{"menu__link--active":p}),autoAddBaseUrl:h,"aria-current":p?"page":void 0,to:d,...x&&{onClick:n?()=>n(t):void 0},...c,children:[u,!x&&(0,b.jsx)(H.Z,{})]})},u)}const W={menuHtmlItem:"menuHtmlItem_M9Kj"};function F(e){let{item:t,level:n,index:a}=e;const{value:i,defaultStyle:l,className:r}=t;return(0,b.jsx)("li",{className:(0,o.Z)(s.k.docs.docSidebarItemLink,s.k.docs.docSidebarItemLinkLevel(n),l&&[W.menuHtmlItem,"menu__list-item"],r),dangerouslySetInnerHTML:{__html:i}},a)}function P(e){let{item:t,...n}=e;switch(t.type){case"category":return(0,b.jsx)(w,{item:t,...n});case"html":return(0,b.jsx)(F,{item:t,...n});default:return(0,b.jsx)(R,{item:t,...n})}}function D(e){let{items:t,...n}=e;const a=(0,l.f)(t,n.activePath);return(0,b.jsx)(T,{children:a.map(((e,t)=>(0,b.jsx)(P,{item:e,index:t,...n},t)))})}const V=(0,a.memo)(D),U={menu:"menu_SIkG",menuWithAnnouncementBar:"menuWithAnnouncementBar_GW3s"};function K(e){let{path:t,sidebar:n,className:i}=e;const l=function(){const{isActive:e}=(0,C.nT)(),[t,n]=(0,a.useState)(e);return(0,d.RF)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return(0,b.jsx)("nav",{"aria-label":(0,c.I)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,o.Z)("menu thin-scrollbar",U.menu,l&&U.menuWithAnnouncementBar,i),children:(0,b.jsx)("ul",{className:(0,o.Z)(s.k.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(V,{items:n,activePath:t,level:1})})})}const Y="sidebar_njMd",z="sidebarWithHideableNavbar_wUlq",G="sidebarHidden_VK0M",O="sidebarLogo_isFc";function q(e){let{path:t,sidebar:n,onCollapse:a,isHidden:i}=e;const{navbar:{hideOnScroll:s},docs:{sidebar:{hideable:l}}}=(0,j.L)();return(0,b.jsxs)("div",{className:(0,o.Z)(Y,s&&z,i&&G),children:[s&&(0,b.jsx)(k.Z,{tabIndex:-1,className:O}),(0,b.jsx)(K,{path:t,sidebar:n}),l&&(0,b.jsx)(g,{onClick:a})]})}const J=a.memo(q);var Q=n(3102),X=n(7747);const $=e=>{let{sidebar:t,path:n}=e;const a=(0,X.e)();return(0,b.jsx)("ul",{className:(0,o.Z)(s.k.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(V,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&a.toggle(),"link"===e.type&&a.toggle()},level:1})})};function ee(e){return(0,b.jsx)(Q.Zo,{component:$,props:e})}const te=a.memo(ee);function ne(e){const t=(0,f.i)(),n="desktop"===t||"ssr"===t,a="mobile"===t;return(0,b.jsxs)(b.Fragment,{children:[n&&(0,b.jsx)(J,{...e}),a&&(0,b.jsx)(te,{...e})]})}const ae={expandButton:"expandButton_TmdG",expandButtonIcon:"expandButtonIcon_i1dp"};function oe(e){let{toggleSidebar:t}=e;return(0,b.jsx)("div",{className:ae.expandButton,title:(0,c.I)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,c.I)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t,children:(0,b.jsx)(_,{className:ae.expandButtonIcon})})}const ie={docSidebarContainer:"docSidebarContainer_YfHR",docSidebarContainerHidden:"docSidebarContainerHidden_DPk8",sidebarViewport:"sidebarViewport_aRkj"};function se(e){let{children:t}=e;const n=(0,r.V)();return(0,b.jsx)(a.Fragment,{children:t},n?.name??"noSidebar")}function le(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:i}=e;const{pathname:l}=(0,x.TH)(),[r,c]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{r&&c(!1),!r&&(0,p.n)()&&c(!0),i((e=>!e))}),[i,r]);return(0,b.jsx)("aside",{className:(0,o.Z)(s.k.docs.docSidebarContainer,ie.docSidebarContainer,n&&ie.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(ie.docSidebarContainer)&&n&&c(!0)},children:(0,b.jsx)(se,{children:(0,b.jsxs)("div",{className:(0,o.Z)(ie.sidebarViewport,r&&ie.sidebarViewportHidden),children:[(0,b.jsx)(ne,{sidebar:t,path:l,onCollapse:d,isHidden:r}),r&&(0,b.jsx)(oe,{toggleSidebar:d})]})})})}const re={docMainContainer:"docMainContainer_TBSr",docMainContainerEnhanced:"docMainContainerEnhanced_lQrH",docItemWrapperEnhanced:"docItemWrapperEnhanced_JWYK"};function ce(e){let{hiddenSidebarContainer:t,children:n}=e;const a=(0,r.V)();return(0,b.jsx)("main",{className:(0,o.Z)(re.docMainContainer,(t||!a)&&re.docMainContainerEnhanced),children:(0,b.jsx)("div",{className:(0,o.Z)("container padding-top--md padding-bottom--lg",re.docItemWrapper,t&&re.docItemWrapperEnhanced),children:n})})}const de={docRoot:"docRoot_UBD9",docsWrapper:"docsWrapper_hBAB"};function ue(e){let{children:t}=e;const n=(0,r.V)(),[o,i]=(0,a.useState)(!1);return(0,b.jsxs)("div",{className:de.docsWrapper,children:[(0,b.jsx)(h,{}),(0,b.jsxs)("div",{className:de.docRoot,children:[n&&(0,b.jsx)(le,{sidebar:n.items,hiddenSidebarContainer:o,setHiddenSidebarContainer:i}),(0,b.jsx)(ce,{hiddenSidebarContainer:o,children:t})]})]})}var me=n(5658);function be(e){const t=(0,l.SN)(e);if(!t)return(0,b.jsx)(me.Z,{});const{docElement:n,sidebarName:a,sidebarItems:c}=t;return(0,b.jsx)(i.FG,{className:(0,o.Z)(s.k.page.docsDocPage),children:(0,b.jsx)(r.b,{name:a,items:c,children:(0,b.jsx)(ue,{children:n})})})}},5658:(e,t,n)=>{n.d(t,{Z:()=>l});n(7294);var a=n(512),o=n(5999),i=n(7955),s=n(5893);function l(e){let{className:t}=e;return(0,s.jsx)("main",{className:(0,a.Z)("container margin-vert--xl",t),children:(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,s.jsx)(i.Z,{as:"h1",className:"hero__title",children:(0,s.jsx)(o.Z,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"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/a94703ab.9b67bc0c.js b/assets/js/a94703ab.9b67bc0c.js new file mode 100644 index 0000000..288d6d8 --- /dev/null +++ b/assets/js/a94703ab.9b67bc0c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[4368],{2674:(e,t,n)=>{n.r(t),n.d(t,{default:()=>be});var a=n(7294),o=n(512),i=n(1944),s=n(5281),l=n(3438),r=n(1116),c=n(5999),d=n(2466),u=n(5936);const m={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};var b=n(5893);function h(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,o]=(0,a.useState)(!1),i=(0,a.useRef)(!1),{startScroll:s,cancelScroll:l}=(0,d.Ct)();return(0,d.RF)(((e,n)=>{let{scrollY:a}=e;const s=n?.scrollY;s&&(i.current?i.current=!1:a>=s?(l(),o(!1)):a {e.location.hash&&(i.current=!0,o(!1))})),{shown:n,scrollToTop:()=>s(0)}}({threshold:300});return(0,b.jsx)("button",{"aria-label":(0,c.I)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,o.Z)("clean-btn",s.k.common.backToTopButton,m.backToTopButton,e&&m.backToTopButtonShow),type:"button",onClick:t})}var p=n(1442),x=n(6550),f=n(7524),j=n(6668),k=n(1327);function _(e){return(0,b.jsx)("svg",{width:"20",height:"20","aria-hidden":"true",...e,children:(0,b.jsxs)("g",{fill:"#7a7a7a",children:[(0,b.jsx)("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),(0,b.jsx)("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})]})})}const v={collapseSidebarButton:"collapseSidebarButton_PEFL",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_kv0_"};function g(e){let{onClick:t}=e;return(0,b.jsx)("button",{type:"button",title:(0,c.I)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,c.I)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,o.Z)("button button--secondary button--outline",v.collapseSidebarButton),onClick:t,children:(0,b.jsx)(_,{className:v.collapseSidebarButtonIcon})})}var C=n(9689),S=n(902);const I=Symbol("EmptyContext"),N=a.createContext(I);function T(e){let{children:t}=e;const[n,o]=(0,a.useState)(null),i=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:o})),[n]);return(0,b.jsx)(N.Provider,{value:i,children:t})}var B=n(6043),Z=n(8596),A=n(9960),L=n(2389);function y(e){let{collapsed:t,categoryLabel:n,onClick:a}=e;return(0,b.jsx)("button",{"aria-label":t?(0,c.I)({id:"theme.DocSidebarItem.expandCategoryAriaLabel",message:"Expand sidebar category '{label}'",description:"The ARIA label to expand the sidebar category"},{label:n}):(0,c.I)({id:"theme.DocSidebarItem.collapseCategoryAriaLabel",message:"Collapse sidebar category '{label}'",description:"The ARIA label to collapse the sidebar category"},{label:n}),type:"button",className:"clean-btn menu__caret",onClick:a})}function w(e){let{item:t,onItemClick:n,activePath:i,level:r,index:c,...d}=e;const{items:u,label:m,collapsible:h,className:p,href:x}=t,{docs:{sidebar:{autoCollapseCategories:f}}}=(0,j.L)(),k=function(e){const t=(0,L.Z)();return(0,a.useMemo)((()=>e.href&&!e.linkUnlisted?e.href:!t&&e.collapsible?(0,l.LM)(e):void 0),[e,t])}(t),_=(0,l._F)(t,i),v=(0,Z.Mg)(x,i),{collapsed:g,setCollapsed:C}=(0,B.u)({initialState:()=>!!h&&(!_&&t.collapsed)}),{expandedItem:T,setExpandedItem:w}=function(){const e=(0,a.useContext)(N);if(e===I)throw new S.i6("DocSidebarItemsExpandedStateProvider");return e}(),E=function(e){void 0===e&&(e=!g),w(e?null:c),C(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:o}=e;const i=(0,S.D9)(t);(0,a.useEffect)((()=>{t&&!i&&n&&o(!1)}),[t,i,n,o])}({isActive:_,collapsed:g,updateCollapsed:E}),(0,a.useEffect)((()=>{h&&null!=T&&T!==c&&f&&C(!0)}),[h,T,c,C,f]),(0,b.jsxs)("li",{className:(0,o.Z)(s.k.docs.docSidebarItemCategory,s.k.docs.docSidebarItemCategoryLevel(r),"menu__list-item",{"menu__list-item--collapsed":g},p),children:[(0,b.jsxs)("div",{className:(0,o.Z)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":v}),children:[(0,b.jsx)(A.Z,{className:(0,o.Z)("menu__link",{"menu__link--sublist":h,"menu__link--sublist-caret":!x&&h,"menu__link--active":_}),onClick:h?e=>{n?.(t),x?E(!1):(e.preventDefault(),E())}:()=>{n?.(t)},"aria-current":v?"page":void 0,"aria-expanded":h?!g:void 0,href:h?k??"#":k,...d,children:m}),x&&h&&(0,b.jsx)(y,{collapsed:g,categoryLabel:m,onClick:e=>{e.preventDefault(),E()}})]}),(0,b.jsx)(B.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:g,children:(0,b.jsx)(V,{items:u,tabIndex:g?-1:0,onItemClick:n,activePath:i,level:r+1})})]})}var E=n(3919),H=n(9471);const M={menuExternalLink:"menuExternalLink_NmtK"};function R(e){let{item:t,onItemClick:n,activePath:a,level:i,index:r,...c}=e;const{href:d,label:u,className:m,autoAddBaseUrl:h}=t,p=(0,l._F)(t,a),x=(0,E.Z)(d);return(0,b.jsx)("li",{className:(0,o.Z)(s.k.docs.docSidebarItemLink,s.k.docs.docSidebarItemLinkLevel(i),"menu__list-item",m),children:(0,b.jsxs)(A.Z,{className:(0,o.Z)("menu__link",!x&&M.menuExternalLink,{"menu__link--active":p}),autoAddBaseUrl:h,"aria-current":p?"page":void 0,to:d,...x&&{onClick:n?()=>n(t):void 0},...c,children:[u,!x&&(0,b.jsx)(H.Z,{})]})},u)}const W={menuHtmlItem:"menuHtmlItem_M9Kj"};function F(e){let{item:t,level:n,index:a}=e;const{value:i,defaultStyle:l,className:r}=t;return(0,b.jsx)("li",{className:(0,o.Z)(s.k.docs.docSidebarItemLink,s.k.docs.docSidebarItemLinkLevel(n),l&&[W.menuHtmlItem,"menu__list-item"],r),dangerouslySetInnerHTML:{__html:i}},a)}function P(e){let{item:t,...n}=e;switch(t.type){case"category":return(0,b.jsx)(w,{item:t,...n});case"html":return(0,b.jsx)(F,{item:t,...n});default:return(0,b.jsx)(R,{item:t,...n})}}function D(e){let{items:t,...n}=e;const a=(0,l.f)(t,n.activePath);return(0,b.jsx)(T,{children:a.map(((e,t)=>(0,b.jsx)(P,{item:e,index:t,...n},t)))})}const V=(0,a.memo)(D),U={menu:"menu_SIkG",menuWithAnnouncementBar:"menuWithAnnouncementBar_GW3s"};function K(e){let{path:t,sidebar:n,className:i}=e;const l=function(){const{isActive:e}=(0,C.nT)(),[t,n]=(0,a.useState)(e);return(0,d.RF)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return(0,b.jsx)("nav",{"aria-label":(0,c.I)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,o.Z)("menu thin-scrollbar",U.menu,l&&U.menuWithAnnouncementBar,i),children:(0,b.jsx)("ul",{className:(0,o.Z)(s.k.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(V,{items:n,activePath:t,level:1})})})}const Y="sidebar_njMd",z="sidebarWithHideableNavbar_wUlq",G="sidebarHidden_VK0M",O="sidebarLogo_isFc";function q(e){let{path:t,sidebar:n,onCollapse:a,isHidden:i}=e;const{navbar:{hideOnScroll:s},docs:{sidebar:{hideable:l}}}=(0,j.L)();return(0,b.jsxs)("div",{className:(0,o.Z)(Y,s&&z,i&&G),children:[s&&(0,b.jsx)(k.Z,{tabIndex:-1,className:O}),(0,b.jsx)(K,{path:t,sidebar:n}),l&&(0,b.jsx)(g,{onClick:a})]})}const J=a.memo(q);var Q=n(3102),X=n(7747);const $=e=>{let{sidebar:t,path:n}=e;const a=(0,X.e)();return(0,b.jsx)("ul",{className:(0,o.Z)(s.k.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(V,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&a.toggle(),"link"===e.type&&a.toggle()},level:1})})};function ee(e){return(0,b.jsx)(Q.Zo,{component:$,props:e})}const te=a.memo(ee);function ne(e){const t=(0,f.i)(),n="desktop"===t||"ssr"===t,a="mobile"===t;return(0,b.jsxs)(b.Fragment,{children:[n&&(0,b.jsx)(J,{...e}),a&&(0,b.jsx)(te,{...e})]})}const ae={expandButton:"expandButton_TmdG",expandButtonIcon:"expandButtonIcon_i1dp"};function oe(e){let{toggleSidebar:t}=e;return(0,b.jsx)("div",{className:ae.expandButton,title:(0,c.I)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,c.I)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t,children:(0,b.jsx)(_,{className:ae.expandButtonIcon})})}const ie={docSidebarContainer:"docSidebarContainer_YfHR",docSidebarContainerHidden:"docSidebarContainerHidden_DPk8",sidebarViewport:"sidebarViewport_aRkj"};function se(e){let{children:t}=e;const n=(0,r.V)();return(0,b.jsx)(a.Fragment,{children:t},n?.name??"noSidebar")}function le(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:i}=e;const{pathname:l}=(0,x.TH)(),[r,c]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{r&&c(!1),!r&&(0,p.n)()&&c(!0),i((e=>!e))}),[i,r]);return(0,b.jsx)("aside",{className:(0,o.Z)(s.k.docs.docSidebarContainer,ie.docSidebarContainer,n&&ie.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(ie.docSidebarContainer)&&n&&c(!0)},children:(0,b.jsx)(se,{children:(0,b.jsxs)("div",{className:(0,o.Z)(ie.sidebarViewport,r&&ie.sidebarViewportHidden),children:[(0,b.jsx)(ne,{sidebar:t,path:l,onCollapse:d,isHidden:r}),r&&(0,b.jsx)(oe,{toggleSidebar:d})]})})})}const re={docMainContainer:"docMainContainer_TBSr",docMainContainerEnhanced:"docMainContainerEnhanced_lQrH",docItemWrapperEnhanced:"docItemWrapperEnhanced_JWYK"};function ce(e){let{hiddenSidebarContainer:t,children:n}=e;const a=(0,r.V)();return(0,b.jsx)("main",{className:(0,o.Z)(re.docMainContainer,(t||!a)&&re.docMainContainerEnhanced),children:(0,b.jsx)("div",{className:(0,o.Z)("container padding-top--md padding-bottom--lg",re.docItemWrapper,t&&re.docItemWrapperEnhanced),children:n})})}const de={docRoot:"docRoot_UBD9",docsWrapper:"docsWrapper_hBAB"};function ue(e){let{children:t}=e;const n=(0,r.V)(),[o,i]=(0,a.useState)(!1);return(0,b.jsxs)("div",{className:de.docsWrapper,children:[(0,b.jsx)(h,{}),(0,b.jsxs)("div",{className:de.docRoot,children:[n&&(0,b.jsx)(le,{sidebar:n.items,hiddenSidebarContainer:o,setHiddenSidebarContainer:i}),(0,b.jsx)(ce,{hiddenSidebarContainer:o,children:t})]})]})}var me=n(5658);function be(e){const t=(0,l.SN)(e);if(!t)return(0,b.jsx)(me.Z,{});const{docElement:n,sidebarName:a,sidebarItems:c}=t;return(0,b.jsx)(i.FG,{className:(0,o.Z)(s.k.page.docsDocPage),children:(0,b.jsx)(r.b,{name:a,items:c,children:(0,b.jsx)(ue,{children:n})})})}},5658:(e,t,n)=>{n.d(t,{Z:()=>l});n(7294);var a=n(512),o=n(5999),i=n(7955),s=n(5893);function l(e){let{className:t}=e;return(0,s.jsx)("main",{className:(0,a.Z)("container margin-vert--xl",t),children:(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,s.jsx)(i.Z,{as:"h1",className:"hero__title",children:(0,s.jsx)(o.Z,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"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/ab811e82.55384db2.js b/assets/js/ab811e82.55384db2.js deleted file mode 100644 index a2c6b34..0000000 --- a/assets/js/ab811e82.55384db2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[564],{7339:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var s=i(5893),t=i(1151);const a={sidebar_position:2},r="Scaling Health",o={id:"champions/integration/scalinghealth",title:"Scaling Health",description:"Champions supports increasing champion spawn chances when using the Scaling Health mod.",source:"@site/versioned_docs/version-1.18.x/champions/integration/scalinghealth.md",sourceDirName:"champions/integration",slug:"/champions/integration/scalinghealth",permalink:"/1.18.x/champions/integration/scalinghealth",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/versioned_docs/version-1.18.x/champions/integration/scalinghealth.md",tags:[],version:"1.18.x",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Game Stages",permalink:"/1.18.x/champions/integration/gamestages"}},c={},l=[{value:"Spawn Modifiers",id:"spawn-modifiers",level:2},{value:"Syntax",id:"syntax",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Examples",id:"examples",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"scaling-health",children:"Scaling Health"}),"\n",(0,s.jsxs)(n.p,{children:["Champions supports increasing champion spawn chances when using the ",(0,s.jsx)(n.a,{href:"https://github.com/SilentChaos512/ScalingHealth",children:"Scaling Health"})," mod."]}),"\n",(0,s.jsx)(n.p,{children:"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."}),"\n",(0,s.jsx)(n.h2,{id:"spawn-modifiers",children:"Spawn Modifiers"}),"\n",(0,s.jsxs)(n.p,{children:["Scaling Health spawn modifiers can be modified through the ",(0,s.jsx)(n.code,{children:"champions-server.toml"})," configuration file located in the ",(0,s.jsx)(n.code,{children:"world"})," folder's or the ",(0,s.jsx)(n.code,{children:"saves/ "})," folder's ",(0,s.jsx)(n.code,{children:"serverconfig"})," folder."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:"#Scaling Health\n#List of tiers with numbers to multiply spawn rates by difficulty\n#Format: [tier];[percent increase]\nscalingHealthSpawnModifiers = []\n"})}),"\n",(0,s.jsx)(n.h3,{id:"syntax",children:"Syntax"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.code,{children:"tier;modifier"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"modifier"})," will be multiplied by the difficulty rating from Scaling Health and then added directly to the spawn chance for the ",(0,s.jsx)(n.code,{children:"tier"})," as defined by the ",(0,s.jsx)(n.code,{children:"champions-ranks.toml"})," configuration file."]}),"\n",(0,s.jsx)(n.h3,{id:"arguments",children:"Arguments"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"tier"}),": ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#int",children:"int"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Specifies the champion tier of the entity."}),"\n",(0,s.jsxs)(n.li,{children:["Must be a valid tier from a rank as specified in the ",(0,s.jsx)(n.code,{children:"champions-rank.toml"})," configuration file."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"modifier"}),": ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#float",children:"float"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Specifies modifier for the spawn chance increase."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"examples",children:"Examples"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'scalingHealthSpawnModifiers = ["1;0.005"]\n'})}),"\n",(0,s.jsxs)(n.p,{children:["If the difficulty rating from Scaling Health is ",(0,s.jsx)(n.strong,{children:"100"})," and the default spawn chance for a tier 1 champion is ",(0,s.jsx)(n.strong,{children:"0.2"})," (or 20%), then the final spawn chance is ",(0,s.jsx)(n.strong,{children:"0.7"})," (or 70%):"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"(difficulty * modifier) + chance = result\n(100 * 0.005) + 0.2 = 0.7\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(n.p,{children:"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."})})]})}function d(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>o,a:()=>r});var s=i(7294);const t={},a=s.createContext(t);function r(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ab811e82.88fa5aff.js b/assets/js/ab811e82.88fa5aff.js new file mode 100644 index 0000000..7c20c25 --- /dev/null +++ b/assets/js/ab811e82.88fa5aff.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[2564],{7339:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var s=i(5893),t=i(1151);const a={sidebar_position:2},r="Scaling Health",o={id:"champions/integration/scalinghealth",title:"Scaling Health",description:"Champions supports increasing champion spawn chances when using the Scaling Health mod.",source:"@site/versioned_docs/version-1.18.x/champions/integration/scalinghealth.md",sourceDirName:"champions/integration",slug:"/champions/integration/scalinghealth",permalink:"/1.18.x/champions/integration/scalinghealth",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/versioned_docs/version-1.18.x/champions/integration/scalinghealth.md",tags:[],version:"1.18.x",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Game Stages",permalink:"/1.18.x/champions/integration/gamestages"}},c={},l=[{value:"Spawn Modifiers",id:"spawn-modifiers",level:2},{value:"Syntax",id:"syntax",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Examples",id:"examples",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"scaling-health",children:"Scaling Health"}),"\n",(0,s.jsxs)(n.p,{children:["Champions supports increasing champion spawn chances when using the ",(0,s.jsx)(n.a,{href:"https://github.com/SilentChaos512/ScalingHealth",children:"Scaling Health"})," mod."]}),"\n",(0,s.jsx)(n.p,{children:"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."}),"\n",(0,s.jsx)(n.h2,{id:"spawn-modifiers",children:"Spawn Modifiers"}),"\n",(0,s.jsxs)(n.p,{children:["Scaling Health spawn modifiers can be modified through the ",(0,s.jsx)(n.code,{children:"champions-server.toml"})," configuration file located in the ",(0,s.jsx)(n.code,{children:"world"})," folder's or the ",(0,s.jsx)(n.code,{children:"saves/ "})," folder's ",(0,s.jsx)(n.code,{children:"serverconfig"})," folder."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:"#Scaling Health\n#List of tiers with numbers to multiply spawn rates by difficulty\n#Format: [tier];[percent increase]\nscalingHealthSpawnModifiers = []\n"})}),"\n",(0,s.jsx)(n.h3,{id:"syntax",children:"Syntax"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.code,{children:"tier;modifier"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"modifier"})," will be multiplied by the difficulty rating from Scaling Health and then added directly to the spawn chance for the ",(0,s.jsx)(n.code,{children:"tier"})," as defined by the ",(0,s.jsx)(n.code,{children:"champions-ranks.toml"})," configuration file."]}),"\n",(0,s.jsx)(n.h3,{id:"arguments",children:"Arguments"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"tier"}),": ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#int",children:"int"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Specifies the champion tier of the entity."}),"\n",(0,s.jsxs)(n.li,{children:["Must be a valid tier from a rank as specified in the ",(0,s.jsx)(n.code,{children:"champions-rank.toml"})," configuration file."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"modifier"}),": ",(0,s.jsx)(n.a,{href:"https://minecraft.fandom.com/wiki/Argument_types#float",children:"float"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Specifies modifier for the spawn chance increase."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"examples",children:"Examples"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'scalingHealthSpawnModifiers = ["1;0.005"]\n'})}),"\n",(0,s.jsxs)(n.p,{children:["If the difficulty rating from Scaling Health is ",(0,s.jsx)(n.strong,{children:"100"})," and the default spawn chance for a tier 1 champion is ",(0,s.jsx)(n.strong,{children:"0.2"})," (or 20%), then the final spawn chance is ",(0,s.jsx)(n.strong,{children:"0.7"})," (or 70%):"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"(difficulty * modifier) + chance = result\n(100 * 0.005) + 0.2 = 0.7\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(n.p,{children:"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."})})]})}function d(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>o,a:()=>r});var s=i(7294);const t={},a=s.createContext(t);function r(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bd58d19a.9540be89.js b/assets/js/bd58d19a.9540be89.js new file mode 100644 index 0000000..b63fde7 --- /dev/null +++ b/assets/js/bd58d19a.9540be89.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[408],{5077:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>r,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var t=i(5893),d=i(1151);const o={sidebar_position:10},a="Example Datapack",s={id:"diet/datapack-example",title:"Example Datapack",description:"An example datapack for configuring various diet mechanics, including adding a new food group and adding food to that",source:"@site/docs/diet/datapack-example.md",sourceDirName:"diet",slug:"/diet/datapack-example",permalink:"/diet/datapack-example",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/diet/datapack-example.md",tags:[],version:"current",sidebarPosition:10,frontMatter:{sidebar_position:10},sidebar:"tutorialSidebar",previous:{title:"Customizing Diet Suites",permalink:"/diet/diet-suites"},next:{title:"Vein Mining",permalink:"/category/vein-mining"}},r={},l=[{value:"Getting Started",id:"getting-started",level:2},{value:"New Food Group",id:"new-food-group",level:2},{value:"Adding the New Food Group to a Suite",id:"adding-the-new-food-group-to-a-suite",level:2},{value:"Adding an Item to a Food Group",id:"adding-an-item-to-a-food-group",level:2},{value:"Activating the Datapack",id:"activating-the-datapack",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,d.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"example-datapack",children:"Example Datapack"}),"\n",(0,t.jsx)(n.p,{children:"An example datapack for configuring various diet mechanics, including adding a new food group and adding food to that\nnew food group."}),"\n",(0,t.jsx)(n.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,t.jsxs)(n.p,{children:["First, download the ",(0,t.jsx)(n.a,{target:"_blank",href:i(6955).Z+"",children:"example datapack"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Unzip the file and there will be the following folder structure:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"|data\n--|diet\n --|tags\n --|items\n --|test_group.json\n--|diet_example\n --|diet\n --|groups\n --|test_group.json\n --|suites\n --|builtin.json\n|pack.mcmeta\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:".mcmeta"})," file and ",(0,t.jsx)(n.code,{children:".json"})," files can be opened and edited in any text editor, such as Notepad."]}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsx)(n.p,{children:(0,t.jsxs)(n.strong,{children:["Why are there two folders for ",(0,t.jsx)(n.em,{children:"diet"})," and ",(0,t.jsx)(n.em,{children:"diet_example"}),"?"]})}),(0,t.jsxs)(n.p,{children:["The namespace used for this datapack is ",(0,t.jsx)(n.code,{children:"diet_example"}),". The ",(0,t.jsx)(n.code,{children:"diet_example"})," folder has a sub-folder called ",(0,t.jsx)(n.code,{children:"diet"})," which\nhouses the ",(0,t.jsx)(n.code,{children:"groups"})," and ",(0,t.jsx)(n.code,{children:"suites"})," folder. This is the custom data that is specifically for the Diet mod. On the other\nhand, the ",(0,t.jsx)(n.code,{children:"diet"})," folder that houses the ",(0,t.jsx)(n.code,{children:"tags"})," folder is using the name as a separate namespace for the purposes of\nadding item tags, which are read by vanilla."]})]}),"\n",(0,t.jsx)(n.h2,{id:"new-food-group",children:"New Food Group"}),"\n",(0,t.jsxs)(n.p,{children:["Adding a new food group is controlled by the ",(0,t.jsx)(n.code,{children:"data/diet_example/diet/groups/test_group.json"})," file:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "icon": "minecraft:diamond",\n "color": "#ffffff",\n "order": 5,\n "default_value": 0.25,\n "gain_multiplier": 2.0,\n "decay_multiplier": 0.5,\n "beneficial": true\n}\n'})}),"\n",(0,t.jsx)(n.p,{children:"The file and file name specifies these properties for the food group:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["The identifier for the food group is ",(0,t.jsx)(n.code,{children:"test_group"}),", as denoted by the file name"]}),"\n",(0,t.jsxs)(n.li,{children:["The icon is the one for the ",(0,t.jsx)(n.code,{children:"minecraft:diamond"})," item"]}),"\n",(0,t.jsxs)(n.li,{children:["The color associated with the food group is ",(0,t.jsx)(n.code,{children:"#ffffff"}),", or white"]}),"\n",(0,t.jsxs)(n.li,{children:["The order is ",(0,t.jsx)(n.code,{children:"5"}),", denoting where it is placed on the Diet GUI"]}),"\n",(0,t.jsxs)(n.li,{children:["The default value is ",(0,t.jsx)(n.code,{children:"0.25"}),", or 25%"]}),"\n",(0,t.jsxs)(n.li,{children:["The gain multiplier is ",(0,t.jsx)(n.code,{children:"2.0"}),", doubling the percentages on all gains for the food group"]}),"\n",(0,t.jsxs)(n.li,{children:["The decay multiplier is ",(0,t.jsx)(n.code,{children:"0.5"}),", halving the rate of decay for the food group"]}),"\n",(0,t.jsxs)(n.li,{children:["The food group is ",(0,t.jsx)(n.code,{children:"beneficial"}),", which will render as green in tooltips"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["For more information on the fields and customization of food groups, please refer to ",(0,t.jsx)(n.a,{href:"/diet/diet-groups",children:"the food groups page"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"adding-the-new-food-group-to-a-suite",children:"Adding the New Food Group to a Suite"}),"\n",(0,t.jsxs)(n.p,{children:["Just creating the food group isn't enough, as now it has to be added to a diet suite in order to appear anywhere. The\nmost relevant diet suite will be the default one, named ",(0,t.jsx)(n.code,{children:"builtin"}),", which is configured by the ",(0,t.jsx)(n.code,{children:"data/diet_example/diet/suites/builtin.json"})," file:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "replace": false,\n "groups": [\n "test_group"\n ],\n "effects": [\n {\n "status_effects": [\n {\n "name": "minecraft:regeneration",\n "power": 3\n }\n ],\n "conditions": [\n {\n "groups": ["test_group"],\n "match": "all",\n "above": 0.8,\n "below": 1.0\n }\n ]\n }\n ]\n}\n'})}),"\n",(0,t.jsx)(n.p,{children:"The file and file name specifies these properties for the diet suite:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["The identifier for the diet suite is ",(0,t.jsx)(n.code,{children:"builtin"}),", as denoted by the file name. This is the same identifier as the default\none, so this file's purpose is to edit or override any previously stated values."]}),"\n",(0,t.jsxs)(n.li,{children:["These values are adding, not replacing, its contents since ",(0,t.jsx)(n.code,{children:"replace"})," is ",(0,t.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["The groups to add are just ",(0,t.jsx)(n.code,{children:"test_group"})]}),"\n",(0,t.jsxs)(n.li,{children:["The effect added is a ",(0,t.jsx)(n.code,{children:"minecraft:regeneration"})," status effect when ",(0,t.jsx)(n.code,{children:"test_group"})," is above ",(0,t.jsx)(n.code,{children:"0.8"}),", or 80%"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["For more information on the fields and customization of diet suites, please refer to ",(0,t.jsx)(n.a,{href:"/diet/diet-suites",children:"the diet suites page"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"adding-an-item-to-a-food-group",children:"Adding an Item to a Food Group"}),"\n",(0,t.jsxs)(n.p,{children:["Items are added to food groups by adding them to the relevant item tag. In the example datapack, the food group is ",(0,t.jsx)(n.code,{children:"test_group"}),"\nso an item tag for ",(0,t.jsx)(n.code,{children:"diet:test_group"})," is created at ",(0,t.jsx)(n.code,{children:"data/diet/tags/items/test_group.json"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "replace": false,\n "values": [\n "minecraft:apple"\n ]\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["The file name is the same as the identifier for the food group and will be the name of the tag that is created. By\nsetting ",(0,t.jsx)(n.code,{children:"replace"})," to ",(0,t.jsx)(n.code,{children:"false"}),", the values are added to the tag instead of replacing them. Listing ",(0,t.jsx)(n.code,{children:"minecraft:apple"})," in\nthe ",(0,t.jsx)(n.code,{children:"values"})," array will add the apple item to the tag and consequently to the ",(0,t.jsx)(n.code,{children:"test_group"})," food group."]}),"\n",(0,t.jsxs)(n.p,{children:["For more information on tags and item tags, please refer to the ",(0,t.jsx)(n.a,{href:"https://minecraft.wiki/w/Tag",children:"page on the Minecraft wiki"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"activating-the-datapack",children:"Activating the Datapack"}),"\n",(0,t.jsxs)(n.p,{children:["Datapacks are created on a per-world basis and need to be placed in the ",(0,t.jsx)(n.code,{children:"datapacks"})," folder of the ",(0,t.jsx)(n.code,{children:"world"})," folder on a\ndedicated server or the ",(0,t.jsx)(n.code,{children:"saves/(World Name)"})," folder in single player. They should automatically be enabled upon loading\nthe datapack for the first time in the world."]})]})}function h(e={}){const{wrapper:n}={...(0,d.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},6955:(e,n,i)=>{i.d(n,{Z:()=>t});const t=i.p+"assets/files/diet_example-d150912a73450e80c0d2527087199ec4.zip"},1151:(e,n,i)=>{i.d(n,{Z:()=>s,a:()=>a});var t=i(7294);const d={},o=t.createContext(d);function a(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:a(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bd58d19a.9c6138f1.js b/assets/js/bd58d19a.9c6138f1.js deleted file mode 100644 index feb11a6..0000000 --- a/assets/js/bd58d19a.9c6138f1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[408],{5077:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>r,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var i=t(5893),d=t(1151);const o={sidebar_position:10},a="Example Datapack",s={id:"diet/datapack-example",title:"Example Datapack",description:"An example datapack for configuring various diet mechanics, including adding a new food group and adding food to that",source:"@site/docs/diet/datapack-example.md",sourceDirName:"diet",slug:"/diet/datapack-example",permalink:"/diet/datapack-example",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/diet/datapack-example.md",tags:[],version:"current",sidebarPosition:10,frontMatter:{sidebar_position:10},sidebar:"tutorialSidebar",previous:{title:"Customizing Diet Suites",permalink:"/diet/diet-suites"}},r={},l=[{value:"Getting Started",id:"getting-started",level:2},{value:"New Food Group",id:"new-food-group",level:2},{value:"Adding the New Food Group to a Suite",id:"adding-the-new-food-group-to-a-suite",level:2},{value:"Adding an Item to a Food Group",id:"adding-an-item-to-a-food-group",level:2},{value:"Activating the Datapack",id:"activating-the-datapack",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,d.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"example-datapack",children:"Example Datapack"}),"\n",(0,i.jsx)(n.p,{children:"An example datapack for configuring various diet mechanics, including adding a new food group and adding food to that\nnew food group."}),"\n",(0,i.jsx)(n.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,i.jsxs)(n.p,{children:["First, download the ",(0,i.jsx)(n.a,{target:"_blank",href:t(6955).Z+"",children:"example datapack"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"Unzip the file and there will be the following folder structure:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"|data\n--|diet\n --|tags\n --|items\n --|test_group.json\n--|diet_example\n --|diet\n --|groups\n --|test_group.json\n --|suites\n --|builtin.json\n|pack.mcmeta\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:".mcmeta"})," file and ",(0,i.jsx)(n.code,{children:".json"})," files can be opened and edited in any text editor, such as Notepad."]}),"\n",(0,i.jsxs)(n.admonition,{type:"note",children:[(0,i.jsx)(n.p,{children:(0,i.jsxs)(n.strong,{children:["Why are there two folders for ",(0,i.jsx)(n.em,{children:"diet"})," and ",(0,i.jsx)(n.em,{children:"diet_example"}),"?"]})}),(0,i.jsxs)(n.p,{children:["The namespace used for this datapack is ",(0,i.jsx)(n.code,{children:"diet_example"}),". The ",(0,i.jsx)(n.code,{children:"diet_example"})," folder has a sub-folder called ",(0,i.jsx)(n.code,{children:"diet"})," which\nhouses the ",(0,i.jsx)(n.code,{children:"groups"})," and ",(0,i.jsx)(n.code,{children:"suites"})," folder. This is the custom data that is specifically for the Diet mod. On the other\nhand, the ",(0,i.jsx)(n.code,{children:"diet"})," folder that houses the ",(0,i.jsx)(n.code,{children:"tags"})," folder is using the name as a separate namespace for the purposes of\nadding item tags, which are read by vanilla."]})]}),"\n",(0,i.jsx)(n.h2,{id:"new-food-group",children:"New Food Group"}),"\n",(0,i.jsxs)(n.p,{children:["Adding a new food group is controlled by the ",(0,i.jsx)(n.code,{children:"data/diet_example/diet/groups/test_group.json"})," file:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "icon": "minecraft:diamond",\n "color": "#ffffff",\n "order": 5,\n "default_value": 0.25,\n "gain_multiplier": 2.0,\n "decay_multiplier": 0.5,\n "beneficial": true\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"The file and file name specifies these properties for the food group:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The identifier for the food group is ",(0,i.jsx)(n.code,{children:"test_group"}),", as denoted by the file name"]}),"\n",(0,i.jsxs)(n.li,{children:["The icon is the one for the ",(0,i.jsx)(n.code,{children:"minecraft:diamond"})," item"]}),"\n",(0,i.jsxs)(n.li,{children:["The color associated with the food group is ",(0,i.jsx)(n.code,{children:"#ffffff"}),", or white"]}),"\n",(0,i.jsxs)(n.li,{children:["The order is ",(0,i.jsx)(n.code,{children:"5"}),", denoting where it is placed on the Diet GUI"]}),"\n",(0,i.jsxs)(n.li,{children:["The default value is ",(0,i.jsx)(n.code,{children:"0.25"}),", or 25%"]}),"\n",(0,i.jsxs)(n.li,{children:["The gain multiplier is ",(0,i.jsx)(n.code,{children:"2.0"}),", doubling the percentages on all gains for the food group"]}),"\n",(0,i.jsxs)(n.li,{children:["The decay multiplier is ",(0,i.jsx)(n.code,{children:"0.5"}),", halving the rate of decay for the food group"]}),"\n",(0,i.jsxs)(n.li,{children:["The food group is ",(0,i.jsx)(n.code,{children:"beneficial"}),", which will render as green in tooltips"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["For more information on the fields and customization of food groups, please refer to ",(0,i.jsx)(n.a,{href:"/diet/diet-groups",children:"the food groups page"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"adding-the-new-food-group-to-a-suite",children:"Adding the New Food Group to a Suite"}),"\n",(0,i.jsxs)(n.p,{children:["Just creating the food group isn't enough, as now it has to be added to a diet suite in order to appear anywhere. The\nmost relevant diet suite will be the default one, named ",(0,i.jsx)(n.code,{children:"builtin"}),", which is configured by the ",(0,i.jsx)(n.code,{children:"data/diet_example/diet/suites/builtin.json"})," file:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "replace": false,\n "groups": [\n "test_group"\n ],\n "effects": [\n {\n "status_effects": [\n {\n "name": "minecraft:regeneration",\n "power": 3\n }\n ],\n "conditions": [\n {\n "groups": ["test_group"],\n "match": "all",\n "above": 0.8,\n "below": 1.0\n }\n ]\n }\n ]\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"The file and file name specifies these properties for the diet suite:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The identifier for the diet suite is ",(0,i.jsx)(n.code,{children:"builtin"}),", as denoted by the file name. This is the same identifier as the default\none, so this file's purpose is to edit or override any previously stated values."]}),"\n",(0,i.jsxs)(n.li,{children:["These values are adding, not replacing, its contents since ",(0,i.jsx)(n.code,{children:"replace"})," is ",(0,i.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["The groups to add are just ",(0,i.jsx)(n.code,{children:"test_group"})]}),"\n",(0,i.jsxs)(n.li,{children:["The effect added is a ",(0,i.jsx)(n.code,{children:"minecraft:regeneration"})," status effect when ",(0,i.jsx)(n.code,{children:"test_group"})," is above ",(0,i.jsx)(n.code,{children:"0.8"}),", or 80%"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["For more information on the fields and customization of diet suites, please refer to ",(0,i.jsx)(n.a,{href:"/diet/diet-suites",children:"the diet suites page"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"adding-an-item-to-a-food-group",children:"Adding an Item to a Food Group"}),"\n",(0,i.jsxs)(n.p,{children:["Items are added to food groups by adding them to the relevant item tag. In the example datapack, the food group is ",(0,i.jsx)(n.code,{children:"test_group"}),"\nso an item tag for ",(0,i.jsx)(n.code,{children:"diet:test_group"})," is created at ",(0,i.jsx)(n.code,{children:"data/diet/tags/items/test_group.json"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "replace": false,\n "values": [\n "minecraft:apple"\n ]\n}\n'})}),"\n",(0,i.jsxs)(n.p,{children:["The file name is the same as the identifier for the food group and will be the name of the tag that is created. By\nsetting ",(0,i.jsx)(n.code,{children:"replace"})," to ",(0,i.jsx)(n.code,{children:"false"}),", the values are added to the tag instead of replacing them. Listing ",(0,i.jsx)(n.code,{children:"minecraft:apple"})," in\nthe ",(0,i.jsx)(n.code,{children:"values"})," array will add the apple item to the tag and consequently to the ",(0,i.jsx)(n.code,{children:"test_group"})," food group."]}),"\n",(0,i.jsxs)(n.p,{children:["For more information on tags and item tags, please refer to the ",(0,i.jsx)(n.a,{href:"https://minecraft.wiki/w/Tag",children:"page on the Minecraft wiki"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"activating-the-datapack",children:"Activating the Datapack"}),"\n",(0,i.jsxs)(n.p,{children:["Datapacks are created on a per-world basis and need to be placed in the ",(0,i.jsx)(n.code,{children:"datapacks"})," folder of the ",(0,i.jsx)(n.code,{children:"world"})," folder on a\ndedicated server or the ",(0,i.jsx)(n.code,{children:"saves/(World Name)"})," folder in single player. They should automatically be enabled upon loading\nthe datapack for the first time in the world."]})]})}function h(e={}){const{wrapper:n}={...(0,d.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},6955:(e,n,t)=>{t.d(n,{Z:()=>i});const i=t.p+"assets/files/diet_example-d150912a73450e80c0d2527087199ec4.zip"},1151:(e,n,t)=>{t.d(n,{Z:()=>s,a:()=>a});var i=t(7294);const d={},o=i.createContext(d);function a(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:a(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bfeab3de.1a2c8c3d.js b/assets/js/bfeab3de.1a2c8c3d.js new file mode 100644 index 0000000..bbdc7a8 --- /dev/null +++ b/assets/js/bfeab3de.1a2c8c3d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[6082],{8815:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>m,frontMatter:()=>a,metadata:()=>d,toc:()=>c});var n=i(5893),r=i(1151),o=i(4866),s=i(5162);const a={sidebar_position:11},l="Slot Modifiers",d={id:"curios/slots/slot-modifiers",title:"Slot Modifiers",description:"A tutorial on how to add and remove slots from the curios inventory on entities.",source:"@site/docs/curios/slots/slot-modifiers.mdx",sourceDirName:"curios/slots",slug:"/curios/slots/slot-modifiers",permalink:"/curios/slots/slot-modifiers",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slots/slot-modifiers.mdx",tags:[],version:"current",sidebarPosition:11,frontMatter:{sidebar_position:11},sidebar:"tutorialSidebar",previous:{title:"Slot Icon Textures",permalink:"/curios/slots/slot-textures"},next:{title:"Data Generation",permalink:"/curios/slots/data-generation"}},u={},c=[{value:"Overview",id:"overview",level:2},{value:"Getting Started",id:"getting-started",level:2},{value:"Adding or Removing Slots",id:"adding-or-removing-slots",level:2},{value:"Removing Slot Modifiers",id:"removing-slot-modifiers",level:2},{value:"Items",id:"items",level:2},{value:"Interfaces",id:"interfaces",level:3},{value:"NBT Tag",id:"nbt-tag",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,r.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"slot-modifiers",children:"Slot Modifiers"}),"\n",(0,n.jsx)(t.p,{children:"A tutorial on how to add and remove slots from the curios inventory on entities."}),"\n",(0,n.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsxs)(t.p,{children:["Slot modifiers are a way to dynamically add and/or remove slots from entities the same way developers could add and/or\nremove health or attack damage. In fact, it uses the exact same ",(0,n.jsx)(t.code,{children:"AttributeModifier"})," system to accomplish this."]}),"\n",(0,n.jsx)(t.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,n.jsxs)(t.p,{children:["The main way to interact with and add slot modifiers is through the ",(0,n.jsx)(t.code,{children:"top.theillusivec4.curios.api.type.capability.ICuriosItemHandler"}),"\ninterface. A developer can grab the specific instance of this on the entity by following the steps from the ",(0,n.jsx)(t.a,{href:"/curios/inventory/basic-inventory",children:"inventory"}),"\nguide to query the capability from Curios."]}),"\n",(0,n.jsx)(t.h2,{id:"adding-or-removing-slots",children:"Adding or Removing Slots"}),"\n",(0,n.jsxs)(t.p,{children:["Adding slots can be done through ",(0,n.jsx)(t.code,{children:"ICuriosItemHandler#addTransientSlotModifiers(Multimap )"})," and\n",(0,n.jsx)(t.code,{children:"ICuriosItemHandler#addPermanentSlotModifiers(Multimap )"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["A ",(0,n.jsx)(t.strong,{children:"transient"})," slot modifier is a slot modifier that is not serialized to the player data, while a ",(0,n.jsx)(t.strong,{children:"permanent"})," slot\nmodifier is serialized. The former will disappear upon players relogging into a world and the latter will always remain\nuntil manually removed. Transient slot modifiers are often used for effects that may not always be present and need to\nbe verified at certain times while permanent slot modifiers are often used as rewards or other effects that are not\nmeant to be removed often, if ever."]}),"\n",(0,n.jsx)(t.admonition,{type:"tip",children:(0,n.jsx)(t.p,{children:"For slot types that should not appear until given by a relevant slot modifier, be sure to set the default amount of slots\nto 0 so that it does not give any slots by default."})}),"\n",(0,n.jsx)(t.p,{children:"An example of adding a transient slot modifier:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'CuriosApi.getCuriosInventory(livingEntity).ifPresent(inventory -> {\n inventory.addTransientSlotModifier("ring", uuid, "name", 2, AttributeModifier.Operation.ADDITION));\n});\n'})}),"\n",(0,n.jsxs)(t.p,{children:["This will add 2 slots to the ",(0,n.jsx)(t.code,{children:"ring"})," slot type, with the specified ",(0,n.jsx)(t.code,{children:"name"})," and ",(0,n.jsx)(t.code,{children:"uuid"})," (UUID is not provided so developers\nwill need to generate or substitute one). Note that each key for the map must be a valid ",(0,n.jsx)(t.code,{children:"SlotType"})," identifier, such as\n",(0,n.jsx)(t.code,{children:'"ring"'})," or ",(0,n.jsx)(t.code,{children:'"necklace"'}),"."]}),"\n",(0,n.jsx)(t.p,{children:"In the case of adding multiple slot modifiers at once:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'CuriosApi.getCuriosInventory(livingEntity).ifPresent(inventory -> {\n Map map = LinkedHashMultimap.create();\n map.put("ring", new AttributeModifier(uuid, "name", 2, AttributeModifier.Operation.ADDITION));\n map.put("necklace", new AttributeModifier(uuid, "name", 1, AttributeModifier.Operation.ADDITION));\n inventory.addTransientSlotModifiers(map);\n});\n'})}),"\n",(0,n.jsxs)(t.p,{children:["If slots need to be ",(0,n.jsx)(t.strong,{children:"removed"}),", this is as simple as stating a negative amount for an ",(0,n.jsx)(t.code,{children:"AttributeModifier.Operation.ADDITION"}),"\noperation in the ",(0,n.jsx)(t.code,{children:"AttributeModifier"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'inventory.addTransientSlotModifier("ring", uuid, "name", -2, AttributeModifier.Operation.ADDITION));\n'})}),"\n",(0,n.jsxs)(t.p,{children:["Instead of adding 2 slots, this will ",(0,n.jsx)(t.strong,{children:"remove"})," 2 slots."]}),"\n",(0,n.jsx)(t.p,{children:"If the total slot amount results in a number less than 0, the slots will remain at 0 but the slot modifiers will remain\nand existing slot modifiers will stack with each other. If a slot modifier removes 2 slots and the base amount is\nalready 0, there will seemingly be no effect. However, if another slot modifier adds 3 slots on top of that, it will add\nto the existing -2 and result in a total of 1 slot."}),"\n",(0,n.jsx)(t.admonition,{type:"caution",children:(0,n.jsxs)(t.p,{children:["Slot modifiers can only add slots for slot types that are already assigned to entities. If a slot type exists but is not\nassigned to the specified entity, then the slot modifier will not be able to add any slots of that slot type. Be sure to\ngo over ",(0,n.jsx)(t.a,{href:"./entity-register",children:"how to assign slots to entities"})," if slot modifiers do not appear to be adding any slots."]})}),"\n",(0,n.jsx)(t.h2,{id:"removing-slot-modifiers",children:"Removing Slot Modifiers"}),"\n",(0,n.jsxs)(t.p,{children:["Removing slot modifiers can be done through ",(0,n.jsx)(t.code,{children:"ICuriosItemHandler#removeSlotModifiers(Multimap )"}),"."]}),"\n",(0,n.jsx)(t.p,{children:"This follows very similar logic as the preceding section on adding slot modifiers:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'CuriosApi.getCuriosInventory(livingEntity).ifPresent(inventory -> {\n inventory.removeSlotModifier("ring", uuid);\n})\n'})}),"\n",(0,n.jsxs)(t.p,{children:["This will remove the slot modifier with UUID ",(0,n.jsx)(t.code,{children:"uuid"})," from the ",(0,n.jsx)(t.code,{children:"ring"})," slot type."]}),"\n",(0,n.jsx)(t.p,{children:"In the case of removing multiple slot modifiers at once:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'CuriosApi.getCuriosInventory(livingEntity).ifPresent(inventory -> {\n Map map = LinkedHashMultimap.create();\n map.put("ring", new AttributeModifier(uuid, "name", 2, AttributeModifier.Operation.ADDITION));\n inventory.removeSlotModifiers(map);\n})\n'})}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"AttributeModifier"})," used is mostly filler, the amount and operation do not matter. The key and the ",(0,n.jsx)(t.code,{children:"uuid"}),", however,\nmust match the ones used for the slot modifier being removed."]}),"\n",(0,n.jsx)(t.h2,{id:"items",children:"Items"}),"\n",(0,n.jsx)(t.p,{children:"The methods above are helpful for universal applications, but there are more streamlined methods for developers that\nwant to attach slot modifiers to specific items so that they are only applied when those items are equipped and then\nremoved when unequipped."}),"\n",(0,n.jsx)(t.h3,{id:"interfaces",children:"Interfaces"}),"\n",(0,n.jsxs)(t.p,{children:["Both the ",(0,n.jsx)(t.code,{children:"ICurio"})," and ",(0,n.jsx)(t.code,{children:"ICurioItem"})," interfaces expose a method called ",(0,n.jsx)(t.code,{children:"getAttributeModifiers"})," that returns a\n",(0,n.jsx)(t.code,{children:"Multimap "})," denoting attributes and their modifiers, in the same way that items themselves\nhave a similar method when equipped in vanilla slots. For more information on attaching these interfaces to items, see\nthe ",(0,n.jsx)(t.a,{href:"../items/curio-creation",children:"curio creation page"}),"."]}),"\n",(0,n.jsxs)(o.Z,{groupId:"curiointerface",children:[(0,n.jsx)(s.Z,{value:"curio",label:"ICurio",default:!0,children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:"@Override\npublic Multimap getAttributeModifiers(SlotContext slotContext, UUID uuid) {\n Multimap map = LinkedHashMultimap.create();\n // Add attribute modifiers\n return map;\n}\n"})})}),(0,n.jsx)(s.Z,{value:"curioitem",label:"ICurioItem",default:!0,children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:"@Override\npublic Multimap getAttributeModifiers(SlotContext slotContext, UUID uuid, ItemStack stack) {\n Multimap map = LinkedHashMultimap.create();\n // Add attribute modifiers\n return map;\n}\n"})})})]}),"\n",(0,n.jsxs)(t.p,{children:["In order to add ",(0,n.jsx)(t.strong,{children:"slot"})," modifiers specifically, developers can leverage the\n",(0,n.jsx)(t.code,{children:"CuriosApi#addSlotModifier(Multimap, String, UUID, double, AttributeModifier.Operation)"})," method:"]}),"\n",(0,n.jsxs)(o.Z,{groupId:"curiointerface",children:[(0,n.jsx)(s.Z,{value:"curio",label:"ICurio",default:!0,children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'@Override\npublic Multimap getAttributeModifiers(SlotContext slotContext, UUID uuid) {\n Multimap map = LinkedHashMultimap.create();\n CuriosApi.addSlotModifier(map, "ring", uuid, 2, AttributeModifier.Operation.ADDITION);\n return map;\n}\n'})})}),(0,n.jsx)(s.Z,{value:"curioitem",label:"ICurioItem",default:!0,children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'@Override\npublic Multimap getAttributeModifiers(SlotContext slotContext, UUID uuid, ItemStack stack) {\n Multimap map = LinkedHashMultimap.create();\n CuriosApi.addSlotModifier(map, "ring", uuid, 2, AttributeModifier.Operation.ADDITION);\n return map;\n}\n'})})})]}),"\n",(0,n.jsxs)(t.p,{children:["This will add 2 slots of the ",(0,n.jsx)(t.code,{children:"ring"})," slot type using the passed in ",(0,n.jsx)(t.code,{children:"uuid"})," from the second parameter of the method. The\nslots will only be added when this item is equipped and those slots will be removed when this item is unequipped."]}),"\n",(0,n.jsx)(t.admonition,{type:"caution",children:(0,n.jsxs)(t.p,{children:["Although the ",(0,n.jsx)(t.code,{children:"uuid"})," in the preceding section can be decided on a case-by-case basis, the ",(0,n.jsx)(t.code,{children:"uuid"})," in this section related\nto items is ",(0,n.jsx)(t.strong,{children:"strongly encouraged"})," to be fed from the second parameter of the ",(0,n.jsx)(t.code,{children:"getAttributeModifiers"})," method. This is\nbecause the UUID in the parameter is guaranteed to be slot-specific, which avoids any collision issues in case multiple\ninstances of the same item are equipped."]})}),"\n",(0,n.jsx)(t.h3,{id:"nbt-tag",children:"NBT Tag"}),"\n",(0,n.jsx)(t.p,{children:"The previous method works for items that developers can directly register or implement interfaces or capabilities for,\nbut this can fall short if developers want to add these modifiers dynamically or even override previously registered\nbehavior."}),"\n",(0,n.jsxs)(t.p,{children:["As an alternative, developers can directly add slot modifiers to item NBT tags as well using ",(0,n.jsx)(t.code,{children:"CuriosApi#addSlotModifier(ItemStack, String, String, UUID, double, AttributeModifier.Operation, String)"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'CuriosApi.addSlotModifier(stack, "ring", "name", uuid, 2, AttributeModifier.Operation.ADDITION, "necklace");\n'})}),"\n",(0,n.jsxs)(t.p,{children:["There are two slot identifiers in this method. The first one, ",(0,n.jsx)(t.code,{children:'"ring"'})," above, denotes the slot type that the slot modifier\ngives or removes slots from. The second one, ",(0,n.jsx)(t.code,{children:'"necklace"'})," above, denotes the slot type that the slot modifier becomes\nactive in. In other words, the above example will give 2 ",(0,n.jsx)(t.code,{children:"ring"})," slots when the item is equipped in a ",(0,n.jsx)(t.code,{children:"necklace"})," slot."]}),"\n",(0,n.jsx)(t.admonition,{type:"caution",children:(0,n.jsxs)(t.p,{children:["It's usually best to use ",(0,n.jsx)(t.code,{children:"null"})," in place of the ",(0,n.jsx)(t.code,{children:"uuid"}),", to avoid collisions as described in the preceding caution note,\nunless there is justification for providing a static UUID. Providing a ",(0,n.jsx)(t.code,{children:"null"})," UUID will allow Curios to provide a\nslot-specific UUID in its place."]})})]})}function m(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},5162:(e,t,i)=>{i.d(t,{Z:()=>s});i(7294);var n=i(512);const r={tabItem:"tabItem_Ymn6"};var o=i(5893);function s(e){let{children:t,hidden:i,className:s}=e;return(0,o.jsx)("div",{role:"tabpanel",className:(0,n.Z)(r.tabItem,s),hidden:i,children:t})}},4866:(e,t,i)=>{i.d(t,{Z:()=>I});var n=i(7294),r=i(512),o=i(2466),s=i(6550),a=i(469),l=i(1980),d=i(7392),u=i(12);function c(e){return n.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:t,children:i}=e;return(0,n.useMemo)((()=>{const e=t??function(e){return c(e).map((e=>{let{props:{value:t,label:i,attributes:n,default:r}}=e;return{value:t,label:i,attributes:n,default:r}}))}(i);return function(e){const t=(0,d.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,i])}function m(e){let{value:t,tabValues:i}=e;return i.some((e=>e.value===t))}function p(e){let{queryString:t=!1,groupId:i}=e;const r=(0,s.k6)(),o=function(e){let{queryString:t=!1,groupId:i}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!i)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return i??null}({queryString:t,groupId:i});return[(0,l._X)(o),(0,n.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function f(e){const{defaultValue:t,queryString:i=!1,groupId:r}=e,o=h(e),[s,l]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:i}=e;if(0===i.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:i}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${i.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=i.find((e=>e.default))??i[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:o}))),[d,c]=p({queryString:i,groupId:r}),[f,v]=function(e){let{groupId:t}=e;const i=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,u.Nk)(i);return[r,(0,n.useCallback)((e=>{i&&o.set(e)}),[i,o])]}({groupId:r}),g=(()=>{const e=d??f;return m({value:e,tabValues:o})?e:null})();(0,a.Z)((()=>{g&&l(g)}),[g]);return{selectedValue:s,selectValue:(0,n.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),c(e),v(e)}),[c,v,o]),tabValues:o}}var v=i(2389);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=i(5893);function x(e){let{className:t,block:i,selectedValue:n,selectValue:s,tabValues:a}=e;const l=[],{blockElementScrollPositionUntilNextRender:d}=(0,o.o5)(),u=e=>{const t=e.currentTarget,i=l.indexOf(t),r=a[i].value;r!==n&&(d(t),s(r))},c=e=>{let t=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const i=l.indexOf(e.currentTarget)+1;t=l[i]??l[0];break}case"ArrowLeft":{const i=l.indexOf(e.currentTarget)-1;t=l[i]??l[l.length-1];break}}t?.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":i},t),children:a.map((e=>{let{value:t,label:i,attributes:o}=e;return(0,b.jsx)("li",{role:"tab",tabIndex:n===t?0:-1,"aria-selected":n===t,ref:e=>l.push(e),onKeyDown:c,onClick:u,...o,className:(0,r.Z)("tabs__item",g.tabItem,o?.className,{"tabs__item--active":n===t}),children:i??t},t)}))})}function j(e){let{lazy:t,children:i,selectedValue:r}=e;const o=(Array.isArray(i)?i:[i]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:o.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==r})))})}function y(e){const t=f(e);return(0,b.jsxs)("div",{className:(0,r.Z)("tabs-container",g.tabList),children:[(0,b.jsx)(x,{...e,...t}),(0,b.jsx)(j,{...e,...t})]})}function I(e){const t=(0,v.Z)();return(0,b.jsx)(y,{...e,children:c(e.children)},String(t))}},1151:(e,t,i)=>{i.d(t,{Z:()=>a,a:()=>s});var n=i(7294);const r={},o=n.createContext(r);function s(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bfeab3de.5bc9b32a.js b/assets/js/bfeab3de.5bc9b32a.js deleted file mode 100644 index 1b15477..0000000 --- a/assets/js/bfeab3de.5bc9b32a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[82],{8815:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>m,frontMatter:()=>a,metadata:()=>d,toc:()=>c});var n=i(5893),r=i(1151),o=i(4866),s=i(5162);const a={sidebar_position:11},l="Slot Modifiers",d={id:"curios/slots/slot-modifiers",title:"Slot Modifiers",description:"A tutorial on how to add and remove slots from the curios inventory on entities.",source:"@site/docs/curios/slots/slot-modifiers.mdx",sourceDirName:"curios/slots",slug:"/curios/slots/slot-modifiers",permalink:"/curios/slots/slot-modifiers",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slots/slot-modifiers.mdx",tags:[],version:"current",sidebarPosition:11,frontMatter:{sidebar_position:11},sidebar:"tutorialSidebar",previous:{title:"Slot Icon Textures",permalink:"/curios/slots/slot-textures"},next:{title:"Data Generation",permalink:"/curios/slots/data-generation"}},u={},c=[{value:"Overview",id:"overview",level:2},{value:"Getting Started",id:"getting-started",level:2},{value:"Adding or Removing Slots",id:"adding-or-removing-slots",level:2},{value:"Removing Slot Modifiers",id:"removing-slot-modifiers",level:2},{value:"Items",id:"items",level:2},{value:"Interfaces",id:"interfaces",level:3},{value:"NBT Tag",id:"nbt-tag",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,r.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"slot-modifiers",children:"Slot Modifiers"}),"\n",(0,n.jsx)(t.p,{children:"A tutorial on how to add and remove slots from the curios inventory on entities."}),"\n",(0,n.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsxs)(t.p,{children:["Slot modifiers are a way to dynamically add and/or remove slots from entities the same way developers could add and/or\nremove health or attack damage. In fact, it uses the exact same ",(0,n.jsx)(t.code,{children:"AttributeModifier"})," system to accomplish this."]}),"\n",(0,n.jsx)(t.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,n.jsxs)(t.p,{children:["The main way to interact with and add slot modifiers is through the ",(0,n.jsx)(t.code,{children:"top.theillusivec4.curios.api.type.capability.ICuriosItemHandler"}),"\ninterface. A developer can grab the specific instance of this on the entity by following the steps from the ",(0,n.jsx)(t.a,{href:"/curios/inventory/basic-inventory",children:"inventory"}),"\nguide to query the capability from Curios."]}),"\n",(0,n.jsx)(t.h2,{id:"adding-or-removing-slots",children:"Adding or Removing Slots"}),"\n",(0,n.jsxs)(t.p,{children:["Adding slots can be done through ",(0,n.jsx)(t.code,{children:"ICuriosItemHandler#addTransientSlotModifiers(Multimap )"})," and\n",(0,n.jsx)(t.code,{children:"ICuriosItemHandler#addPermanentSlotModifiers(Multimap )"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["A ",(0,n.jsx)(t.strong,{children:"transient"})," slot modifier is a slot modifier that is not serialized to the player data, while a ",(0,n.jsx)(t.strong,{children:"permanent"})," slot\nmodifier is serialized. The former will disappear upon players relogging into a world and the latter will always remain\nuntil manually removed. Transient slot modifiers are often used for effects that may not always be present and need to\nbe verified at certain times while permanent slot modifiers are often used as rewards or other effects that are not\nmeant to be removed often, if ever."]}),"\n",(0,n.jsx)(t.admonition,{type:"tip",children:(0,n.jsx)(t.p,{children:"For slot types that should not appear until given by a relevant slot modifier, be sure to set the default amount of slots\nto 0 so that it does not give any slots by default."})}),"\n",(0,n.jsx)(t.p,{children:"An example of adding a transient slot modifier:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'CuriosApi.getCuriosInventory(livingEntity).ifPresent(inventory -> {\n inventory.addTransientSlotModifier("ring", uuid, "name", 2, AttributeModifier.Operation.ADDITION));\n});\n'})}),"\n",(0,n.jsxs)(t.p,{children:["This will add 2 slots to the ",(0,n.jsx)(t.code,{children:"ring"})," slot type, with the specified ",(0,n.jsx)(t.code,{children:"name"})," and ",(0,n.jsx)(t.code,{children:"uuid"})," (UUID is not provided so developers\nwill need to generate or substitute one). Note that each key for the map must be a valid ",(0,n.jsx)(t.code,{children:"SlotType"})," identifier, such as\n",(0,n.jsx)(t.code,{children:'"ring"'})," or ",(0,n.jsx)(t.code,{children:'"necklace"'}),"."]}),"\n",(0,n.jsx)(t.p,{children:"In the case of adding multiple slot modifiers at once:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'CuriosApi.getCuriosInventory(livingEntity).ifPresent(inventory -> {\n Map map = LinkedHashMultimap.create();\n map.put("ring", new AttributeModifier(uuid, "name", 2, AttributeModifier.Operation.ADDITION));\n map.put("necklace", new AttributeModifier(uuid, "name", 1, AttributeModifier.Operation.ADDITION));\n inventory.addTransientSlotModifiers(map);\n});\n'})}),"\n",(0,n.jsxs)(t.p,{children:["If slots need to be ",(0,n.jsx)(t.strong,{children:"removed"}),", this is as simple as stating a negative amount for an ",(0,n.jsx)(t.code,{children:"AttributeModifier.Operation.ADDITION"}),"\noperation in the ",(0,n.jsx)(t.code,{children:"AttributeModifier"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'inventory.addTransientSlotModifier("ring", uuid, "name", -2, AttributeModifier.Operation.ADDITION));\n'})}),"\n",(0,n.jsxs)(t.p,{children:["Instead of adding 2 slots, this will ",(0,n.jsx)(t.strong,{children:"remove"})," 2 slots."]}),"\n",(0,n.jsx)(t.p,{children:"If the total slot amount results in a number less than 0, the slots will remain at 0 but the slot modifiers will remain\nand existing slot modifiers will stack with each other. If a slot modifier removes 2 slots and the base amount is\nalready 0, there will seemingly be no effect. However, if another slot modifier adds 3 slots on top of that, it will add\nto the existing -2 and result in a total of 1 slot."}),"\n",(0,n.jsx)(t.admonition,{type:"caution",children:(0,n.jsxs)(t.p,{children:["Slot modifiers can only add slots for slot types that are already assigned to entities. If a slot type exists but is not\nassigned to the specified entity, then the slot modifier will not be able to add any slots of that slot type. Be sure to\ngo over ",(0,n.jsx)(t.a,{href:"./entity-register",children:"how to assign slots to entities"})," if slot modifiers do not appear to be adding any slots."]})}),"\n",(0,n.jsx)(t.h2,{id:"removing-slot-modifiers",children:"Removing Slot Modifiers"}),"\n",(0,n.jsxs)(t.p,{children:["Removing slot modifiers can be done through ",(0,n.jsx)(t.code,{children:"ICuriosItemHandler#removeSlotModifiers(Multimap )"}),"."]}),"\n",(0,n.jsx)(t.p,{children:"This follows very similar logic as the preceding section on adding slot modifiers:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'CuriosApi.getCuriosInventory(livingEntity).ifPresent(inventory -> {\n inventory.removeSlotModifier("ring", uuid);\n})\n'})}),"\n",(0,n.jsxs)(t.p,{children:["This will remove the slot modifier with UUID ",(0,n.jsx)(t.code,{children:"uuid"})," from the ",(0,n.jsx)(t.code,{children:"ring"})," slot type."]}),"\n",(0,n.jsx)(t.p,{children:"In the case of removing multiple slot modifiers at once:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'CuriosApi.getCuriosInventory(livingEntity).ifPresent(inventory -> {\n Map map = LinkedHashMultimap.create();\n map.put("ring", new AttributeModifier(uuid, "name", 2, AttributeModifier.Operation.ADDITION));\n inventory.removeSlotModifiers(map);\n})\n'})}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"AttributeModifier"})," used is mostly filler, the amount and operation do not matter. The key and the ",(0,n.jsx)(t.code,{children:"uuid"}),", however,\nmust match the ones used for the slot modifier being removed."]}),"\n",(0,n.jsx)(t.h2,{id:"items",children:"Items"}),"\n",(0,n.jsx)(t.p,{children:"The methods above are helpful for universal applications, but there are more streamlined methods for developers that\nwant to attach slot modifiers to specific items so that they are only applied when those items are equipped and then\nremoved when unequipped."}),"\n",(0,n.jsx)(t.h3,{id:"interfaces",children:"Interfaces"}),"\n",(0,n.jsxs)(t.p,{children:["Both the ",(0,n.jsx)(t.code,{children:"ICurio"})," and ",(0,n.jsx)(t.code,{children:"ICurioItem"})," interfaces expose a method called ",(0,n.jsx)(t.code,{children:"getAttributeModifiers"})," that returns a\n",(0,n.jsx)(t.code,{children:"Multimap "})," denoting attributes and their modifiers, in the same way that items themselves\nhave a similar method when equipped in vanilla slots. For more information on attaching these interfaces to items, see\nthe ",(0,n.jsx)(t.a,{href:"../items/curio-creation",children:"curio creation page"}),"."]}),"\n",(0,n.jsxs)(o.Z,{groupId:"curiointerface",children:[(0,n.jsx)(s.Z,{value:"curio",label:"ICurio",default:!0,children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:"@Override\npublic Multimap getAttributeModifiers(SlotContext slotContext, UUID uuid) {\n Multimap map = LinkedHashMultimap.create();\n // Add attribute modifiers\n return map;\n}\n"})})}),(0,n.jsx)(s.Z,{value:"curioitem",label:"ICurioItem",default:!0,children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:"@Override\npublic Multimap getAttributeModifiers(SlotContext slotContext, UUID uuid, ItemStack stack) {\n Multimap map = LinkedHashMultimap.create();\n // Add attribute modifiers\n return map;\n}\n"})})})]}),"\n",(0,n.jsxs)(t.p,{children:["In order to add ",(0,n.jsx)(t.strong,{children:"slot"})," modifiers specifically, developers can leverage the\n",(0,n.jsx)(t.code,{children:"CuriosApi#addSlotModifier(Multimap, String, UUID, double, AttributeModifier.Operation)"})," method:"]}),"\n",(0,n.jsxs)(o.Z,{groupId:"curiointerface",children:[(0,n.jsx)(s.Z,{value:"curio",label:"ICurio",default:!0,children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'@Override\npublic Multimap getAttributeModifiers(SlotContext slotContext, UUID uuid) {\n Multimap map = LinkedHashMultimap.create();\n CuriosApi.addSlotModifier(map, "ring", uuid, 2, AttributeModifier.Operation.ADDITION);\n return map;\n}\n'})})}),(0,n.jsx)(s.Z,{value:"curioitem",label:"ICurioItem",default:!0,children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'@Override\npublic Multimap getAttributeModifiers(SlotContext slotContext, UUID uuid, ItemStack stack) {\n Multimap map = LinkedHashMultimap.create();\n CuriosApi.addSlotModifier(map, "ring", uuid, 2, AttributeModifier.Operation.ADDITION);\n return map;\n}\n'})})})]}),"\n",(0,n.jsxs)(t.p,{children:["This will add 2 slots of the ",(0,n.jsx)(t.code,{children:"ring"})," slot type using the passed in ",(0,n.jsx)(t.code,{children:"uuid"})," from the second parameter of the method. The\nslots will only be added when this item is equipped and those slots will be removed when this item is unequipped."]}),"\n",(0,n.jsx)(t.admonition,{type:"caution",children:(0,n.jsxs)(t.p,{children:["Although the ",(0,n.jsx)(t.code,{children:"uuid"})," in the preceding section can be decided on a case-by-case basis, the ",(0,n.jsx)(t.code,{children:"uuid"})," in this section related\nto items is ",(0,n.jsx)(t.strong,{children:"strongly encouraged"})," to be fed from the second parameter of the ",(0,n.jsx)(t.code,{children:"getAttributeModifiers"})," method. This is\nbecause the UUID in the parameter is guaranteed to be slot-specific, which avoids any collision issues in case multiple\ninstances of the same item are equipped."]})}),"\n",(0,n.jsx)(t.h3,{id:"nbt-tag",children:"NBT Tag"}),"\n",(0,n.jsx)(t.p,{children:"The previous method works for items that developers can directly register or implement interfaces or capabilities for,\nbut this can fall short if developers want to add these modifiers dynamically or even override previously registered\nbehavior."}),"\n",(0,n.jsxs)(t.p,{children:["As an alternative, developers can directly add slot modifiers to item NBT tags as well using ",(0,n.jsx)(t.code,{children:"CuriosApi#addSlotModifier(ItemStack, String, String, UUID, double, AttributeModifier.Operation, String)"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'CuriosApi.addSlotModifier(stack, "ring", "name", uuid, 2, AttributeModifier.Operation.ADDITION, "necklace");\n'})}),"\n",(0,n.jsxs)(t.p,{children:["There are two slot identifiers in this method. The first one, ",(0,n.jsx)(t.code,{children:'"ring"'})," above, denotes the slot type that the slot modifier\ngives or removes slots from. The second one, ",(0,n.jsx)(t.code,{children:'"necklace"'})," above, denotes the slot type that the slot modifier becomes\nactive in. In other words, the above example will give 2 ",(0,n.jsx)(t.code,{children:"ring"})," slots when the item is equipped in a ",(0,n.jsx)(t.code,{children:"necklace"})," slot."]}),"\n",(0,n.jsx)(t.admonition,{type:"caution",children:(0,n.jsxs)(t.p,{children:["It's usually best to use ",(0,n.jsx)(t.code,{children:"null"})," in place of the ",(0,n.jsx)(t.code,{children:"uuid"}),", to avoid collisions as described in the preceding caution note,\nunless there is justification for providing a static UUID. Providing a ",(0,n.jsx)(t.code,{children:"null"})," UUID will allow Curios to provide a\nslot-specific UUID in its place."]})})]})}function m(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},5162:(e,t,i)=>{i.d(t,{Z:()=>s});i(7294);var n=i(512);const r={tabItem:"tabItem_Ymn6"};var o=i(5893);function s(e){let{children:t,hidden:i,className:s}=e;return(0,o.jsx)("div",{role:"tabpanel",className:(0,n.Z)(r.tabItem,s),hidden:i,children:t})}},4866:(e,t,i)=>{i.d(t,{Z:()=>I});var n=i(7294),r=i(512),o=i(2466),s=i(6550),a=i(469),l=i(1980),d=i(7392),u=i(12);function c(e){return n.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:t,children:i}=e;return(0,n.useMemo)((()=>{const e=t??function(e){return c(e).map((e=>{let{props:{value:t,label:i,attributes:n,default:r}}=e;return{value:t,label:i,attributes:n,default:r}}))}(i);return function(e){const t=(0,d.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,i])}function m(e){let{value:t,tabValues:i}=e;return i.some((e=>e.value===t))}function p(e){let{queryString:t=!1,groupId:i}=e;const r=(0,s.k6)(),o=function(e){let{queryString:t=!1,groupId:i}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!i)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return i??null}({queryString:t,groupId:i});return[(0,l._X)(o),(0,n.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function f(e){const{defaultValue:t,queryString:i=!1,groupId:r}=e,o=h(e),[s,l]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:i}=e;if(0===i.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:i}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${i.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=i.find((e=>e.default))??i[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:o}))),[d,c]=p({queryString:i,groupId:r}),[f,v]=function(e){let{groupId:t}=e;const i=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,u.Nk)(i);return[r,(0,n.useCallback)((e=>{i&&o.set(e)}),[i,o])]}({groupId:r}),g=(()=>{const e=d??f;return m({value:e,tabValues:o})?e:null})();(0,a.Z)((()=>{g&&l(g)}),[g]);return{selectedValue:s,selectValue:(0,n.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),c(e),v(e)}),[c,v,o]),tabValues:o}}var v=i(2389);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=i(5893);function x(e){let{className:t,block:i,selectedValue:n,selectValue:s,tabValues:a}=e;const l=[],{blockElementScrollPositionUntilNextRender:d}=(0,o.o5)(),u=e=>{const t=e.currentTarget,i=l.indexOf(t),r=a[i].value;r!==n&&(d(t),s(r))},c=e=>{let t=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const i=l.indexOf(e.currentTarget)+1;t=l[i]??l[0];break}case"ArrowLeft":{const i=l.indexOf(e.currentTarget)-1;t=l[i]??l[l.length-1];break}}t?.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":i},t),children:a.map((e=>{let{value:t,label:i,attributes:o}=e;return(0,b.jsx)("li",{role:"tab",tabIndex:n===t?0:-1,"aria-selected":n===t,ref:e=>l.push(e),onKeyDown:c,onClick:u,...o,className:(0,r.Z)("tabs__item",g.tabItem,o?.className,{"tabs__item--active":n===t}),children:i??t},t)}))})}function j(e){let{lazy:t,children:i,selectedValue:r}=e;const o=(Array.isArray(i)?i:[i]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:o.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==r})))})}function y(e){const t=f(e);return(0,b.jsxs)("div",{className:(0,r.Z)("tabs-container",g.tabList),children:[(0,b.jsx)(x,{...e,...t}),(0,b.jsx)(j,{...e,...t})]})}function I(e){const t=(0,v.Z)();return(0,b.jsx)(y,{...e,children:c(e.children)},String(t))}},1151:(e,t,i)=>{i.d(t,{Z:()=>a,a:()=>s});var n=i(7294);const r={},o=n.createContext(r);function s(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d8ef455a.1ed2838d.js b/assets/js/d8ef455a.1ed2838d.js new file mode 100644 index 0000000..2c11028 --- /dev/null +++ b/assets/js/d8ef455a.1ed2838d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[3904],{164:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>i,default:()=>l,frontMatter:()=>r,metadata:()=>c,toc:()=>u});var o=n(5893),s=n(1151);const r={sidebar_position:1,slug:"/"},i="Overview",c={id:"intro",title:"Overview",description:"WIP! Check back later for updates.",source:"@site/versioned_docs/version-1.18.x/intro.md",sourceDirName:".",slug:"/",permalink:"/1.18.x/",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/versioned_docs/version-1.18.x/intro.md",tags:[],version:"1.18.x",sidebarPosition:1,frontMatter:{sidebar_position:1,slug:"/"},sidebar:"tutorialSidebar",next:{title:"Champions",permalink:"/1.18.x/category/champions"}},a={},u=[];function d(e){const t={h1:"h1",p:"p",...(0,s.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(t.p,{children:"WIP! Check back later for updates."})]})}function l(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>c,a:()=>i});var o=n(7294);const s={},r=o.createContext(s);function i(e){const t=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d8ef455a.44ce1a16.js b/assets/js/d8ef455a.44ce1a16.js deleted file mode 100644 index e059268..0000000 --- a/assets/js/d8ef455a.44ce1a16.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[904],{164:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>i,default:()=>l,frontMatter:()=>r,metadata:()=>c,toc:()=>u});var o=n(5893),s=n(1151);const r={sidebar_position:1,slug:"/"},i="Overview",c={id:"intro",title:"Overview",description:"WIP! Check back later for updates.",source:"@site/versioned_docs/version-1.18.x/intro.md",sourceDirName:".",slug:"/",permalink:"/1.18.x/",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/versioned_docs/version-1.18.x/intro.md",tags:[],version:"1.18.x",sidebarPosition:1,frontMatter:{sidebar_position:1,slug:"/"},sidebar:"tutorialSidebar",next:{title:"Champions",permalink:"/1.18.x/category/champions"}},a={},u=[];function d(e){const t={h1:"h1",p:"p",...(0,s.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(t.p,{children:"WIP! Check back later for updates."})]})}function l(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>c,a:()=>i});var o=n(7294);const s={},r=o.createContext(s);function i(e){const t=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e0b249dc.bf8ddf65.js b/assets/js/e0b249dc.bf8ddf65.js new file mode 100644 index 0000000..3f1c394 --- /dev/null +++ b/assets/js/e0b249dc.bf8ddf65.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[2420],{1439:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>n,metadata:()=>a,toc:()=>l});var o=s(5893),r=s(1151);const n={sidebar_position:9},i="Slot Icon Textures",a={id:"curios/slots/slot-textures",title:"Slot Icon Textures",description:"A tutorial on how to add custom slot textures to slot types.",source:"@site/docs/curios/slots/slot-textures.md",sourceDirName:"curios/slots",slug:"/curios/slots/slot-textures",permalink:"/curios/slots/slot-textures",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slots/slot-textures.md",tags:[],version:"current",sidebarPosition:9,frontMatter:{sidebar_position:9},sidebar:"tutorialSidebar",previous:{title:"Preset Slot Types",permalink:"/curios/slots/preset-slots"},next:{title:"Slot Modifiers",permalink:"/curios/slots/slot-modifiers"}},c={},l=[{value:"Overview",id:"overview",level:2},{value:"Registering a Slot Texture",id:"registering-a-slot-texture",level:2},{value:"Using a Slot Texture",id:"using-a-slot-texture",level:2}];function d(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",hr:"hr",img:"img",p:"p",pre:"pre",...(0,r.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"slot-icon-textures",children:"Slot Icon Textures"}),"\n",(0,o.jsx)(t.p,{children:"A tutorial on how to add custom slot textures to slot types."}),"\n",(0,o.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(t.hr,{}),"\n",(0,o.jsxs)(t.p,{children:["Registering a new custom slot texture can be done through a resource pack. If you are\nunfamiliar with resource packs, it is recommended to read through the ",(0,o.jsx)(t.a,{href:"https://minecraft.fandom.com/wiki/Resource_pack",children:"wiki page"}),"\nin order to understand the concept and structure before proceeding to the rest of this page."]}),"\n",(0,o.jsx)(t.h2,{id:"registering-a-slot-texture",children:"Registering a Slot Texture"}),"\n",(0,o.jsx)(t.hr,{}),"\n",(0,o.jsxs)(t.p,{children:["Create a new resource directory ",(0,o.jsx)(t.code,{children:"assets/(namespace)/textures/slot"})," and place any ",(0,o.jsx)(t.code,{children:".png"})," file in the ",(0,o.jsx)(t.code,{children:"slot"})," folder."]}),"\n",(0,o.jsxs)(t.admonition,{type:"info",children:[(0,o.jsx)(t.p,{children:"The image itself should be 16x16 in size and have a transparent background with only the slot texture drawn."}),(0,o.jsxs)(t.p,{children:["Example: ",(0,o.jsx)(t.img,{src:"https://github.com/TheIllusiveC4/Curios/blob/1.16.x-forge/src/main/resources/assets/curios/textures/item/empty_back_slot.png?raw=true",alt:""})]})]}),"\n",(0,o.jsx)(t.admonition,{type:"note",children:(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"(namespace)"})," field should be replaced by the namespace chosen for this portion of the resource pack. If this is a\npart of a mod, the namespace is usually the mod ID. If this is part of a user-defined resource pack, then the namespace\ncan be anything that is lowercased with no special characters."]})}),"\n",(0,o.jsx)(t.h2,{id:"using-a-slot-texture",children:"Using a Slot Texture"}),"\n",(0,o.jsx)(t.hr,{}),"\n",(0,o.jsxs)(t.p,{children:["When entering the fields of the ",(0,o.jsx)(t.code,{children:".json"})," slot registration files as described in ",(0,o.jsx)(t.a,{href:"./slot-register",children:"Register a Slot Type"}),",\nthe ",(0,o.jsx)(t.code,{children:'"icon"'})," field should be set to the path of the slot that was added to the resource directory."]}),"\n",(0,o.jsxs)(t.p,{children:["For example, a ",(0,o.jsx)(t.code,{children:"empty_test_slot.png"})," file placed in ",(0,o.jsx)(t.code,{children:"assets/test/textures/slot"})," that wants to be added to the ",(0,o.jsx)(t.code,{children:"charm"}),"\nslot should have a ",(0,o.jsx)(t.code,{children:"charm.json"})," slot registration file in a datapack with the following contents:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-json",children:'{\n "icon": "test:slot/empty_test_slot"\n}\n'})}),"\n",(0,o.jsx)(t.admonition,{type:"caution",children:(0,o.jsxs)(t.p,{children:["Note that the path in ",(0,o.jsx)(t.code,{children:'"icon"'})," is not the entire path of the directory. It omits the ",(0,o.jsx)(t.code,{children:"texture"})," part and also omits the\n",(0,o.jsx)(t.code,{children:".png"})," extension. This is due to how Curios and Minecraft parses the icon, so make sure the path is formatted correctly\nwhen adding this field."]})})]})}function h(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},1151:(e,t,s)=>{s.d(t,{Z:()=>a,a:()=>i});var o=s(7294);const r={},n=o.createContext(r);function i(e){const t=o.useContext(n);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e0b249dc.e7365bbb.js b/assets/js/e0b249dc.e7365bbb.js deleted file mode 100644 index 9128b69..0000000 --- a/assets/js/e0b249dc.e7365bbb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[420],{1439:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>n,metadata:()=>a,toc:()=>l});var o=s(5893),r=s(1151);const n={sidebar_position:9},i="Slot Icon Textures",a={id:"curios/slots/slot-textures",title:"Slot Icon Textures",description:"A tutorial on how to add custom slot textures to slot types.",source:"@site/docs/curios/slots/slot-textures.md",sourceDirName:"curios/slots",slug:"/curios/slots/slot-textures",permalink:"/curios/slots/slot-textures",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slots/slot-textures.md",tags:[],version:"current",sidebarPosition:9,frontMatter:{sidebar_position:9},sidebar:"tutorialSidebar",previous:{title:"Preset Slot Types",permalink:"/curios/slots/preset-slots"},next:{title:"Slot Modifiers",permalink:"/curios/slots/slot-modifiers"}},c={},l=[{value:"Overview",id:"overview",level:2},{value:"Registering a Slot Texture",id:"registering-a-slot-texture",level:2},{value:"Using a Slot Texture",id:"using-a-slot-texture",level:2}];function d(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",hr:"hr",img:"img",p:"p",pre:"pre",...(0,r.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"slot-icon-textures",children:"Slot Icon Textures"}),"\n",(0,o.jsx)(t.p,{children:"A tutorial on how to add custom slot textures to slot types."}),"\n",(0,o.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(t.hr,{}),"\n",(0,o.jsxs)(t.p,{children:["Registering a new custom slot texture can be done through a resource pack. If you are\nunfamiliar with resource packs, it is recommended to read through the ",(0,o.jsx)(t.a,{href:"https://minecraft.fandom.com/wiki/Resource_pack",children:"wiki page"}),"\nin order to understand the concept and structure before proceeding to the rest of this page."]}),"\n",(0,o.jsx)(t.h2,{id:"registering-a-slot-texture",children:"Registering a Slot Texture"}),"\n",(0,o.jsx)(t.hr,{}),"\n",(0,o.jsxs)(t.p,{children:["Create a new resource directory ",(0,o.jsx)(t.code,{children:"assets/(namespace)/textures/slot"})," and place any ",(0,o.jsx)(t.code,{children:".png"})," file in the ",(0,o.jsx)(t.code,{children:"slot"})," folder."]}),"\n",(0,o.jsxs)(t.admonition,{type:"info",children:[(0,o.jsx)(t.p,{children:"The image itself should be 16x16 in size and have a transparent background with only the slot texture drawn."}),(0,o.jsxs)(t.p,{children:["Example: ",(0,o.jsx)(t.img,{src:"https://github.com/TheIllusiveC4/Curios/blob/1.16.x-forge/src/main/resources/assets/curios/textures/item/empty_back_slot.png?raw=true",alt:""})]})]}),"\n",(0,o.jsx)(t.admonition,{type:"note",children:(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"(namespace)"})," field should be replaced by the namespace chosen for this portion of the resource pack. If this is a\npart of a mod, the namespace is usually the mod ID. If this is part of a user-defined resource pack, then the namespace\ncan be anything that is lowercased with no special characters."]})}),"\n",(0,o.jsx)(t.h2,{id:"using-a-slot-texture",children:"Using a Slot Texture"}),"\n",(0,o.jsx)(t.hr,{}),"\n",(0,o.jsxs)(t.p,{children:["When entering the fields of the ",(0,o.jsx)(t.code,{children:".json"})," slot registration files as described in ",(0,o.jsx)(t.a,{href:"./slot-register",children:"Register a Slot Type"}),",\nthe ",(0,o.jsx)(t.code,{children:'"icon"'})," field should be set to the path of the slot that was added to the resource directory."]}),"\n",(0,o.jsxs)(t.p,{children:["For example, a ",(0,o.jsx)(t.code,{children:"empty_test_slot.png"})," file placed in ",(0,o.jsx)(t.code,{children:"assets/test/textures/slot"})," that wants to be added to the ",(0,o.jsx)(t.code,{children:"charm"}),"\nslot should have a ",(0,o.jsx)(t.code,{children:"charm.json"})," slot registration file in a datapack with the following contents:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-json",children:'{\n "icon": "test:slot/empty_test_slot"\n}\n'})}),"\n",(0,o.jsx)(t.admonition,{type:"caution",children:(0,o.jsxs)(t.p,{children:["Note that the path in ",(0,o.jsx)(t.code,{children:'"icon"'})," is not the entire path of the directory. It omits the ",(0,o.jsx)(t.code,{children:"texture"})," part and also omits the\n",(0,o.jsx)(t.code,{children:".png"})," extension. This is due to how Curios and Minecraft parses the icon, so make sure the path is formatted correctly\nwhen adding this field."]})})]})}function h(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},1151:(e,t,s)=>{s.d(t,{Z:()=>a,a:()=>i});var o=s(7294);const r={},n=o.createContext(r);function i(e){const t=o.useContext(n);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e380917f.04410a4d.js b/assets/js/e380917f.04410a4d.js deleted file mode 100644 index 975d2ac..0000000 --- a/assets/js/e380917f.04410a4d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[335],{7515:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>l,contentTitle:()=>r,default:()=>d,frontMatter:()=>s,metadata:()=>a,toc:()=>h});var t=i(5893),o=i(1151);const s={sidebar_position:5},r="Loot",a={id:"champions/loottable",title:"Loot",description:"All champions get their drops from the Champions loot table, which is enabled when the lootSource configuration value in the",source:"@site/versioned_docs/version-1.18.x/champions/loottable.md",sourceDirName:"champions",slug:"/champions/loottable",permalink:"/1.18.x/champions/loottable",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/versioned_docs/version-1.18.x/champions/loottable.md",tags:[],version:"1.18.x",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"tutorialSidebar",previous:{title:"Champions",permalink:"/1.18.x/category/champions"},next:{title:"Commands",permalink:"/1.18.x/champions/commands"}},l={},h=[{value:"Default Loot Table",id:"default-loot-table",level:2},{value:"Loot Condition",id:"loot-condition",level:2},{value:"Fields",id:"fields",level:3},{value:"Examples",id:"examples",level:2}];function c(n){const e={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.a)(),...n.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e.h1,{id:"loot",children:"Loot"}),"\n",(0,t.jsxs)(e.p,{children:["All champions get their drops from the Champions loot table, which is enabled when the ",(0,t.jsx)(e.code,{children:"lootSource"})," configuration value in the\n",(0,t.jsx)(e.code,{children:"champions-server.toml"})," configuration file is set to either ",(0,t.jsx)(e.code,{children:'"LOOT_TABLE"'})," or ",(0,t.jsx)(e.code,{children:'"CONFIG_AND_LOOT_TABLE"'}),"."]}),"\n",(0,t.jsx)(e.admonition,{type:"info",children:(0,t.jsxs)(e.p,{children:["This page does not go over how to set up loot tables in general, it's assumed that the reader has basic knowledge about how to\ncreate and configure loot tables. If this is not the case, please refer to ",(0,t.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Loot_table",children:"this page"}),"\nfirst for an introduction."]})}),"\n",(0,t.jsx)(e.h2,{id:"default-loot-table",children:"Default Loot Table"}),"\n",(0,t.jsx)(e.hr,{}),"\n",(0,t.jsx)(e.p,{children:"By default, Champions provides the following loot table:"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-json",metastring:'title="champion_loot.json"',children:'{\n "pools": [\n {\n "name": "tier#1",\n "rolls": 1,\n "entries": [\n {\n "type": "item",\n "name": "minecraft:book",\n "weight": 1,\n "conditions": [\n {\n "condition": "champions:champion_properties",\n "entity": "this"\n },\n {\n "condition": "killed_by_player"\n }\n ],\n "functions": [\n {\n "function": "enchant_randomly"\n }\n ]\n }\n ]\n },\n {\n "name": "tier#2",\n "rolls": 1,\n "entries": [\n {\n "type": "item",\n "name": "minecraft:book",\n "weight": 1,\n "conditions": [\n {\n "condition": "champions:champion_properties",\n "entity": "this",\n "tier": {\n "min": 2\n }\n },\n {\n "condition": "killed_by_player"\n }\n ],\n "functions": [\n {\n "function": "enchant_randomly"\n }\n ]\n }\n ]\n },\n {\n "name": "tier#3",\n "rolls": 1,\n "entries": [\n {\n "type": "item",\n "name": "minecraft:book",\n "weight": 1,\n "conditions": [\n {\n "condition": "champions:champion_properties",\n "entity": "this",\n "tier": {\n "min": 3\n }\n },\n {\n "condition": "killed_by_player"\n }\n ],\n "functions": [\n {\n "function": "enchant_randomly"\n }\n ]\n }\n ]\n },\n {\n "name": "tier#4",\n "rolls": 1,\n "entries": [\n {\n "type": "item",\n "name": "minecraft:book",\n "weight": 1,\n "conditions": [\n {\n "condition": "champions:champion_properties",\n "entity": "this",\n "tier": {\n "min": 4\n }\n },\n {\n "condition": "killed_by_player"\n }\n ],\n "functions": [\n {\n "function": "enchant_randomly"\n }\n ]\n }\n ]\n }\n ]\n}\n'})}),"\n",(0,t.jsx)(e.p,{children:"The result is that killing a champion drops a book with a random enchantment, dropping an additional book for each higher rank."}),"\n",(0,t.jsx)(e.h2,{id:"loot-condition",children:"Loot Condition"}),"\n",(0,t.jsx)(e.hr,{}),"\n",(0,t.jsxs)(e.p,{children:["In order to specify loot drops for champions, Champions provides a new loot condition: ",(0,t.jsx)(e.code,{children:'"champions:champion_properties"'}),"."]}),"\n",(0,t.jsx)(e.p,{children:"With this, loot tables can provide conditions for loot drops and specify various properties from Champions such as champion\nrank or affixes that need to be present."}),"\n",(0,t.jsxs)(e.p,{children:["The condition can be added as part of a loot entry's ",(0,t.jsx)(e.code,{children:'"conditions"'})," array:"]}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-json",children:'"conditions": [\n {\n "condition": "champions:champion_properties",\n\t"entity": "this"\n }\n]\n'})}),"\n",(0,t.jsx)(e.p,{children:"The condition, without any other parameters, will pass for any champion entity."}),"\n",(0,t.jsx)(e.h3,{id:"fields",children:"Fields"}),"\n",(0,t.jsx)(e.p,{children:"With additional fields, conditions can be further narrowed down depending on the specific rank or affixes on the champion entity."}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"tier"}),": The tier of the rank of the champion entity. Can be an integer or an object with the following structure:","\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"min"}),": The minimum tier of the rank of the champion entity. Must be equal to or lower than ",(0,t.jsx)(e.strong,{children:"max"}),". If absent, there is no minimum."]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"max"}),": The maximum tier of the rank of the champion entity. Must be equal to or higher than ",(0,t.jsx)(e.strong,{children:"min"}),". If absent, there is no maximum."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"affixes"}),": The affixes on the champion entity. Can be a list of affix identifiers as strings or an object with the following structure:","\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"values"}),": A list of affix identifiers for affixes on the champion entity."]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"matches"}),": The number of affixes from the ",(0,t.jsx)(e.strong,{children:"values"})," list that need to be present. If absent, only one of the affixes from the list need to be present to pass. Can be an integer or an object with the following structure:","\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"min"}),": The minimum number of affixes that need to match. If absent, there is no minimum."]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"max"}),": The maximum number of affixes that need to match. If absent, there is no maximum."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"count"}),": The number of affixes on the champion entity. If absent, any number of affixes will pass. Can be an integer or an object with the following structure:","\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"min"}),": The minimum number of affixes that need to be present. If absent, there is no minimum."]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"max"}),": The maximum number of affixes that need to be present. If absent, there is no maximum."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(e.admonition,{type:"tip",children:(0,t.jsxs)(e.p,{children:["The ",(0,t.jsx)(e.strong,{children:"entity"})," field is the same as the one used for vanilla loot contexts. For further information, please refer to the ",(0,t.jsx)(e.code,{children:'"entity"'})," section\nof ",(0,t.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Loot_table#Loot_context_types",children:"this page"}),"."]})}),"\n",(0,t.jsx)(e.h2,{id:"examples",children:"Examples"}),"\n",(0,t.jsx)(e.hr,{}),"\n",(0,t.jsx)(e.p,{children:"A condition that will pass if the champion entity is tier 3 or above:"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-json",children:'"conditions": [\n {\n "condition": "champions:champion_properties",\n\t"entity": "this",\n\t"tier": {\n\t "min": 3\n\t}\n }\n]\n'})}),"\n",(0,t.jsx)(e.p,{children:"A condition that will pass if the champion entity is tier 2 and has either the Enkindling affix or the Hasty affix:"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-json",children:'"conditions": [\n {\n "condition": "champions:champion_properties",\n\t"entity": "this",\n\t"tier": 2,\n\t"affixes": ["enkindling", "hasty"]\n }\n]\n'})}),"\n",(0,t.jsx)(e.p,{children:"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:"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-json",children:'"conditions": [\n {\n "condition": "champions:champion_properties",\n\t"entity": "this",\n\t"tier": {\n\t "min": 1,\n\t "max": 3\n\t},\n\t"affixes": {\n\t "values": ["arctic"],\n\t "count": {\n\t "min": 3\n\t }\n\t}\n }\n]\n'})})]})}function d(n={}){const{wrapper:e}={...(0,o.a)(),...n.components};return e?(0,t.jsx)(e,{...n,children:(0,t.jsx)(c,{...n})}):c(n)}},1151:(n,e,i)=>{i.d(e,{Z:()=>a,a:()=>r});var t=i(7294);const o={},s=t.createContext(o);function r(n){const e=t.useContext(s);return t.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function a(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(o):n.components||o:r(n.components),t.createElement(s.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/e380917f.f917c4a9.js b/assets/js/e380917f.f917c4a9.js new file mode 100644 index 0000000..6dc7f9b --- /dev/null +++ b/assets/js/e380917f.f917c4a9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[2335],{7515:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>l,contentTitle:()=>r,default:()=>d,frontMatter:()=>s,metadata:()=>a,toc:()=>h});var t=i(5893),o=i(1151);const s={sidebar_position:5},r="Loot",a={id:"champions/loottable",title:"Loot",description:"All champions get their drops from the Champions loot table, which is enabled when the lootSource configuration value in the",source:"@site/versioned_docs/version-1.18.x/champions/loottable.md",sourceDirName:"champions",slug:"/champions/loottable",permalink:"/1.18.x/champions/loottable",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/versioned_docs/version-1.18.x/champions/loottable.md",tags:[],version:"1.18.x",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"tutorialSidebar",previous:{title:"Champions",permalink:"/1.18.x/category/champions"},next:{title:"Commands",permalink:"/1.18.x/champions/commands"}},l={},h=[{value:"Default Loot Table",id:"default-loot-table",level:2},{value:"Loot Condition",id:"loot-condition",level:2},{value:"Fields",id:"fields",level:3},{value:"Examples",id:"examples",level:2}];function c(n){const e={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.a)(),...n.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e.h1,{id:"loot",children:"Loot"}),"\n",(0,t.jsxs)(e.p,{children:["All champions get their drops from the Champions loot table, which is enabled when the ",(0,t.jsx)(e.code,{children:"lootSource"})," configuration value in the\n",(0,t.jsx)(e.code,{children:"champions-server.toml"})," configuration file is set to either ",(0,t.jsx)(e.code,{children:'"LOOT_TABLE"'})," or ",(0,t.jsx)(e.code,{children:'"CONFIG_AND_LOOT_TABLE"'}),"."]}),"\n",(0,t.jsx)(e.admonition,{type:"info",children:(0,t.jsxs)(e.p,{children:["This page does not go over how to set up loot tables in general, it's assumed that the reader has basic knowledge about how to\ncreate and configure loot tables. If this is not the case, please refer to ",(0,t.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Loot_table",children:"this page"}),"\nfirst for an introduction."]})}),"\n",(0,t.jsx)(e.h2,{id:"default-loot-table",children:"Default Loot Table"}),"\n",(0,t.jsx)(e.hr,{}),"\n",(0,t.jsx)(e.p,{children:"By default, Champions provides the following loot table:"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-json",metastring:'title="champion_loot.json"',children:'{\n "pools": [\n {\n "name": "tier#1",\n "rolls": 1,\n "entries": [\n {\n "type": "item",\n "name": "minecraft:book",\n "weight": 1,\n "conditions": [\n {\n "condition": "champions:champion_properties",\n "entity": "this"\n },\n {\n "condition": "killed_by_player"\n }\n ],\n "functions": [\n {\n "function": "enchant_randomly"\n }\n ]\n }\n ]\n },\n {\n "name": "tier#2",\n "rolls": 1,\n "entries": [\n {\n "type": "item",\n "name": "minecraft:book",\n "weight": 1,\n "conditions": [\n {\n "condition": "champions:champion_properties",\n "entity": "this",\n "tier": {\n "min": 2\n }\n },\n {\n "condition": "killed_by_player"\n }\n ],\n "functions": [\n {\n "function": "enchant_randomly"\n }\n ]\n }\n ]\n },\n {\n "name": "tier#3",\n "rolls": 1,\n "entries": [\n {\n "type": "item",\n "name": "minecraft:book",\n "weight": 1,\n "conditions": [\n {\n "condition": "champions:champion_properties",\n "entity": "this",\n "tier": {\n "min": 3\n }\n },\n {\n "condition": "killed_by_player"\n }\n ],\n "functions": [\n {\n "function": "enchant_randomly"\n }\n ]\n }\n ]\n },\n {\n "name": "tier#4",\n "rolls": 1,\n "entries": [\n {\n "type": "item",\n "name": "minecraft:book",\n "weight": 1,\n "conditions": [\n {\n "condition": "champions:champion_properties",\n "entity": "this",\n "tier": {\n "min": 4\n }\n },\n {\n "condition": "killed_by_player"\n }\n ],\n "functions": [\n {\n "function": "enchant_randomly"\n }\n ]\n }\n ]\n }\n ]\n}\n'})}),"\n",(0,t.jsx)(e.p,{children:"The result is that killing a champion drops a book with a random enchantment, dropping an additional book for each higher rank."}),"\n",(0,t.jsx)(e.h2,{id:"loot-condition",children:"Loot Condition"}),"\n",(0,t.jsx)(e.hr,{}),"\n",(0,t.jsxs)(e.p,{children:["In order to specify loot drops for champions, Champions provides a new loot condition: ",(0,t.jsx)(e.code,{children:'"champions:champion_properties"'}),"."]}),"\n",(0,t.jsx)(e.p,{children:"With this, loot tables can provide conditions for loot drops and specify various properties from Champions such as champion\nrank or affixes that need to be present."}),"\n",(0,t.jsxs)(e.p,{children:["The condition can be added as part of a loot entry's ",(0,t.jsx)(e.code,{children:'"conditions"'})," array:"]}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-json",children:'"conditions": [\n {\n "condition": "champions:champion_properties",\n\t"entity": "this"\n }\n]\n'})}),"\n",(0,t.jsx)(e.p,{children:"The condition, without any other parameters, will pass for any champion entity."}),"\n",(0,t.jsx)(e.h3,{id:"fields",children:"Fields"}),"\n",(0,t.jsx)(e.p,{children:"With additional fields, conditions can be further narrowed down depending on the specific rank or affixes on the champion entity."}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"tier"}),": The tier of the rank of the champion entity. Can be an integer or an object with the following structure:","\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"min"}),": The minimum tier of the rank of the champion entity. Must be equal to or lower than ",(0,t.jsx)(e.strong,{children:"max"}),". If absent, there is no minimum."]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"max"}),": The maximum tier of the rank of the champion entity. Must be equal to or higher than ",(0,t.jsx)(e.strong,{children:"min"}),". If absent, there is no maximum."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"affixes"}),": The affixes on the champion entity. Can be a list of affix identifiers as strings or an object with the following structure:","\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"values"}),": A list of affix identifiers for affixes on the champion entity."]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"matches"}),": The number of affixes from the ",(0,t.jsx)(e.strong,{children:"values"})," list that need to be present. If absent, only one of the affixes from the list need to be present to pass. Can be an integer or an object with the following structure:","\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"min"}),": The minimum number of affixes that need to match. If absent, there is no minimum."]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"max"}),": The maximum number of affixes that need to match. If absent, there is no maximum."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"count"}),": The number of affixes on the champion entity. If absent, any number of affixes will pass. Can be an integer or an object with the following structure:","\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"min"}),": The minimum number of affixes that need to be present. If absent, there is no minimum."]}),"\n",(0,t.jsxs)(e.li,{children:[(0,t.jsx)(e.strong,{children:"max"}),": The maximum number of affixes that need to be present. If absent, there is no maximum."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(e.admonition,{type:"tip",children:(0,t.jsxs)(e.p,{children:["The ",(0,t.jsx)(e.strong,{children:"entity"})," field is the same as the one used for vanilla loot contexts. For further information, please refer to the ",(0,t.jsx)(e.code,{children:'"entity"'})," section\nof ",(0,t.jsx)(e.a,{href:"https://minecraft.fandom.com/wiki/Loot_table#Loot_context_types",children:"this page"}),"."]})}),"\n",(0,t.jsx)(e.h2,{id:"examples",children:"Examples"}),"\n",(0,t.jsx)(e.hr,{}),"\n",(0,t.jsx)(e.p,{children:"A condition that will pass if the champion entity is tier 3 or above:"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-json",children:'"conditions": [\n {\n "condition": "champions:champion_properties",\n\t"entity": "this",\n\t"tier": {\n\t "min": 3\n\t}\n }\n]\n'})}),"\n",(0,t.jsx)(e.p,{children:"A condition that will pass if the champion entity is tier 2 and has either the Enkindling affix or the Hasty affix:"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-json",children:'"conditions": [\n {\n "condition": "champions:champion_properties",\n\t"entity": "this",\n\t"tier": 2,\n\t"affixes": ["enkindling", "hasty"]\n }\n]\n'})}),"\n",(0,t.jsx)(e.p,{children:"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:"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-json",children:'"conditions": [\n {\n "condition": "champions:champion_properties",\n\t"entity": "this",\n\t"tier": {\n\t "min": 1,\n\t "max": 3\n\t},\n\t"affixes": {\n\t "values": ["arctic"],\n\t "count": {\n\t "min": 3\n\t }\n\t}\n }\n]\n'})})]})}function d(n={}){const{wrapper:e}={...(0,o.a)(),...n.components};return e?(0,t.jsx)(e,{...n,children:(0,t.jsx)(c,{...n})}):c(n)}},1151:(n,e,i)=>{i.d(e,{Z:()=>a,a:()=>r});var t=i(7294);const o={},s=t.createContext(o);function r(n){const e=t.useContext(s);return t.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function a(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(o):n.components||o:r(n.components),t.createElement(s.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/e7ff71d3.090df001.js b/assets/js/e7ff71d3.090df001.js new file mode 100644 index 0000000..9d5e9ba --- /dev/null +++ b/assets/js/e7ff71d3.090df001.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[9821],{3792:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>m,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var n=i(5893),r=i(1151),o=i(4866),a=i(5162);const s={sidebar_position:2},l="Creating a Curio",c={id:"curios/items/curio-creation",title:"Creating a Curio",description:"A tutorial on how to attach curio capabilities to your items.",source:"@site/docs/curios/items/curio-creation.mdx",sourceDirName:"curios/items",slug:"/curios/items/curio-creation",permalink:"/curios/items/curio-creation",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/items/curio-creation.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Items",permalink:"/category/items"},next:{title:"Assigning Slots",permalink:"/curios/items/assign-slots"}},u={},d=[{value:"Overview",id:"overview",level:2},{value:"Attaching an ICurio
capability",id:"attaching-an-icurio-capability",level:2},{value:"Implementing theICurioItem
interface",id:"implementing-the-icurioitem-interface",level:2},{value:"Registering anICurioItem
implementation",id:"registering-an-icurioitem-implementation",level:2},{value:"Priority",id:"priority",level:2}];function h(e){const t={admonition:"admonition",code:"code",h1:"h1",h2:"h2",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"creating-a-curio",children:"Creating a Curio"}),"\n",(0,n.jsx)(t.p,{children:"A tutorial on how to attach curio capabilities to your items."}),"\n",(0,n.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsx)(t.p,{children:"Curios comes with interfaces that you can attach to your items in order to define certain behaviors for those items when\ninteracting with curios slots. This includes events such as ticking while in a curio slot or triggering certain actions\nwhen equipped or unequipped into a curio slot."}),"\n",(0,n.jsxs)(t.p,{children:["There are three main ways to implement the capability on your item: directly attaching an ",(0,n.jsx)(t.code,{children:"ICurio"})," implementation as a\ncapability, extending the ",(0,n.jsx)(t.code,{children:"ICurioItem"})," interface on your item, or registering an ",(0,n.jsx)(t.code,{children:"ICurioItem"})," implementation to an item."]}),"\n",(0,n.jsxs)(t.p,{children:["Only ",(0,n.jsx)(t.strong,{children:"one"})," of these methods needs to be implemented for the curio item to work."]}),"\n",(0,n.jsxs)(t.h2,{id:"attaching-an-icurio-capability",children:["Attaching an ",(0,n.jsx)(t.code,{children:"ICurio"})," capability"]}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsxs)(o.Z,{groupId:"modloader",children:[(0,n.jsxs)(a.Z,{value:"forge",label:"Forge",default:!0,children:[(0,n.jsx)(t.p,{children:"This is recommended for mods that are Forge-oriented, due to the use of capabilities, and want to attach the\ncapability optionally to their own items or another mod's items."}),(0,n.jsxs)(t.p,{children:["To attach the capability to your own items, override the ",(0,n.jsx)(t.code,{children:"IForgeItem#initCapabilities"})," method:"]}),(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:"@Override\npublic ICapabilityProvider initCapabilities(ItemStack stack, CompoundTag unused) {\n return CuriosApi.createCurioProvider(new ICurio() {\n \n @Override\n public ItemStack getStack() {\n return stack;\n }\n\n @Override\n public void curioTick(SlotContext slotContext) {\n // ticking logic here\n }\n });\n}\n"})}),(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"ICurio"})," implementation in the example can be replaced or extended by your own custom implementation. The\nimplementation can also exist in a separate class altogether as long as the instantiation is still done in the\n",(0,n.jsx)(t.code,{children:"IForgeItem#initCapabilities"})," method."]}),(0,n.jsxs)(t.p,{children:["To attach the capability to any item, including vanilla's and other mods', subscribe to the\n",(0,n.jsx)(t.code,{children:"AttachCapabilitiesEvent"})," and use its methods:"]}),(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:"@SubscribeEvent\npublic void attachCapabilities(AttachCapabilitiesEvent evt) {\n ItemStack stack = evt.getObject();\n Item item = stack.getItem();\n evt.addCapability(CuriosCapability.ID_ITEM, CuriosApi.createCurioProvider(new ICurio() {\n \n @Override\n public ItemStack getStack() {\n return stack;\n }\n \n @Override\n public void curioTick(SlotContext slotContext) {\n // ticking logic here\n }\n }));\n}\n"})}),(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsxs)(t.p,{children:["You will need to pass in the ",(0,n.jsx)(t.code,{children:"ItemStack"})," from the ",(0,n.jsx)(t.code,{children:"IForgeItem#initCapabilities"})," argument or the\n",(0,n.jsx)(t.code,{children:"AttachCapabilitiesEvent#getObject"})," result to the return of ",(0,n.jsx)(t.code,{children:"ICurio#getStack"})," as shown in the example. This makes sure\nthat the implementation receives the correct ",(0,n.jsx)(t.code,{children:"ItemStack"})," for further curios logic. Technically, ",(0,n.jsx)(t.code,{children:"ICurio#getStack"})," can\nreturn any stack if proxies are needed, but the use-case for that is outside the scope of this documentation."]})})]}),(0,n.jsxs)(a.Z,{value:"neoforge-2",label:"NeoForge 1.20.3+",default:!0,children:[(0,n.jsx)(t.p,{children:"This is recommended for mods that are NeoForge-oriented, due to the use of capabilities, and want to attach the\ncapability optionally to their own items or another mod's items."}),(0,n.jsxs)(t.p,{children:["To attach the capability to any item, including vanilla's and other mods', subscribe to the\n",(0,n.jsx)(t.code,{children:"RegisterCapabilitiesEvent"})," on the mod event bus and use its methods:"]}),(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'@Mod("examplemod")\npublic class ExampleMod {\n\n public ExampleMod(IEventBus modEventBus) {\n modEventBus.addListener(this::registerCapabilities);\n }\n\n public void registerCapabilities(final RegisterCapabilitiesEvent evt) {\n evt.registerItem(\n CuriosCapability.ITEM,\n (stack, context) -> new ICurio() {\n\n @Override\n public ItemStack getStack() {\n return stack;\n }\n\n @Override\n public void curioTick(SlotContext slotContext) {\n // ticking logic here\n },\n ExampleMod.ITEM);\n }\n'})}),(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"ICurio"})," implementation in the example can be replaced or extended by your own custom implementation."]}),(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsxs)(t.p,{children:["You will need to pass in the ",(0,n.jsx)(t.code,{children:"ItemStack"})," from the ",(0,n.jsx)(t.code,{children:"(stack, context)"})," lambda in the ",(0,n.jsx)(t.code,{children:"RegisterCapabilitiesEvent#registerItem"}),"\nmethod to the return of ",(0,n.jsx)(t.code,{children:"ICurio#getStack"})," as shown in the example. This makes sure that the implementation receives the\ncorrect ",(0,n.jsx)(t.code,{children:"ItemStack"})," for further curios logic. Technically, ",(0,n.jsx)(t.code,{children:"ICurio#getStack"})," can return any stack if proxies are needed,\nbut the use-case for that is outside the scope of this documentation."]})})]})]}),"\n",(0,n.jsxs)(t.h2,{id:"implementing-the-icurioitem-interface",children:["Implementing the ",(0,n.jsx)(t.code,{children:"ICurioItem"})," interface"]}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsx)(t.p,{children:"This is recommended for mods that want the simplest and most straightforward method, do not mind having Curios as a\nrequired dependency, and are only working with their own items."}),"\n",(0,n.jsxs)(t.p,{children:["To implement the ",(0,n.jsx)(t.code,{children:"ICurioItem"})," interface, simply implement it on your item class:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:"public class CurioItem extends Item implements ICurioItem {\n\n public CurioItem() {\n super(new Item.Properties().stacksTo(1).defaultDurability(0));\n }\n\n @Override\n public void curioTick(SlotContext slotContext, ItemStack stack) {\n // ticking logic here\n }\n}\n"})}),"\n",(0,n.jsxs)(t.h2,{id:"registering-an-icurioitem-implementation",children:["Registering an ",(0,n.jsx)(t.code,{children:"ICurioItem"})," implementation"]}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsx)(t.p,{children:"This is recommended for multi-loader mods as a platform-agnostic method of registering Curios behavior to their own\nitems or another mod's items that can be loaded optionally."}),"\n",(0,n.jsxs)(t.p,{children:["To register an ",(0,n.jsx)(t.code,{children:"ICurioItem"})," implementation, first create the implementation:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:"public class CurioItem implements ICurioItem {\n\n @Override\n public void curioTick(SlotContext slotContext, ItemStack stack) {\n // ticking logic here\n }\n}\n"})}),"\n",(0,n.jsxs)(t.p,{children:["And then register it by using ",(0,n.jsx)(t.code,{children:"CurioApi#registerCurio"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:"CuriosApi.registerCurio(CurioModItems.MY_ITEM, new CurioItem());\n"})}),"\n",(0,n.jsxs)(t.p,{children:["Registration can occur at any time, but for simplicity can be called during the ",(0,n.jsx)(t.code,{children:"FMLCommonSetupEvent"})," phase during mod\nloading:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'@Mod("CurioMod")\npublic class CurioMod {\n\n public CurioMod() {\n final IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();\n eventBus.addListener(this::setup);\n }\n\n private void setup(final FMLCommonSetupEvent evt) {\n CuriosApi.registerCurio(CurioModItems.MY_ITEM, new CurioItem());\n }\n}\n'})}),"\n",(0,n.jsx)(t.h2,{id:"priority",children:"Priority"}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsx)(t.p,{children:"In situations where multiple implementations are registered to the same item, there a few things to take note of:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Only one implementation will be used on any one item, any other implementations found will be ignored."}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"ICurio"})," capabilities initialized through ",(0,n.jsx)(t.code,{children:"IForgeItem#initCapabilities"})," will always be prioritized and other\nimplementations will be ignored."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"ICurioItem"})," implementations registered through ",(0,n.jsx)(t.code,{children:"CuriosApi#registerCurio"})," will be prioritized over ",(0,n.jsx)(t.code,{children:"ICurioItem"}),"\nimplementations directly on the item class."]}),"\n"]})]})}function m(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},5162:(e,t,i)=>{i.d(t,{Z:()=>a});i(7294);var n=i(512);const r={tabItem:"tabItem_Ymn6"};var o=i(5893);function a(e){let{children:t,hidden:i,className:a}=e;return(0,o.jsx)("div",{role:"tabpanel",className:(0,n.Z)(r.tabItem,a),hidden:i,children:t})}},4866:(e,t,i)=>{i.d(t,{Z:()=>C});var n=i(7294),r=i(512),o=i(2466),a=i(6550),s=i(469),l=i(1980),c=i(7392),u=i(12);function d(e){return n.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:t,children:i}=e;return(0,n.useMemo)((()=>{const e=t??function(e){return d(e).map((e=>{let{props:{value:t,label:i,attributes:n,default:r}}=e;return{value:t,label:i,attributes:n,default:r}}))}(i);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,i])}function m(e){let{value:t,tabValues:i}=e;return i.some((e=>e.value===t))}function p(e){let{queryString:t=!1,groupId:i}=e;const r=(0,a.k6)(),o=function(e){let{queryString:t=!1,groupId:i}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!i)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return i??null}({queryString:t,groupId:i});return[(0,l._X)(o),(0,n.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function g(e){const{defaultValue:t,queryString:i=!1,groupId:r}=e,o=h(e),[a,l]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:i}=e;if(0===i.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:i}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${i.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=i.find((e=>e.default))??i[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:o}))),[c,d]=p({queryString:i,groupId:r}),[g,b]=function(e){let{groupId:t}=e;const i=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,u.Nk)(i);return[r,(0,n.useCallback)((e=>{i&&o.set(e)}),[i,o])]}({groupId:r}),x=(()=>{const e=c??g;return m({value:e,tabValues:o})?e:null})();(0,s.Z)((()=>{x&&l(x)}),[x]);return{selectedValue:a,selectValue:(0,n.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),d(e),b(e)}),[d,b,o]),tabValues:o}}var b=i(2389);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=i(5893);function f(e){let{className:t,block:i,selectedValue:n,selectValue:a,tabValues:s}=e;const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,o.o5)(),u=e=>{const t=e.currentTarget,i=l.indexOf(t),r=s[i].value;r!==n&&(c(t),a(r))},d=e=>{let t=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const i=l.indexOf(e.currentTarget)+1;t=l[i]??l[0];break}case"ArrowLeft":{const i=l.indexOf(e.currentTarget)-1;t=l[i]??l[l.length-1];break}}t?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":i},t),children:s.map((e=>{let{value:t,label:i,attributes:o}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:n===t?0:-1,"aria-selected":n===t,ref:e=>l.push(e),onKeyDown:d,onClick:u,...o,className:(0,r.Z)("tabs__item",x.tabItem,o?.className,{"tabs__item--active":n===t}),children:i??t},t)}))})}function j(e){let{lazy:t,children:i,selectedValue:r}=e;const o=(Array.isArray(i)?i:[i]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:o.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==r})))})}function I(e){const t=g(e);return(0,v.jsxs)("div",{className:(0,r.Z)("tabs-container",x.tabList),children:[(0,v.jsx)(f,{...e,...t}),(0,v.jsx)(j,{...e,...t})]})}function C(e){const t=(0,b.Z)();return(0,v.jsx)(I,{...e,children:d(e.children)},String(t))}},1151:(e,t,i)=>{i.d(t,{Z:()=>s,a:()=>a});var n=i(7294);const r={},o=n.createContext(r);function a(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e7ff71d3.61d863ad.js b/assets/js/e7ff71d3.61d863ad.js deleted file mode 100644 index 3c719a1..0000000 --- a/assets/js/e7ff71d3.61d863ad.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[821],{3792:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>m,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var n=i(5893),r=i(1151),o=i(4866),a=i(5162);const s={sidebar_position:2},l="Creating a Curio",c={id:"curios/items/curio-creation",title:"Creating a Curio",description:"A tutorial on how to attach curio capabilities to your items.",source:"@site/docs/curios/items/curio-creation.mdx",sourceDirName:"curios/items",slug:"/curios/items/curio-creation",permalink:"/curios/items/curio-creation",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/items/curio-creation.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Items",permalink:"/category/items"},next:{title:"Assigning Slots",permalink:"/curios/items/assign-slots"}},u={},d=[{value:"Overview",id:"overview",level:2},{value:"Attaching an ICurio
capability",id:"attaching-an-icurio-capability",level:2},{value:"Implementing theICurioItem
interface",id:"implementing-the-icurioitem-interface",level:2},{value:"Registering anICurioItem
implementation",id:"registering-an-icurioitem-implementation",level:2},{value:"Priority",id:"priority",level:2}];function h(e){const t={admonition:"admonition",code:"code",h1:"h1",h2:"h2",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"creating-a-curio",children:"Creating a Curio"}),"\n",(0,n.jsx)(t.p,{children:"A tutorial on how to attach curio capabilities to your items."}),"\n",(0,n.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsx)(t.p,{children:"Curios comes with interfaces that you can attach to your items in order to define certain behaviors for those items when\ninteracting with curios slots. This includes events such as ticking while in a curio slot or triggering certain actions\nwhen equipped or unequipped into a curio slot."}),"\n",(0,n.jsxs)(t.p,{children:["There are three main ways to implement the capability on your item: directly attaching an ",(0,n.jsx)(t.code,{children:"ICurio"})," implementation as a\ncapability, extending the ",(0,n.jsx)(t.code,{children:"ICurioItem"})," interface on your item, or registering an ",(0,n.jsx)(t.code,{children:"ICurioItem"})," implementation to an item."]}),"\n",(0,n.jsxs)(t.p,{children:["Only ",(0,n.jsx)(t.strong,{children:"one"})," of these methods needs to be implemented for the curio item to work."]}),"\n",(0,n.jsxs)(t.h2,{id:"attaching-an-icurio-capability",children:["Attaching an ",(0,n.jsx)(t.code,{children:"ICurio"})," capability"]}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsxs)(o.Z,{groupId:"modloader",children:[(0,n.jsxs)(a.Z,{value:"forge",label:"Forge",default:!0,children:[(0,n.jsx)(t.p,{children:"This is recommended for mods that are Forge-oriented, due to the use of capabilities, and want to attach the\ncapability optionally to their own items or another mod's items."}),(0,n.jsxs)(t.p,{children:["To attach the capability to your own items, override the ",(0,n.jsx)(t.code,{children:"IForgeItem#initCapabilities"})," method:"]}),(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:"@Override\npublic ICapabilityProvider initCapabilities(ItemStack stack, CompoundTag unused) {\n return CuriosApi.createCurioProvider(new ICurio() {\n \n @Override\n public ItemStack getStack() {\n return stack;\n }\n\n @Override\n public void curioTick(SlotContext slotContext) {\n // ticking logic here\n }\n });\n}\n"})}),(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"ICurio"})," implementation in the example can be replaced or extended by your own custom implementation. The\nimplementation can also exist in a separate class altogether as long as the instantiation is still done in the\n",(0,n.jsx)(t.code,{children:"IForgeItem#initCapabilities"})," method."]}),(0,n.jsxs)(t.p,{children:["To attach the capability to any item, including vanilla's and other mods', subscribe to the\n",(0,n.jsx)(t.code,{children:"AttachCapabilitiesEvent"})," and use its methods:"]}),(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:"@SubscribeEvent\npublic void attachCapabilities(AttachCapabilitiesEvent evt) {\n ItemStack stack = evt.getObject();\n Item item = stack.getItem();\n evt.addCapability(CuriosCapability.ID_ITEM, CuriosApi.createCurioProvider(new ICurio() {\n \n @Override\n public ItemStack getStack() {\n return stack;\n }\n \n @Override\n public void curioTick(SlotContext slotContext) {\n // ticking logic here\n }\n }));\n}\n"})}),(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsxs)(t.p,{children:["You will need to pass in the ",(0,n.jsx)(t.code,{children:"ItemStack"})," from the ",(0,n.jsx)(t.code,{children:"IForgeItem#initCapabilities"})," argument or the\n",(0,n.jsx)(t.code,{children:"AttachCapabilitiesEvent#getObject"})," result to the return of ",(0,n.jsx)(t.code,{children:"ICurio#getStack"})," as shown in the example. This makes sure\nthat the implementation receives the correct ",(0,n.jsx)(t.code,{children:"ItemStack"})," for further curios logic. Technically, ",(0,n.jsx)(t.code,{children:"ICurio#getStack"})," can\nreturn any stack if proxies are needed, but the use-case for that is outside the scope of this documentation."]})})]}),(0,n.jsxs)(a.Z,{value:"neoforge-2",label:"NeoForge 1.20.3+",default:!0,children:[(0,n.jsx)(t.p,{children:"This is recommended for mods that are NeoForge-oriented, due to the use of capabilities, and want to attach the\ncapability optionally to their own items or another mod's items."}),(0,n.jsxs)(t.p,{children:["To attach the capability to any item, including vanilla's and other mods', subscribe to the\n",(0,n.jsx)(t.code,{children:"RegisterCapabilitiesEvent"})," on the mod event bus and use its methods:"]}),(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'@Mod("examplemod")\npublic class ExampleMod {\n\n public ExampleMod(IEventBus modEventBus) {\n modEventBus.addListener(this::registerCapabilities);\n }\n\n public void registerCapabilities(final RegisterCapabilitiesEvent evt) {\n evt.registerItem(\n CuriosCapability.ITEM,\n (stack, context) -> new ICurio() {\n\n @Override\n public ItemStack getStack() {\n return stack;\n }\n\n @Override\n public void curioTick(SlotContext slotContext) {\n // ticking logic here\n },\n ExampleMod.ITEM);\n }\n'})}),(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"ICurio"})," implementation in the example can be replaced or extended by your own custom implementation."]}),(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsxs)(t.p,{children:["You will need to pass in the ",(0,n.jsx)(t.code,{children:"ItemStack"})," from the ",(0,n.jsx)(t.code,{children:"(stack, context)"})," lambda in the ",(0,n.jsx)(t.code,{children:"RegisterCapabilitiesEvent#registerItem"}),"\nmethod to the return of ",(0,n.jsx)(t.code,{children:"ICurio#getStack"})," as shown in the example. This makes sure that the implementation receives the\ncorrect ",(0,n.jsx)(t.code,{children:"ItemStack"})," for further curios logic. Technically, ",(0,n.jsx)(t.code,{children:"ICurio#getStack"})," can return any stack if proxies are needed,\nbut the use-case for that is outside the scope of this documentation."]})})]})]}),"\n",(0,n.jsxs)(t.h2,{id:"implementing-the-icurioitem-interface",children:["Implementing the ",(0,n.jsx)(t.code,{children:"ICurioItem"})," interface"]}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsx)(t.p,{children:"This is recommended for mods that want the simplest and most straightforward method, do not mind having Curios as a\nrequired dependency, and are only working with their own items."}),"\n",(0,n.jsxs)(t.p,{children:["To implement the ",(0,n.jsx)(t.code,{children:"ICurioItem"})," interface, simply implement it on your item class:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:"public class CurioItem extends Item implements ICurioItem {\n\n public CurioItem() {\n super(new Item.Properties().stacksTo(1).defaultDurability(0));\n }\n\n @Override\n public void curioTick(SlotContext slotContext, ItemStack stack) {\n // ticking logic here\n }\n}\n"})}),"\n",(0,n.jsxs)(t.h2,{id:"registering-an-icurioitem-implementation",children:["Registering an ",(0,n.jsx)(t.code,{children:"ICurioItem"})," implementation"]}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsx)(t.p,{children:"This is recommended for multi-loader mods as a platform-agnostic method of registering Curios behavior to their own\nitems or another mod's items that can be loaded optionally."}),"\n",(0,n.jsxs)(t.p,{children:["To register an ",(0,n.jsx)(t.code,{children:"ICurioItem"})," implementation, first create the implementation:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:"public class CurioItem implements ICurioItem {\n\n @Override\n public void curioTick(SlotContext slotContext, ItemStack stack) {\n // ticking logic here\n }\n}\n"})}),"\n",(0,n.jsxs)(t.p,{children:["And then register it by using ",(0,n.jsx)(t.code,{children:"CurioApi#registerCurio"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:"CuriosApi.registerCurio(CurioModItems.MY_ITEM, new CurioItem());\n"})}),"\n",(0,n.jsxs)(t.p,{children:["Registration can occur at any time, but for simplicity can be called during the ",(0,n.jsx)(t.code,{children:"FMLCommonSetupEvent"})," phase during mod\nloading:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-java",children:'@Mod("CurioMod")\npublic class CurioMod {\n\n public CurioMod() {\n final IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();\n eventBus.addListener(this::setup);\n }\n\n private void setup(final FMLCommonSetupEvent evt) {\n CuriosApi.registerCurio(CurioModItems.MY_ITEM, new CurioItem());\n }\n}\n'})}),"\n",(0,n.jsx)(t.h2,{id:"priority",children:"Priority"}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsx)(t.p,{children:"In situations where multiple implementations are registered to the same item, there a few things to take note of:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Only one implementation will be used on any one item, any other implementations found will be ignored."}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"ICurio"})," capabilities initialized through ",(0,n.jsx)(t.code,{children:"IForgeItem#initCapabilities"})," will always be prioritized and other\nimplementations will be ignored."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"ICurioItem"})," implementations registered through ",(0,n.jsx)(t.code,{children:"CuriosApi#registerCurio"})," will be prioritized over ",(0,n.jsx)(t.code,{children:"ICurioItem"}),"\nimplementations directly on the item class."]}),"\n"]})]})}function m(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},5162:(e,t,i)=>{i.d(t,{Z:()=>a});i(7294);var n=i(512);const r={tabItem:"tabItem_Ymn6"};var o=i(5893);function a(e){let{children:t,hidden:i,className:a}=e;return(0,o.jsx)("div",{role:"tabpanel",className:(0,n.Z)(r.tabItem,a),hidden:i,children:t})}},4866:(e,t,i)=>{i.d(t,{Z:()=>C});var n=i(7294),r=i(512),o=i(2466),a=i(6550),s=i(469),l=i(1980),c=i(7392),u=i(12);function d(e){return n.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:t,children:i}=e;return(0,n.useMemo)((()=>{const e=t??function(e){return d(e).map((e=>{let{props:{value:t,label:i,attributes:n,default:r}}=e;return{value:t,label:i,attributes:n,default:r}}))}(i);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,i])}function m(e){let{value:t,tabValues:i}=e;return i.some((e=>e.value===t))}function p(e){let{queryString:t=!1,groupId:i}=e;const r=(0,a.k6)(),o=function(e){let{queryString:t=!1,groupId:i}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!i)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return i??null}({queryString:t,groupId:i});return[(0,l._X)(o),(0,n.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function g(e){const{defaultValue:t,queryString:i=!1,groupId:r}=e,o=h(e),[a,l]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:i}=e;if(0===i.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:i}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${i.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=i.find((e=>e.default))??i[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:o}))),[c,d]=p({queryString:i,groupId:r}),[g,b]=function(e){let{groupId:t}=e;const i=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,u.Nk)(i);return[r,(0,n.useCallback)((e=>{i&&o.set(e)}),[i,o])]}({groupId:r}),x=(()=>{const e=c??g;return m({value:e,tabValues:o})?e:null})();(0,s.Z)((()=>{x&&l(x)}),[x]);return{selectedValue:a,selectValue:(0,n.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),d(e),b(e)}),[d,b,o]),tabValues:o}}var b=i(2389);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=i(5893);function f(e){let{className:t,block:i,selectedValue:n,selectValue:a,tabValues:s}=e;const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,o.o5)(),u=e=>{const t=e.currentTarget,i=l.indexOf(t),r=s[i].value;r!==n&&(c(t),a(r))},d=e=>{let t=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const i=l.indexOf(e.currentTarget)+1;t=l[i]??l[0];break}case"ArrowLeft":{const i=l.indexOf(e.currentTarget)-1;t=l[i]??l[l.length-1];break}}t?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":i},t),children:s.map((e=>{let{value:t,label:i,attributes:o}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:n===t?0:-1,"aria-selected":n===t,ref:e=>l.push(e),onKeyDown:d,onClick:u,...o,className:(0,r.Z)("tabs__item",x.tabItem,o?.className,{"tabs__item--active":n===t}),children:i??t},t)}))})}function j(e){let{lazy:t,children:i,selectedValue:r}=e;const o=(Array.isArray(i)?i:[i]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:o.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==r})))})}function I(e){const t=g(e);return(0,v.jsxs)("div",{className:(0,r.Z)("tabs-container",x.tabList),children:[(0,v.jsx)(f,{...e,...t}),(0,v.jsx)(j,{...e,...t})]})}function C(e){const t=(0,b.Z)();return(0,v.jsx)(I,{...e,children:d(e.children)},String(t))}},1151:(e,t,i)=>{i.d(t,{Z:()=>s,a:()=>a});var n=i(7294);const r={},o=n.createContext(r);function a(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f078da08.3034da9c.js b/assets/js/f078da08.3034da9c.js new file mode 100644 index 0000000..2b52746 --- /dev/null +++ b/assets/js/f078da08.3034da9c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[1214],{2010:(e,i,t)=>{t.r(i),t.d(i,{assets:()=>l,contentTitle:()=>d,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>a});var n=t(5893),r=t(1151);const s={sidebar_position:13},d="Data Generation",o={id:"curios/slots/data-generation",title:"Data Generation",description:"A tutorial on how to programmatically generate the Curios data files.",source:"@site/docs/curios/slots/data-generation.md",sourceDirName:"curios/slots",slug:"/curios/slots/data-generation",permalink:"/curios/slots/data-generation",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slots/data-generation.md",tags:[],version:"current",sidebarPosition:13,frontMatter:{sidebar_position:13},sidebar:"tutorialSidebar",previous:{title:"Slot Modifiers",permalink:"/curios/slots/slot-modifiers"},next:{title:"Example Datapack",permalink:"/curios/slots/datapack-example"}},l={},a=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Getting Started",id:"getting-started",level:2},{value:"Slot Generation",id:"slot-generation",level:2},{value:"Example",id:"example",level:3},{value:"Entities Generation",id:"entities-generation",level:2},{value:"Example",id:"example-1",level:3},{value:"Criterion Triggers",id:"criterion-triggers",level:2},{value:"Example",id:"example-2",level:3}];function c(e){const i={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.h1,{id:"data-generation",children:"Data Generation"}),"\n",(0,n.jsx)(i.p,{children:"A tutorial on how to programmatically generate the Curios data files."}),"\n",(0,n.jsx)(i.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,n.jsx)(i.hr,{}),"\n",(0,n.jsxs)(i.p,{children:["The documentation on this page was written with the assumption that readers are already familiar with basic data\ngeneration and its usages. If you are not, please prime yourself by learning about data generation on either ",(0,n.jsx)(i.a,{href:"https://forge.gemwire.uk/wiki/Datageneration",children:"Forge"}),"\nor ",(0,n.jsx)(i.a,{href:"https://docs.neoforged.net/docs/datagen/",children:"NeoForge"})," before proceeding further."]}),"\n",(0,n.jsx)(i.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,n.jsx)(i.hr,{}),"\n",(0,n.jsxs)(i.p,{children:["Slots and entities can be generated for a mod by constructing a new implementation of the\n",(0,n.jsx)(i.code,{children:"top.theillusivec4.curios.api.CuriosDataProvider"})," class, making sure to override the ",(0,n.jsx)(i.code,{children:"generate"})," method to run the\ngeneration code."]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-java",children:"public class CuriosTestProvider extends CuriosDataProvider {\n\n public CuriosTestProvider(String modId, PackOutput output,\n ExistingFileHelper fileHelper,\n CompletableFuture registries) {\n super(modId, output, fileHelper, registries);\n }\n\n @Override\n public void generate(HolderLookup.Provider registries, ExistingFileHelper fileHelper) {\n // Generation code here\n }\n}\n"})}),"\n",(0,n.jsxs)(i.p,{children:["A new instance of the implementation should be constructed in the ",(0,n.jsx)(i.code,{children:"GatherDataEvent"})," event on the MOD event bus."]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-java",children:'// On the MOD event bus\n@SubscribeEvent\npublic void gatherData(GatherDataEvent event) {\n event.getGenerator().addProvider(\n // Tell generator to run only when server data are generating\n event.includeServer(),\n new CuriosTestProvider(\n "mod_id",\n event.getGenerator().getPackOutput(),\n event.getExistingFileHelper(),\n event.getLookupProvider()\n )\n );\n}\n'})}),"\n",(0,n.jsx)(i.h2,{id:"slot-generation",children:"Slot Generation"}),"\n",(0,n.jsx)(i.hr,{}),"\n",(0,n.jsxs)(i.p,{children:[(0,n.jsx)(i.code,{children:"CuriosDataProvider"})," has a ",(0,n.jsx)(i.code,{children:"createSlot"})," method to facilitate easy data generation of slot types, by taking in an initial\n",(0,n.jsx)(i.code,{children:"String"})," identifier/file name and allowing developers to chain additional parameters as needed."]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-java",children:'@Override\npublic void generate(HolderLookup.Provider registries, ExistingFileHelper fileHelper) {\n this.createSlot("test_slot"); // Create a slot with the identifier and file name "test_slot"\n}\n'})}),"\n",(0,n.jsxs)(i.p,{children:["Additional parameters can be added by calling methods on the ",(0,n.jsx)(i.code,{children:"ISlotData"})," returned by the ",(0,n.jsx)(i.code,{children:"createSlot"})," method call. Most\nof these parameters are linked to fields for ",(0,n.jsx)(i.code,{children:"ISlotType"}),", more information on how these fields are constructed and what\nthey represent can be found on the page for ",(0,n.jsx)(i.a,{href:"/curios/slots/slot-register#-syntax",children:"slot registration"}),"."]}),"\n",(0,n.jsxs)(i.table,{children:[(0,n.jsx)(i.thead,{children:(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.th,{children:"Method"}),(0,n.jsx)(i.th,{children:"Parameters"}),(0,n.jsx)(i.th,{children:"Field"})]})}),(0,n.jsxs)(i.tbody,{children:[(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"replace"})}),(0,n.jsx)(i.td,{children:"boolean"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"replace"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"size"})}),(0,n.jsx)(i.td,{children:"integer"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"size"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"operation"})}),(0,n.jsx)(i.td,{children:"string"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"operation"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"order"})}),(0,n.jsx)(i.td,{children:"integer"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"order"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"icon"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"ResourceLocation"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"icon"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"addCosmetic"})}),(0,n.jsx)(i.td,{children:"boolean"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"add_cosmetic"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"useNativeGui"})}),(0,n.jsx)(i.td,{children:"boolean"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"use_native_gui"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"renderToggle"})}),(0,n.jsx)(i.td,{children:"boolean"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"render_toggle"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"dropRule"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"ICurio$DropRule"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"drop_rule"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"addCondition"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"ICondition"})}),(0,n.jsx)(i.td,{children:"N/A"})]})]})]}),"\n",(0,n.jsx)(i.h3,{id:"example",children:"Example"}),"\n",(0,n.jsxs)(i.p,{children:["The following example creates a slot file with the file name and identifier ",(0,n.jsx)(i.code,{children:"test_slot"}),", gives it a size of ",(0,n.jsx)(i.code,{children:"4"}),", sets the\ndrop rule to ",(0,n.jsx)(i.code,{children:'"ALWAYS_KEEP"'})," so that it is never dropped upon death, and gives it a cosmetic slot by setting ",(0,n.jsx)(i.code,{children:"addCosmetic"}),"\nto ",(0,n.jsx)(i.code,{children:"true"}),"."]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-java",children:'@Override\npublic void generate(HolderLookup.Provider registries, ExistingFileHelper fileHelper) {\n this.createSlot("test_slot")\n .size(4)\n .dropRule(ICurio.DropRule.ALWAYS_KEEP)\n .addCosmetic(true);\n}\n'})}),"\n",(0,n.jsx)(i.h2,{id:"entities-generation",children:"Entities Generation"}),"\n",(0,n.jsx)(i.hr,{}),"\n",(0,n.jsxs)(i.p,{children:[(0,n.jsx)(i.code,{children:"CuriosDataProvider"})," has a ",(0,n.jsx)(i.code,{children:"createEntities"})," method to facilitate easy data generation of adding slot types to entities,\nby taking in an initial ",(0,n.jsx)(i.code,{children:"String"})," file name and allowing developers to chain additional parameters as needed."]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-java",children:'@Override\npublic void generate(HolderLookup.Provider registries, ExistingFileHelper fileHelper) {\n this.createEntities("test_entities"); // Create an entities file with the name "test_entities"\n}\n'})}),"\n",(0,n.jsxs)(i.p,{children:["Additional parameters can be added by calling methods on the ",(0,n.jsx)(i.code,{children:"IEntitiesData"})," returned by the ",(0,n.jsx)(i.code,{children:"createEntities"})," method\ncall. All of these parameters correspond to JSON fields, more information on these can be found on the page for\n",(0,n.jsx)(i.a,{href:"/curios/slots/entity-register#-syntax",children:"entity registration"}),"."]}),"\n",(0,n.jsxs)(i.table,{children:[(0,n.jsx)(i.thead,{children:(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.th,{children:"Method"}),(0,n.jsx)(i.th,{children:"Parameters"}),(0,n.jsx)(i.th,{children:"Field"}),(0,n.jsx)(i.th,{children:"Notes"})]})}),(0,n.jsxs)(i.tbody,{children:[(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"replace"})}),(0,n.jsx)(i.td,{children:"boolean"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"replace"})}),(0,n.jsx)(i.td,{})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"addPlayer"})}),(0,n.jsx)(i.td,{children:"N/A"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"entities"})}),(0,n.jsxs)(i.td,{children:["Adds ",(0,n.jsx)(i.code,{children:'"minecraft:player"'})," to the ",(0,n.jsx)(i.code,{children:"entities"})," array"]})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"addEntities"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"EntityType>[]"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"entities"})}),(0,n.jsx)(i.td,{})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"addSlots"})}),(0,n.jsx)(i.td,{children:"string[]"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"slots"})}),(0,n.jsxs)(i.td,{children:["Adds each string as a slot identifier to the ",(0,n.jsx)(i.code,{children:"slots"})," array"]})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"addCondition"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"ICondition"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"conditions"})}),(0,n.jsx)(i.td,{})]})]})]}),"\n",(0,n.jsx)(i.h3,{id:"example-1",children:"Example"}),"\n",(0,n.jsxs)(i.p,{children:["The following example creates an entities file with the file name ",(0,n.jsx)(i.code,{children:"test_entities"}),", and assigns the ",(0,n.jsx)(i.code,{children:'"head"'}),", ",(0,n.jsx)(i.code,{children:'"ring"'}),",\nand ",(0,n.jsx)(i.code,{children:'"necklace"'})," slot types to the ",(0,n.jsx)(i.code,{children:'"minecraft:player"'})," and ",(0,n.jsx)(i.code,{children:'"minecraft:zombie"'})," entities."]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-java",children:'@Override\npublic void generate(HolderLookup.Provider registries, ExistingFileHelper fileHelper) {\n this.createEntities("test_entities")\n .addPlayer()\n .addEntities(EntityType.ZOMBIE)\n .addSlots("head", "ring", "necklace");\n}\n'})}),"\n",(0,n.jsx)(i.h2,{id:"criterion-triggers",children:"Criterion Triggers"}),"\n",(0,n.jsxs)(i.p,{children:["Curios provides several helper methods in the ",(0,n.jsx)(i.code,{children:"top.theillusivec4.curios.api.CuriosTriggers"})," class to generate data\nassociated with criterion triggers used for advancements and other similar files."]}),"\n",(0,n.jsxs)(i.p,{children:["Currently, the only triggers available are ",(0,n.jsx)(i.code,{children:"equip"})," and ",(0,n.jsx)(i.code,{children:"equipAtLocation"})," for triggering when a certain item is equipped\ninto a curio slot."]}),"\n",(0,n.jsx)(i.h3,{id:"example-2",children:"Example"}),"\n",(0,n.jsxs)(i.p,{children:["The following example will create an advancement file, ",(0,n.jsx)(i.code,{children:"curiostest/test"}),", that adds a criteration called ",(0,n.jsx)(i.code,{children:'"test"'}),", that\nis triggered when a ",(0,n.jsx)(i.code,{children:'"minecraft:diamond"'})," item is equipped in the Badlands biome."]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-java",children:'Advancement.Builder.advancement()\n .addCriterion("test",\n CuriosTriggers.equipAtLocation(\n ItemPredicate.Builder.item().of(Items.DIAMOND),\n LocationPredicate.Builder.location().setBiome(Biomes.BADLANDS)))\n .save(saver, new ResourceLocation("curiostest", "test"), existingFileHelper);\n'})})]})}function h(e={}){const{wrapper:i}={...(0,r.a)(),...e.components};return i?(0,n.jsx)(i,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1151:(e,i,t)=>{t.d(i,{Z:()=>o,a:()=>d});var n=t(7294);const r={},s=n.createContext(r);function d(e){const i=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function o(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),n.createElement(s.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f078da08.f2b13b03.js b/assets/js/f078da08.f2b13b03.js deleted file mode 100644 index 7b3eeaa..0000000 --- a/assets/js/f078da08.f2b13b03.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[214],{2010:(e,i,t)=>{t.r(i),t.d(i,{assets:()=>l,contentTitle:()=>d,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>a});var n=t(5893),r=t(1151);const s={sidebar_position:13},d="Data Generation",o={id:"curios/slots/data-generation",title:"Data Generation",description:"A tutorial on how to programmatically generate the Curios data files.",source:"@site/docs/curios/slots/data-generation.md",sourceDirName:"curios/slots",slug:"/curios/slots/data-generation",permalink:"/curios/slots/data-generation",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slots/data-generation.md",tags:[],version:"current",sidebarPosition:13,frontMatter:{sidebar_position:13},sidebar:"tutorialSidebar",previous:{title:"Slot Modifiers",permalink:"/curios/slots/slot-modifiers"},next:{title:"Example Datapack",permalink:"/curios/slots/datapack-example"}},l={},a=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Getting Started",id:"getting-started",level:2},{value:"Slot Generation",id:"slot-generation",level:2},{value:"Example",id:"example",level:3},{value:"Entities Generation",id:"entities-generation",level:2},{value:"Example",id:"example-1",level:3},{value:"Criterion Triggers",id:"criterion-triggers",level:2},{value:"Example",id:"example-2",level:3}];function c(e){const i={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.h1,{id:"data-generation",children:"Data Generation"}),"\n",(0,n.jsx)(i.p,{children:"A tutorial on how to programmatically generate the Curios data files."}),"\n",(0,n.jsx)(i.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,n.jsx)(i.hr,{}),"\n",(0,n.jsxs)(i.p,{children:["The documentation on this page was written with the assumption that readers are already familiar with basic data\ngeneration and its usages. If you are not, please prime yourself by learning about data generation on either ",(0,n.jsx)(i.a,{href:"https://forge.gemwire.uk/wiki/Datageneration",children:"Forge"}),"\nor ",(0,n.jsx)(i.a,{href:"https://docs.neoforged.net/docs/datagen/",children:"NeoForge"})," before proceeding further."]}),"\n",(0,n.jsx)(i.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,n.jsx)(i.hr,{}),"\n",(0,n.jsxs)(i.p,{children:["Slots and entities can be generated for a mod by constructing a new implementation of the\n",(0,n.jsx)(i.code,{children:"top.theillusivec4.curios.api.CuriosDataProvider"})," class, making sure to override the ",(0,n.jsx)(i.code,{children:"generate"})," method to run the\ngeneration code."]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-java",children:"public class CuriosTestProvider extends CuriosDataProvider {\n\n public CuriosTestProvider(String modId, PackOutput output,\n ExistingFileHelper fileHelper,\n CompletableFuture registries) {\n super(modId, output, fileHelper, registries);\n }\n\n @Override\n public void generate(HolderLookup.Provider registries, ExistingFileHelper fileHelper) {\n // Generation code here\n }\n}\n"})}),"\n",(0,n.jsxs)(i.p,{children:["A new instance of the implementation should be constructed in the ",(0,n.jsx)(i.code,{children:"GatherDataEvent"})," event on the MOD event bus."]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-java",children:'// On the MOD event bus\n@SubscribeEvent\npublic void gatherData(GatherDataEvent event) {\n event.getGenerator().addProvider(\n // Tell generator to run only when server data are generating\n event.includeServer(),\n new CuriosTestProvider(\n "mod_id",\n event.getGenerator().getPackOutput(),\n event.getExistingFileHelper(),\n event.getLookupProvider()\n )\n );\n}\n'})}),"\n",(0,n.jsx)(i.h2,{id:"slot-generation",children:"Slot Generation"}),"\n",(0,n.jsx)(i.hr,{}),"\n",(0,n.jsxs)(i.p,{children:[(0,n.jsx)(i.code,{children:"CuriosDataProvider"})," has a ",(0,n.jsx)(i.code,{children:"createSlot"})," method to facilitate easy data generation of slot types, by taking in an initial\n",(0,n.jsx)(i.code,{children:"String"})," identifier/file name and allowing developers to chain additional parameters as needed."]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-java",children:'@Override\npublic void generate(HolderLookup.Provider registries, ExistingFileHelper fileHelper) {\n this.createSlot("test_slot"); // Create a slot with the identifier and file name "test_slot"\n}\n'})}),"\n",(0,n.jsxs)(i.p,{children:["Additional parameters can be added by calling methods on the ",(0,n.jsx)(i.code,{children:"ISlotData"})," returned by the ",(0,n.jsx)(i.code,{children:"createSlot"})," method call. Most\nof these parameters are linked to fields for ",(0,n.jsx)(i.code,{children:"ISlotType"}),", more information on how these fields are constructed and what\nthey represent can be found on the page for ",(0,n.jsx)(i.a,{href:"/curios/slots/slot-register#-syntax",children:"slot registration"}),"."]}),"\n",(0,n.jsxs)(i.table,{children:[(0,n.jsx)(i.thead,{children:(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.th,{children:"Method"}),(0,n.jsx)(i.th,{children:"Parameters"}),(0,n.jsx)(i.th,{children:"Field"})]})}),(0,n.jsxs)(i.tbody,{children:[(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"replace"})}),(0,n.jsx)(i.td,{children:"boolean"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"replace"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"size"})}),(0,n.jsx)(i.td,{children:"integer"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"size"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"operation"})}),(0,n.jsx)(i.td,{children:"string"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"operation"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"order"})}),(0,n.jsx)(i.td,{children:"integer"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"order"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"icon"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"ResourceLocation"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"icon"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"addCosmetic"})}),(0,n.jsx)(i.td,{children:"boolean"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"add_cosmetic"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"useNativeGui"})}),(0,n.jsx)(i.td,{children:"boolean"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"use_native_gui"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"renderToggle"})}),(0,n.jsx)(i.td,{children:"boolean"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"render_toggle"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"dropRule"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"ICurio$DropRule"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"drop_rule"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"addCondition"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"ICondition"})}),(0,n.jsx)(i.td,{children:"N/A"})]})]})]}),"\n",(0,n.jsx)(i.h3,{id:"example",children:"Example"}),"\n",(0,n.jsxs)(i.p,{children:["The following example creates a slot file with the file name and identifier ",(0,n.jsx)(i.code,{children:"test_slot"}),", gives it a size of ",(0,n.jsx)(i.code,{children:"4"}),", sets the\ndrop rule to ",(0,n.jsx)(i.code,{children:'"ALWAYS_KEEP"'})," so that it is never dropped upon death, and gives it a cosmetic slot by setting ",(0,n.jsx)(i.code,{children:"addCosmetic"}),"\nto ",(0,n.jsx)(i.code,{children:"true"}),"."]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-java",children:'@Override\npublic void generate(HolderLookup.Provider registries, ExistingFileHelper fileHelper) {\n this.createSlot("test_slot")\n .size(4)\n .dropRule(ICurio.DropRule.ALWAYS_KEEP)\n .addCosmetic(true);\n}\n'})}),"\n",(0,n.jsx)(i.h2,{id:"entities-generation",children:"Entities Generation"}),"\n",(0,n.jsx)(i.hr,{}),"\n",(0,n.jsxs)(i.p,{children:[(0,n.jsx)(i.code,{children:"CuriosDataProvider"})," has a ",(0,n.jsx)(i.code,{children:"createEntities"})," method to facilitate easy data generation of adding slot types to entities,\nby taking in an initial ",(0,n.jsx)(i.code,{children:"String"})," file name and allowing developers to chain additional parameters as needed."]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-java",children:'@Override\npublic void generate(HolderLookup.Provider registries, ExistingFileHelper fileHelper) {\n this.createEntities("test_entities"); // Create an entities file with the name "test_entities"\n}\n'})}),"\n",(0,n.jsxs)(i.p,{children:["Additional parameters can be added by calling methods on the ",(0,n.jsx)(i.code,{children:"IEntitiesData"})," returned by the ",(0,n.jsx)(i.code,{children:"createEntities"})," method\ncall. All of these parameters correspond to JSON fields, more information on these can be found on the page for\n",(0,n.jsx)(i.a,{href:"/curios/slots/entity-register#-syntax",children:"entity registration"}),"."]}),"\n",(0,n.jsxs)(i.table,{children:[(0,n.jsx)(i.thead,{children:(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.th,{children:"Method"}),(0,n.jsx)(i.th,{children:"Parameters"}),(0,n.jsx)(i.th,{children:"Field"}),(0,n.jsx)(i.th,{children:"Notes"})]})}),(0,n.jsxs)(i.tbody,{children:[(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"replace"})}),(0,n.jsx)(i.td,{children:"boolean"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"replace"})}),(0,n.jsx)(i.td,{})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"addPlayer"})}),(0,n.jsx)(i.td,{children:"N/A"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"entities"})}),(0,n.jsxs)(i.td,{children:["Adds ",(0,n.jsx)(i.code,{children:'"minecraft:player"'})," to the ",(0,n.jsx)(i.code,{children:"entities"})," array"]})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"addEntities"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"EntityType>[]"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"entities"})}),(0,n.jsx)(i.td,{})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"addSlots"})}),(0,n.jsx)(i.td,{children:"string[]"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"slots"})}),(0,n.jsxs)(i.td,{children:["Adds each string as a slot identifier to the ",(0,n.jsx)(i.code,{children:"slots"})," array"]})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"addCondition"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"ICondition"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"conditions"})}),(0,n.jsx)(i.td,{})]})]})]}),"\n",(0,n.jsx)(i.h3,{id:"example-1",children:"Example"}),"\n",(0,n.jsxs)(i.p,{children:["The following example creates an entities file with the file name ",(0,n.jsx)(i.code,{children:"test_entities"}),", and assigns the ",(0,n.jsx)(i.code,{children:'"head"'}),", ",(0,n.jsx)(i.code,{children:'"ring"'}),",\nand ",(0,n.jsx)(i.code,{children:'"necklace"'})," slot types to the ",(0,n.jsx)(i.code,{children:'"minecraft:player"'})," and ",(0,n.jsx)(i.code,{children:'"minecraft:zombie"'})," entities."]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-java",children:'@Override\npublic void generate(HolderLookup.Provider registries, ExistingFileHelper fileHelper) {\n this.createEntities("test_entities")\n .addPlayer()\n .addEntities(EntityType.ZOMBIE)\n .addSlots("head", "ring", "necklace");\n}\n'})}),"\n",(0,n.jsx)(i.h2,{id:"criterion-triggers",children:"Criterion Triggers"}),"\n",(0,n.jsxs)(i.p,{children:["Curios provides several helper methods in the ",(0,n.jsx)(i.code,{children:"top.theillusivec4.curios.api.CuriosTriggers"})," class to generate data\nassociated with criterion triggers used for advancements and other similar files."]}),"\n",(0,n.jsxs)(i.p,{children:["Currently, the only triggers available are ",(0,n.jsx)(i.code,{children:"equip"})," and ",(0,n.jsx)(i.code,{children:"equipAtLocation"})," for triggering when a certain item is equipped\ninto a curio slot."]}),"\n",(0,n.jsx)(i.h3,{id:"example-2",children:"Example"}),"\n",(0,n.jsxs)(i.p,{children:["The following example will create an advancement file, ",(0,n.jsx)(i.code,{children:"curiostest/test"}),", that adds a criteration called ",(0,n.jsx)(i.code,{children:'"test"'}),", that\nis triggered when a ",(0,n.jsx)(i.code,{children:'"minecraft:diamond"'})," item is equipped in the Badlands biome."]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-java",children:'Advancement.Builder.advancement()\n .addCriterion("test",\n CuriosTriggers.equipAtLocation(\n ItemPredicate.Builder.item().of(Items.DIAMOND),\n LocationPredicate.Builder.location().setBiome(Biomes.BADLANDS)))\n .save(saver, new ResourceLocation("curiostest", "test"), existingFileHelper);\n'})})]})}function h(e={}){const{wrapper:i}={...(0,r.a)(),...e.components};return i?(0,n.jsx)(i,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1151:(e,i,t)=>{t.d(i,{Z:()=>o,a:()=>d});var n=t(7294);const r={},s=n.createContext(r);function d(e){const i=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function o(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),n.createElement(s.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f0f42f24.7b9e4e46.js b/assets/js/f0f42f24.7b9e4e46.js new file mode 100644 index 0000000..19d0f3f --- /dev/null +++ b/assets/js/f0f42f24.7b9e4e46.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[9602],{8155:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>l,toc:()=>a});var t=n(5893),i=n(1151);const o={sidebar_position:1},r="Slot Types",l={id:"curios/slots/slot-register",title:"Slot Types",description:"A tutorial on how to register and modify slot types that are recognized by Curios.",source:"@site/docs/curios/slots/slot-register.md",sourceDirName:"curios/slots",slug:"/curios/slots/slot-register",permalink:"/curios/slots/slot-register",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slots/slot-register.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Slots",permalink:"/category/slots"},next:{title:"Entity Slot Types",permalink:"/curios/slots/entity-register"}},d={},a=[{value:"Overview",id:"overview",level:2},{value:"Directory",id:"directory",level:2},{value:"Syntax",id:"syntax",level:2},{value:"replace (boolean)",id:"replace-boolean",level:3},{value:"size (integer)",id:"size-integer",level:3},{value:"operation ( "SET"
|"ADD"
|"REMOVE"
)",id:"operation-setaddremove",level:3},{value:"order (integer)",id:"order-integer",level:3},{value:"icon (string)",id:"icon-string",level:3},{value:"add_cosmetic (boolean)",id:"add_cosmetic-boolean",level:3},{value:"use_native_gui (boolean)",id:"use_native_gui-boolean",level:3},{value:"render_toggle (boolean)",id:"render_toggle-boolean",level:3},{value:"drop_rule ("DEFAULT"
|"ALWAYS_DROP"
|"ALWAYS_KEEP"
|"DESTROY"
)",id:"drop_rule-defaultalways_dropalways_keepdestroy",level:3},{value:"validators (string[])",id:"validators-string",level:3},{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},{value:"Localization",id:"localization",level:2},{value:"Example",id:"example-2",level:3}];function c(e){const s={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.h1,{id:"slot-types",children:"Slot Types"}),"\n",(0,t.jsx)(s.p,{children:"A tutorial on how to register and modify slot types that are recognized by Curios."}),"\n",(0,t.jsx)(s.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsxs)(s.p,{children:["The recommended way to register a slot type is through a datapack. If a user or developer is unfamiliar with datapacks,\nit is recommended to read through the ",(0,t.jsx)(s.a,{href:"https://minecraft.fandom.com/wiki/Data_pack",children:"wiki page"})," in order to understand\nthe concept and structure before proceeding to the rest of this page."]}),"\n",(0,t.jsxs)(s.p,{children:["Alternatively, users can instead choose to use the ",(0,t.jsx)(s.a,{href:"../configuration#slot-configuration",children:"Curios configuration"})," to create\nand modify slot types. There are fewer features than those offered in the datapack method, but some users may find the\nprocess to be more straightforward."]}),"\n",(0,t.jsxs)(s.p,{children:["If using one of the ",(0,t.jsx)(s.a,{href:"./preset-slots",children:"Preset Slot Types"}),", this step can be skipped since Curios natively provides the\nneeded datapack registration."]}),"\n",(0,t.jsxs)(s.admonition,{type:"info",children:[(0,t.jsx)(s.p,{children:(0,t.jsx)(s.strong,{children:"Why are my registered slot types not appearing?"})}),(0,t.jsxs)(s.p,{children:["Registering slot types makes them available for use; however, they are ",(0,t.jsx)(s.em,{children:"not"})," added to any entities (including players)\nby default. In order to add them to an entity, please refer to ",(0,t.jsx)(s.a,{href:"/curios/slots/entity-register",children:"the next step"})," on adding slot\ntypes to entities."]})]}),"\n",(0,t.jsx)(s.h2,{id:"directory",children:"Directory"}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsxs)(s.p,{children:["The file should be a ",(0,t.jsx)(s.code,{children:".json"})," file with the ",(0,t.jsx)(s.code,{children:"identifier"})," for the slot type to be registered as the name. This file\nshould be located in the ",(0,t.jsx)(s.code,{children:"~/data/(namespace)/curios/slots/"})," folder of the datapack."]}),"\n",(0,t.jsxs)(s.p,{children:["Example: Registering a ",(0,t.jsx)(s.code,{children:"head"})," slot type requires creating a ",(0,t.jsx)(s.code,{children:"head.json"})," file located in ",(0,t.jsx)(s.code,{children:"~/data/(namespace)/curios/slots/"}),"\nso the final path should look like ",(0,t.jsx)(s.code,{children:"~/data/(namespace)/curios/slots/head.json"}),"."]}),"\n",(0,t.jsx)(s.admonition,{type:"note",children:(0,t.jsxs)(s.p,{children:["The ",(0,t.jsx)(s.code,{children:"(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."]})}),"\n",(0,t.jsx)(s.h2,{id:"syntax",children:"Syntax"}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsxs)(s.p,{children:["The structure of the ",(0,t.jsx)(s.code,{children:".json"})," file for the slot type consists of a top-level JSON object that holds various fields\nrelated to that slot type."]}),"\n",(0,t.jsx)(s.p,{children:"All fields are optional unless otherwise noted. Each field denotes certain merging behavior which defines how the\nfield is merged between all data files that include it."}),"\n",(0,t.jsxs)(s.h3,{id:"replace-boolean",children:[(0,t.jsx)(s.strong,{children:"replace"})," (boolean)"]}),"\n",(0,t.jsxs)(s.p,{children:["When ",(0,t.jsx)(s.code,{children:"true"}),", replaces data from lower-priority datapacks."]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:"false"})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," N/A"]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"size-integer",children:[(0,t.jsx)(s.strong,{children:"size"})," (integer)"]}),"\n",(0,t.jsx)(s.p,{children:"The number of slots of this slot type to give by default."}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:"1"})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," The highest size will be used."]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"operation-setaddremove",children:[(0,t.jsx)(s.strong,{children:"operation"})," (",(0,t.jsx)(s.code,{children:'"SET"'}),"|",(0,t.jsx)(s.code,{children:'"ADD"'}),"|",(0,t.jsx)(s.code,{children:'"REMOVE"'}),")"]}),"\n",(0,t.jsxs)(s.p,{children:["Whether to use ",(0,t.jsx)(s.code,{children:"size"})," to set, add, or remove from the total number of slots."]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:'"SET"'})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," N/A"]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"order-integer",children:[(0,t.jsx)(s.strong,{children:"order"})," (integer)"]}),"\n",(0,t.jsx)(s.p,{children:"The order the slots will appear in the native Curios GUI, lower numbers appear first."}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:"1000"})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," The lowest order will be used."]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"icon-string",children:[(0,t.jsx)(s.strong,{children:"icon"})," (string)"]}),"\n",(0,t.jsx)(s.p,{children:"The location of the icon to use for the slot type."}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:'"curios:slot/empty_curios_slot"'})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," The last icon will be used."]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"add_cosmetic-boolean",children:[(0,t.jsx)(s.strong,{children:"add_cosmetic"})," (boolean)"]}),"\n",(0,t.jsx)(s.p,{children:"The location of the icon to use for the slot type."}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:"false"})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," ",(0,t.jsx)(s.code,{children:"true"})," if any data file sets this field to ",(0,t.jsx)(s.code,{children:"true"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"use_native_gui-boolean",children:[(0,t.jsx)(s.strong,{children:"use_native_gui"})," (boolean)"]}),"\n",(0,t.jsxs)(s.p,{children:["When ",(0,t.jsx)(s.code,{children:"false"}),", does not add the slot type to the native Curios GUI."]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:"true"})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," ",(0,t.jsx)(s.code,{children:"false"})," if any data file sets this field to ",(0,t.jsx)(s.code,{children:"false"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"render_toggle-boolean",children:[(0,t.jsx)(s.strong,{children:"render_toggle"})," (boolean)"]}),"\n",(0,t.jsxs)(s.p,{children:["When ",(0,t.jsx)(s.code,{children:"false"}),", does not allow the slot type to toggle its rendering."]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:"true"})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," ",(0,t.jsx)(s.code,{children:"false"})," if any data file sets this field to ",(0,t.jsx)(s.code,{children:"false"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"drop_rule-defaultalways_dropalways_keepdestroy",children:[(0,t.jsx)(s.strong,{children:"drop_rule"})," (",(0,t.jsx)(s.code,{children:'"DEFAULT"'}),"|",(0,t.jsx)(s.code,{children:'"ALWAYS_DROP"'}),"|",(0,t.jsx)(s.code,{children:'"ALWAYS_KEEP"'}),"|",(0,t.jsx)(s.code,{children:'"DESTROY"'}),")"]}),"\n",(0,t.jsxs)(s.p,{children:["Whether to drop, keep, destroy, or follow the ",(0,t.jsx)(s.code,{children:"keepCurios"})," configuration setting."]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:'"DEFAULT"'})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," N/A"]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"validators-string",children:[(0,t.jsx)(s.strong,{children:"validators"})," (string[])"]}),"\n",(0,t.jsxs)(s.p,{children:["The list of registered predicates from the Curios API used by this slot type to validate item insertions. For more\ninformation about validators, please see the page on ",(0,t.jsx)(s.a,{href:"../items/assign-slots#validators",children:"slot assignments"}),"."]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:'["curios:tag"]'})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," Each entry is added into the final array."]}),"\n"]}),"\n",(0,t.jsxs)(s.admonition,{type:"info",children:[(0,t.jsx)(s.p,{children:(0,t.jsxs)(s.strong,{children:["Which ",(0,t.jsx)(s.code,{children:"operation"})," value should I use?"]})}),(0,t.jsxs)(s.p,{children:["In most cases, ",(0,t.jsx)(s.code,{children:'"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,t.jsx)(s.code,{children:'"ADD"'}),"and ",(0,t.jsx)(s.code,{children:'"REMOVE"'})," are inherent slot modifiers and are based on the amount of slots specified by all ",(0,t.jsx)(s.code,{children:'"SET"'}),"\noperations, the result of which can change based on the mods/datapacks loaded."]})]}),"\n",(0,t.jsx)(s.h2,{id:"example",children:"Example"}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-json",children:'{\n "order": 20,\n "size": 4,\n "icon": "curios:slot/empty_custom_slot",\n "add_cosmetic": true\n}\n'})}),"\n",(0,t.jsxs)(s.p,{children:["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,t.jsx)(s.code,{children:"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."]}),"\n",(0,t.jsx)(s.h2,{id:"modifying-a-slot-type",children:"Modifying a Slot Type"}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsxs)(s.p,{children:["The process of modifying a slot type is identical to registering a new slot type, except using the same ",(0,t.jsx)(s.code,{children:"identifier"})," as\nthe existing slot type. All slot types that share an ",(0,t.jsx)(s.code,{children:"identifier"})," will be merged according to the ",(0,t.jsx)(s.strong,{children:"Merge Behavior"})," of\neach field as outlined above."]}),"\n",(0,t.jsx)(s.h3,{id:"example-1",children:"Example"}),"\n",(0,t.jsxs)(s.p,{children:["Curios natively provides data for the ",(0,t.jsx)(s.code,{children:"ring"})," slot, which defaults the size to 1. In order to increase the size to 2,\ncreate a ",(0,t.jsx)(s.code,{children:"ring.json"})," slot registration file in the datapack with the contents:"]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-json",children:'{\n "size": 2\n}\n'})}),"\n",(0,t.jsx)(s.p,{children:"This will merge the size data of this registration with the existing registration provided by Curios, keeping all the\nother data intact while increasing the number of slots to 2."}),"\n",(0,t.jsx)(s.h2,{id:"localization",children:"Localization"}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsxs)(s.p,{children:["By default, slot types do not come with localizations for the slot name. Only ",(0,t.jsx)(s.a,{href:"/curios/slots/preset-slots",children:"Preset Slot Types"})," come\nwith native localizations, provided by Curios itself. For other slot types, a resource pack with a language file will\nbe necessary in order to properly localize the slot name. If you are unfamiliar with resource packs, it is recommended\nto read through the ",(0,t.jsx)(s.a,{href:"https://minecraft.wiki/w/Resource_pack",children:"wiki page"})," in order to understand the concept and\nstructure."]}),"\n",(0,t.jsxs)(s.p,{children:["The localization key for slot types follow the format ",(0,t.jsx)(s.code,{children:"curios.identifier.name"})," with ",(0,t.jsx)(s.code,{children:"name"})," being the ",(0,t.jsx)(s.code,{children:"identifier"}),"\nregistered for the slot type. For example, the ",(0,t.jsx)(s.code,{children:"ring"})," slot's localization key would be ",(0,t.jsx)(s.code,{children:"curios.identifier.ring"}),"."]}),"\n",(0,t.jsx)(s.h3,{id:"example-2",children:"Example"}),"\n",(0,t.jsxs)(s.p,{children:["To localize a slot type with the identifier ",(0,t.jsx)(s.code,{children:"custom"})," to the ",(0,t.jsx)(s.code,{children:"en_us"})," localization, a ",(0,t.jsx)(s.code,{children:"assets/(namespace)/lang"})," folder\nneeds to be created in the resource pack with a ",(0,t.jsx)(s.code,{children:"en_us.json"})," inside with the contents:"]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-json",children:'{\n "curios.identifier.custom": "Custom Slot"\n}\n'})})]})}function h(e={}){const{wrapper:s}={...(0,i.a)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},1151:(e,s,n)=>{n.d(s,{Z:()=>l,a:()=>r});var t=n(7294);const i={},o=t.createContext(i);function r(e){const s=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f0f42f24.900f6d9d.js b/assets/js/f0f42f24.900f6d9d.js deleted file mode 100644 index 195c79c..0000000 --- a/assets/js/f0f42f24.900f6d9d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[602],{8155:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>l,toc:()=>a});var t=n(5893),i=n(1151);const o={sidebar_position:1},r="Slot Types",l={id:"curios/slots/slot-register",title:"Slot Types",description:"A tutorial on how to register and modify slot types that are recognized by Curios.",source:"@site/docs/curios/slots/slot-register.md",sourceDirName:"curios/slots",slug:"/curios/slots/slot-register",permalink:"/curios/slots/slot-register",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/slots/slot-register.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Slots",permalink:"/category/slots"},next:{title:"Entity Slot Types",permalink:"/curios/slots/entity-register"}},d={},a=[{value:"Overview",id:"overview",level:2},{value:"Directory",id:"directory",level:2},{value:"Syntax",id:"syntax",level:2},{value:"replace (boolean)",id:"replace-boolean",level:3},{value:"size (integer)",id:"size-integer",level:3},{value:"operation ("SET"
|"ADD"
|"REMOVE"
)",id:"operation-setaddremove",level:3},{value:"order (integer)",id:"order-integer",level:3},{value:"icon (string)",id:"icon-string",level:3},{value:"add_cosmetic (boolean)",id:"add_cosmetic-boolean",level:3},{value:"use_native_gui (boolean)",id:"use_native_gui-boolean",level:3},{value:"render_toggle (boolean)",id:"render_toggle-boolean",level:3},{value:"drop_rule ("DEFAULT"
|"ALWAYS_DROP"
|"ALWAYS_KEEP"
|"DESTROY"
)",id:"drop_rule-defaultalways_dropalways_keepdestroy",level:3},{value:"validators (string[])",id:"validators-string",level:3},{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},{value:"Localization",id:"localization",level:2},{value:"Example",id:"example-2",level:3}];function c(e){const s={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.h1,{id:"slot-types",children:"Slot Types"}),"\n",(0,t.jsx)(s.p,{children:"A tutorial on how to register and modify slot types that are recognized by Curios."}),"\n",(0,t.jsx)(s.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsxs)(s.p,{children:["The recommended way to register a slot type is through a datapack. If a user or developer is unfamiliar with datapacks,\nit is recommended to read through the ",(0,t.jsx)(s.a,{href:"https://minecraft.fandom.com/wiki/Data_pack",children:"wiki page"})," in order to understand\nthe concept and structure before proceeding to the rest of this page."]}),"\n",(0,t.jsxs)(s.p,{children:["Alternatively, users can instead choose to use the ",(0,t.jsx)(s.a,{href:"../configuration#slot-configuration",children:"Curios configuration"})," to create\nand modify slot types. There are fewer features than those offered in the datapack method, but some users may find the\nprocess to be more straightforward."]}),"\n",(0,t.jsxs)(s.p,{children:["If using one of the ",(0,t.jsx)(s.a,{href:"./preset-slots",children:"Preset Slot Types"}),", this step can be skipped since Curios natively provides the\nneeded datapack registration."]}),"\n",(0,t.jsxs)(s.admonition,{type:"info",children:[(0,t.jsx)(s.p,{children:(0,t.jsx)(s.strong,{children:"Why are my registered slot types not appearing?"})}),(0,t.jsxs)(s.p,{children:["Registering slot types makes them available for use; however, they are ",(0,t.jsx)(s.em,{children:"not"})," added to any entities (including players)\nby default. In order to add them to an entity, please refer to ",(0,t.jsx)(s.a,{href:"/curios/slots/entity-register",children:"the next step"})," on adding slot\ntypes to entities."]})]}),"\n",(0,t.jsx)(s.h2,{id:"directory",children:"Directory"}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsxs)(s.p,{children:["The file should be a ",(0,t.jsx)(s.code,{children:".json"})," file with the ",(0,t.jsx)(s.code,{children:"identifier"})," for the slot type to be registered as the name. This file\nshould be located in the ",(0,t.jsx)(s.code,{children:"~/data/(namespace)/curios/slots/"})," folder of the datapack."]}),"\n",(0,t.jsxs)(s.p,{children:["Example: Registering a ",(0,t.jsx)(s.code,{children:"head"})," slot type requires creating a ",(0,t.jsx)(s.code,{children:"head.json"})," file located in ",(0,t.jsx)(s.code,{children:"~/data/(namespace)/curios/slots/"}),"\nso the final path should look like ",(0,t.jsx)(s.code,{children:"~/data/(namespace)/curios/slots/head.json"}),"."]}),"\n",(0,t.jsx)(s.admonition,{type:"note",children:(0,t.jsxs)(s.p,{children:["The ",(0,t.jsx)(s.code,{children:"(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."]})}),"\n",(0,t.jsx)(s.h2,{id:"syntax",children:"Syntax"}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsxs)(s.p,{children:["The structure of the ",(0,t.jsx)(s.code,{children:".json"})," file for the slot type consists of a top-level JSON object that holds various fields\nrelated to that slot type."]}),"\n",(0,t.jsx)(s.p,{children:"All fields are optional unless otherwise noted. Each field denotes certain merging behavior which defines how the\nfield is merged between all data files that include it."}),"\n",(0,t.jsxs)(s.h3,{id:"replace-boolean",children:[(0,t.jsx)(s.strong,{children:"replace"})," (boolean)"]}),"\n",(0,t.jsxs)(s.p,{children:["When ",(0,t.jsx)(s.code,{children:"true"}),", replaces data from lower-priority datapacks."]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:"false"})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," N/A"]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"size-integer",children:[(0,t.jsx)(s.strong,{children:"size"})," (integer)"]}),"\n",(0,t.jsx)(s.p,{children:"The number of slots of this slot type to give by default."}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:"1"})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," The highest size will be used."]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"operation-setaddremove",children:[(0,t.jsx)(s.strong,{children:"operation"})," (",(0,t.jsx)(s.code,{children:'"SET"'}),"|",(0,t.jsx)(s.code,{children:'"ADD"'}),"|",(0,t.jsx)(s.code,{children:'"REMOVE"'}),")"]}),"\n",(0,t.jsxs)(s.p,{children:["Whether to use ",(0,t.jsx)(s.code,{children:"size"})," to set, add, or remove from the total number of slots."]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:'"SET"'})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," N/A"]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"order-integer",children:[(0,t.jsx)(s.strong,{children:"order"})," (integer)"]}),"\n",(0,t.jsx)(s.p,{children:"The order the slots will appear in the native Curios GUI, lower numbers appear first."}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:"1000"})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," The lowest order will be used."]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"icon-string",children:[(0,t.jsx)(s.strong,{children:"icon"})," (string)"]}),"\n",(0,t.jsx)(s.p,{children:"The location of the icon to use for the slot type."}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:'"curios:slot/empty_curios_slot"'})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," The last icon will be used."]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"add_cosmetic-boolean",children:[(0,t.jsx)(s.strong,{children:"add_cosmetic"})," (boolean)"]}),"\n",(0,t.jsx)(s.p,{children:"The location of the icon to use for the slot type."}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:"false"})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," ",(0,t.jsx)(s.code,{children:"true"})," if any data file sets this field to ",(0,t.jsx)(s.code,{children:"true"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"use_native_gui-boolean",children:[(0,t.jsx)(s.strong,{children:"use_native_gui"})," (boolean)"]}),"\n",(0,t.jsxs)(s.p,{children:["When ",(0,t.jsx)(s.code,{children:"false"}),", does not add the slot type to the native Curios GUI."]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:"true"})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," ",(0,t.jsx)(s.code,{children:"false"})," if any data file sets this field to ",(0,t.jsx)(s.code,{children:"false"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"render_toggle-boolean",children:[(0,t.jsx)(s.strong,{children:"render_toggle"})," (boolean)"]}),"\n",(0,t.jsxs)(s.p,{children:["When ",(0,t.jsx)(s.code,{children:"false"}),", does not allow the slot type to toggle its rendering."]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:"true"})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," ",(0,t.jsx)(s.code,{children:"false"})," if any data file sets this field to ",(0,t.jsx)(s.code,{children:"false"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"drop_rule-defaultalways_dropalways_keepdestroy",children:[(0,t.jsx)(s.strong,{children:"drop_rule"})," (",(0,t.jsx)(s.code,{children:'"DEFAULT"'}),"|",(0,t.jsx)(s.code,{children:'"ALWAYS_DROP"'}),"|",(0,t.jsx)(s.code,{children:'"ALWAYS_KEEP"'}),"|",(0,t.jsx)(s.code,{children:'"DESTROY"'}),")"]}),"\n",(0,t.jsxs)(s.p,{children:["Whether to drop, keep, destroy, or follow the ",(0,t.jsx)(s.code,{children:"keepCurios"})," configuration setting."]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:'"DEFAULT"'})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," N/A"]}),"\n"]}),"\n",(0,t.jsxs)(s.h3,{id:"validators-string",children:[(0,t.jsx)(s.strong,{children:"validators"})," (string[])"]}),"\n",(0,t.jsxs)(s.p,{children:["The list of registered predicates from the Curios API used by this slot type to validate item insertions. For more\ninformation about validators, please see the page on ",(0,t.jsx)(s.a,{href:"../items/assign-slots#validators",children:"slot assignments"}),"."]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"default:"})," ",(0,t.jsx)(s.code,{children:'["curios:tag"]'})]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"merging:"})," Each entry is added into the final array."]}),"\n"]}),"\n",(0,t.jsxs)(s.admonition,{type:"info",children:[(0,t.jsx)(s.p,{children:(0,t.jsxs)(s.strong,{children:["Which ",(0,t.jsx)(s.code,{children:"operation"})," value should I use?"]})}),(0,t.jsxs)(s.p,{children:["In most cases, ",(0,t.jsx)(s.code,{children:'"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,t.jsx)(s.code,{children:'"ADD"'}),"and ",(0,t.jsx)(s.code,{children:'"REMOVE"'})," are inherent slot modifiers and are based on the amount of slots specified by all ",(0,t.jsx)(s.code,{children:'"SET"'}),"\noperations, the result of which can change based on the mods/datapacks loaded."]})]}),"\n",(0,t.jsx)(s.h2,{id:"example",children:"Example"}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-json",children:'{\n "order": 20,\n "size": 4,\n "icon": "curios:slot/empty_custom_slot",\n "add_cosmetic": true\n}\n'})}),"\n",(0,t.jsxs)(s.p,{children:["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,t.jsx)(s.code,{children:"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."]}),"\n",(0,t.jsx)(s.h2,{id:"modifying-a-slot-type",children:"Modifying a Slot Type"}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsxs)(s.p,{children:["The process of modifying a slot type is identical to registering a new slot type, except using the same ",(0,t.jsx)(s.code,{children:"identifier"})," as\nthe existing slot type. All slot types that share an ",(0,t.jsx)(s.code,{children:"identifier"})," will be merged according to the ",(0,t.jsx)(s.strong,{children:"Merge Behavior"})," of\neach field as outlined above."]}),"\n",(0,t.jsx)(s.h3,{id:"example-1",children:"Example"}),"\n",(0,t.jsxs)(s.p,{children:["Curios natively provides data for the ",(0,t.jsx)(s.code,{children:"ring"})," slot, which defaults the size to 1. In order to increase the size to 2,\ncreate a ",(0,t.jsx)(s.code,{children:"ring.json"})," slot registration file in the datapack with the contents:"]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-json",children:'{\n "size": 2\n}\n'})}),"\n",(0,t.jsx)(s.p,{children:"This will merge the size data of this registration with the existing registration provided by Curios, keeping all the\nother data intact while increasing the number of slots to 2."}),"\n",(0,t.jsx)(s.h2,{id:"localization",children:"Localization"}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsxs)(s.p,{children:["By default, slot types do not come with localizations for the slot name. Only ",(0,t.jsx)(s.a,{href:"/curios/slots/preset-slots",children:"Preset Slot Types"})," come\nwith native localizations, provided by Curios itself. For other slot types, a resource pack with a language file will\nbe necessary in order to properly localize the slot name. If you are unfamiliar with resource packs, it is recommended\nto read through the ",(0,t.jsx)(s.a,{href:"https://minecraft.wiki/w/Resource_pack",children:"wiki page"})," in order to understand the concept and\nstructure."]}),"\n",(0,t.jsxs)(s.p,{children:["The localization key for slot types follow the format ",(0,t.jsx)(s.code,{children:"curios.identifier.name"})," with ",(0,t.jsx)(s.code,{children:"name"})," being the ",(0,t.jsx)(s.code,{children:"identifier"}),"\nregistered for the slot type. For example, the ",(0,t.jsx)(s.code,{children:"ring"})," slot's localization key would be ",(0,t.jsx)(s.code,{children:"curios.identifier.ring"}),"."]}),"\n",(0,t.jsx)(s.h3,{id:"example-2",children:"Example"}),"\n",(0,t.jsxs)(s.p,{children:["To localize a slot type with the identifier ",(0,t.jsx)(s.code,{children:"custom"})," to the ",(0,t.jsx)(s.code,{children:"en_us"})," localization, a ",(0,t.jsx)(s.code,{children:"assets/(namespace)/lang"})," folder\nneeds to be created in the resource pack with a ",(0,t.jsx)(s.code,{children:"en_us.json"})," inside with the contents:"]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-json",children:'{\n "curios.identifier.custom": "Custom Slot"\n}\n'})})]})}function h(e={}){const{wrapper:s}={...(0,i.a)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},1151:(e,s,n)=>{n.d(s,{Z:()=>l,a:()=>r});var t=n(7294);const i={},o=t.createContext(i);function r(e){const s=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f1e13461.2ea46632.js b/assets/js/f1e13461.2ea46632.js deleted file mode 100644 index e3a5491..0000000 --- a/assets/js/f1e13461.2ea46632.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[83],{1262:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>l,default:()=>v,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var r=t(5893),i=t(1151),s=t(4866),a=t(5162);const o={sidebar_position:1},l="Basic Inventory Management",c={id:"curios/inventory/basic-inventory",title:"Basic Inventory Management",description:"Learn how to access and manage the Curios inventory attached to an entity.",source:"@site/docs/curios/inventory/basic-inventory.mdx",sourceDirName:"curios/inventory",slug:"/curios/inventory/basic-inventory",permalink:"/curios/inventory/basic-inventory",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/inventory/basic-inventory.mdx",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Inventory",permalink:"/category/inventory"},next:{title:"API",permalink:"/category/api"}},u={},d=[{value:"Overview",id:"overview",level:2},{value:"Using the inventory",id:"using-the-inventory",level:2},{value:"Accessing the inventory",id:"accessing-the-inventory",level:2},{value:"Accessing the entire inventory",id:"accessing-the-entire-inventory",level:3},{value:"Accessing an inventory for a slot type",id:"accessing-an-inventory-for-a-slot-type",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",p:"p",pre:"pre",strong:"strong",...(0,i.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"basic-inventory-management",children:"Basic Inventory Management"}),"\n",(0,r.jsx)(n.p,{children:"Learn how to access and manage the Curios inventory attached to an entity."}),"\n",(0,r.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsxs)(n.p,{children:["Each entity that has been assigned any number of slot types based on ",(0,r.jsx)(n.a,{href:"/curios/slots/entity-register",children:"entity registration"}),"\nwill automatically gain a Curios inventory, initialized with a sub-inventory for each slot type that has been assigned.\nThis inventory can be used for a variety of purposes, such as finding out which items are held in the inventory or\nmodifying the number of slots that are in each sub-inventory."]}),"\n",(0,r.jsxs)(n.p,{children:["The interface for the Curios inventory can be found as ",(0,r.jsx)(n.code,{children:"top.theillusivec4.curios.api.type.capability.ICuriosItemHandler"}),",\nwhich holds all of the methods that developers can use to access and manage the inventory."]}),"\n",(0,r.jsx)(n.h2,{id:"using-the-inventory",children:"Using the inventory"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsxs)(n.p,{children:["To begin using the inventory, developers will need to grab the instance associated with each entity. The\n",(0,r.jsx)(n.code,{children:"top.theillusivec4.curios.api.CuriosApi"})," class has a ",(0,r.jsx)(n.code,{children:"getCuriosInventory"})," method that can be used:"]}),"\n",(0,r.jsxs)(s.Z,{groupId:"modloader",children:[(0,r.jsxs)(a.Z,{value:"forge",label:"Forge",default:!0,children:[(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"LazyOptionalmaybeCuriosInventory = CuriosApi.getCuriosInventory(livingEntity);\n"})}),(0,r.jsxs)(n.p,{children:["The query returns a ",(0,r.jsx)(n.code,{children:"LazyOptional"})," as the specified entity may not have a curios inventory. If the result is certain to\nexist, then the optionality can be disregarded and simplified to:"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"ICuriosItemHandler curiosInventory = CuriosApi.getCuriosInventory(livingEntity).resolve().get();\n"})})]}),(0,r.jsxs)(a.Z,{value:"neoforge-2",label:"NeoForge 1.20.3+",children:[(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"Optional maybeCuriosInventory = CuriosApi.getCuriosInventory(livingEntity);\n"})}),(0,r.jsxs)(n.p,{children:["The query returns a ",(0,r.jsx)(n.code,{children:"Optional"})," as the specified entity may not have a curios inventory. If the result is certain to\nexist, then the optionality can be disregarded and simplified to:"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"ICuriosItemHandler curiosInventory = CuriosApi.getCuriosInventory(livingEntity).get();\n"})})]})]}),"\n",(0,r.jsxs)(n.p,{children:["Since the method returns an ",(0,r.jsx)(n.code,{children:"Optional"})," by default, developers will need to make sure to use ",(0,r.jsx)(n.code,{children:"Optional#ifPresent"})," first\nin order to check that the inventory actually exists:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"CuriosApi.getCuriosInventory(livingEntity).ifPresent(curiosInventory -> {\n // code here - with access to the inventory instance that now definitely exists\n});\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Once a developer has the ",(0,r.jsx)(n.code,{children:"ICuriosItemHandler"})," instance, they can use the methods from that instance to interact with the\nCurios inventory."]}),"\n",(0,r.jsx)(n.h2,{id:"accessing-the-inventory",children:"Accessing the inventory"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.p,{children:"As mentioned previously, each slot type assigned to an entity is given a sub-inventory in the Curios inventory to\nprovide easy and categorical access. There are two main ways to interact with these slot inventories, depending on\nwhether the developer wants to access all of the slot inventories or just a particular one."}),"\n",(0,r.jsx)(n.h3,{id:"accessing-the-entire-inventory",children:"Accessing the entire inventory"}),"\n",(0,r.jsxs)(n.p,{children:["The entire Curios inventory exists as a ",(0,r.jsx)(n.code,{children:"Map "}),", with the slot type identifiers acting as each\nkey and the ",(0,r.jsx)(n.code,{children:"ICurioStackHandler"})," acting as the inventory attached to the slot type. To access this, the ",(0,r.jsx)(n.code,{children:"getCurios"}),"\nmethod can be used:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"Map curios = curiosInventory.getCurios();\n"})}),"\n",(0,r.jsx)(n.admonition,{type:"caution",children:(0,r.jsxs)(n.p,{children:["This returns an ",(0,r.jsx)(n.strong,{children:"unmodifiable"})," map so attempts to change the structure of the map directly through this method, such\nas adding or removing slot inventories, will not work. Any changes to the structure needs to be done through other\nmethods, this method is primarily for accessing the list of slot inventories on the entity."]})}),"\n",(0,r.jsx)(n.p,{children:"From here, developers can either iterate through the entire map:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"curios.forEach((identifier, slotInventory) -> {\n // code here - with the identifier and slot inventory access\n})\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Or developers can access a particular sub-inventory, such as a slot type with the ",(0,r.jsx)(n.code,{children:'"ring"'})," identifier:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'ICurioStackHandler slotInventory = curios.get("ring");\n\n// null check to ensure that the slot inventory exists\nif (slotInventory != null) {\n // code here\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:"However, if all a developer wants is to access a particular sub-inventory, there's a more straightforward method\noutlined in the next section that can be used instead."}),"\n",(0,r.jsx)(n.h3,{id:"accessing-an-inventory-for-a-slot-type",children:"Accessing an inventory for a slot type"}),"\n",(0,r.jsx)(n.p,{children:"In order to access a particular inventory for slot type, developers can either access the whole inventory as outlined\nin the preceding section or skip straight to a sub-inventory for that slot type:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'Optional slotInventory = curiosInventory.getStacksHandler("ring");\n'})}),"\n",(0,r.jsxs)(n.p,{children:["The above code will retrive an ",(0,r.jsx)(n.code,{children:"Optional"})," for the slot inventory with the ",(0,r.jsx)(n.code,{children:'"ring"'})," identifier passed into the\nparameter. This is an ",(0,r.jsx)(n.code,{children:"Optional"})," because the slot inventory being queried may not exist on the entity, which is a\npossibility that developers must consider because higher-priority datapacks are capable of removing slot types from\nentities. For that reason, be sure to use ",(0,r.jsx)(n.code,{children:"ifPresent"})," before accessing the inventory:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'curiosInventory.getStacksHandler("ring").ifPresent(slotInventory -> {\n // code here - with access to the slot inventory with the "ring" identifier\n});\n'})})]})}function v(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},5162:(e,n,t)=>{t.d(n,{Z:()=>a});t(7294);var r=t(512);const i={tabItem:"tabItem_Ymn6"};var s=t(5893);function a(e){let{children:n,hidden:t,className:a}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,a),hidden:t,children:n})}},4866:(e,n,t)=>{t.d(n,{Z:()=>I});var r=t(7294),i=t(512),s=t(2466),a=t(6550),o=t(469),l=t(1980),c=t(7392),u=t(12);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:i}}=e;return{value:n,label:t,attributes:r,default:i}}))}(t);return function(e){const n=(0,c.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function v(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function p(e){let{queryString:n=!1,groupId:t}=e;const i=(0,a.k6)(),s=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l._X)(s),(0,r.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(i.location.search);n.set(s,e),i.replace({...i.location,search:n.toString()})}),[s,i])]}function y(e){const{defaultValue:n,queryString:t=!1,groupId:i}=e,s=h(e),[a,l]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!v({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:s}))),[c,d]=p({queryString:t,groupId:i}),[y,g]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[i,s]=(0,u.Nk)(t);return[i,(0,r.useCallback)((e=>{t&&s.set(e)}),[t,s])]}({groupId:i}),m=(()=>{const e=c??y;return v({value:e,tabValues:s})?e:null})();(0,o.Z)((()=>{m&&l(m)}),[m]);return{selectedValue:a,selectValue:(0,r.useCallback)((e=>{if(!v({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);l(e),d(e),g(e)}),[d,g,s]),tabValues:s}}var g=t(2389);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=t(5893);function b(e){let{className:n,block:t,selectedValue:r,selectValue:a,tabValues:o}=e;const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,s.o5)(),u=e=>{const n=e.currentTarget,t=l.indexOf(n),i=o[t].value;i!==r&&(c(n),a(i))},d=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":t},n),children:o.map((e=>{let{value:n,label:t,attributes:s}=e;return(0,f.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>l.push(e),onKeyDown:d,onClick:u,...s,className:(0,i.Z)("tabs__item",m.tabItem,s?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function x(e){let{lazy:n,children:t,selectedValue:i}=e;const s=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=s.find((e=>e.props.value===i));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:s.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==i})))})}function j(e){const n=y(e);return(0,f.jsxs)("div",{className:(0,i.Z)("tabs-container",m.tabList),children:[(0,f.jsx)(b,{...e,...n}),(0,f.jsx)(x,{...e,...n})]})}function I(e){const n=(0,g.Z)();return(0,f.jsx)(j,{...e,children:d(e.children)},String(n))}},1151:(e,n,t)=>{t.d(n,{Z:()=>o,a:()=>a});var r=t(7294);const i={},s=r.createContext(i);function a(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f1e13461.515f4043.js b/assets/js/f1e13461.515f4043.js new file mode 100644 index 0000000..b77a7c0 --- /dev/null +++ b/assets/js/f1e13461.515f4043.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkillusivesoulworks_docs=self.webpackChunkillusivesoulworks_docs||[]).push([[9083],{1262:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>l,default:()=>v,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var r=t(5893),i=t(1151),s=t(4866),a=t(5162);const o={sidebar_position:1},l="Basic Inventory Management",c={id:"curios/inventory/basic-inventory",title:"Basic Inventory Management",description:"Learn how to access and manage the Curios inventory attached to an entity.",source:"@site/docs/curios/inventory/basic-inventory.mdx",sourceDirName:"curios/inventory",slug:"/curios/inventory/basic-inventory",permalink:"/curios/inventory/basic-inventory",draft:!1,unlisted:!1,editUrl:"https://github.com/illusivesoulworks/docs/edit/main/docs/curios/inventory/basic-inventory.mdx",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Inventory",permalink:"/category/inventory"},next:{title:"API",permalink:"/category/api"}},u={},d=[{value:"Overview",id:"overview",level:2},{value:"Using the inventory",id:"using-the-inventory",level:2},{value:"Accessing the inventory",id:"accessing-the-inventory",level:2},{value:"Accessing the entire inventory",id:"accessing-the-entire-inventory",level:3},{value:"Accessing an inventory for a slot type",id:"accessing-an-inventory-for-a-slot-type",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",p:"p",pre:"pre",strong:"strong",...(0,i.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"basic-inventory-management",children:"Basic Inventory Management"}),"\n",(0,r.jsx)(n.p,{children:"Learn how to access and manage the Curios inventory attached to an entity."}),"\n",(0,r.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsxs)(n.p,{children:["Each entity that has been assigned any number of slot types based on ",(0,r.jsx)(n.a,{href:"/curios/slots/entity-register",children:"entity registration"}),"\nwill automatically gain a Curios inventory, initialized with a sub-inventory for each slot type that has been assigned.\nThis inventory can be used for a variety of purposes, such as finding out which items are held in the inventory or\nmodifying the number of slots that are in each sub-inventory."]}),"\n",(0,r.jsxs)(n.p,{children:["The interface for the Curios inventory can be found as ",(0,r.jsx)(n.code,{children:"top.theillusivec4.curios.api.type.capability.ICuriosItemHandler"}),",\nwhich holds all of the methods that developers can use to access and manage the inventory."]}),"\n",(0,r.jsx)(n.h2,{id:"using-the-inventory",children:"Using the inventory"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsxs)(n.p,{children:["To begin using the inventory, developers will need to grab the instance associated with each entity. The\n",(0,r.jsx)(n.code,{children:"top.theillusivec4.curios.api.CuriosApi"})," class has a ",(0,r.jsx)(n.code,{children:"getCuriosInventory"})," method that can be used:"]}),"\n",(0,r.jsxs)(s.Z,{groupId:"modloader",children:[(0,r.jsxs)(a.Z,{value:"forge",label:"Forge",default:!0,children:[(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"LazyOptional maybeCuriosInventory = CuriosApi.getCuriosInventory(livingEntity);\n"})}),(0,r.jsxs)(n.p,{children:["The query returns a ",(0,r.jsx)(n.code,{children:"LazyOptional"})," as the specified entity may not have a curios inventory. If the result is certain to\nexist, then the optionality can be disregarded and simplified to:"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"ICuriosItemHandler curiosInventory = CuriosApi.getCuriosInventory(livingEntity).resolve().get();\n"})})]}),(0,r.jsxs)(a.Z,{value:"neoforge-2",label:"NeoForge 1.20.3+",children:[(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"Optional maybeCuriosInventory = CuriosApi.getCuriosInventory(livingEntity);\n"})}),(0,r.jsxs)(n.p,{children:["The query returns a ",(0,r.jsx)(n.code,{children:"Optional"})," as the specified entity may not have a curios inventory. If the result is certain to\nexist, then the optionality can be disregarded and simplified to:"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"ICuriosItemHandler curiosInventory = CuriosApi.getCuriosInventory(livingEntity).get();\n"})})]})]}),"\n",(0,r.jsxs)(n.p,{children:["Since the method returns an ",(0,r.jsx)(n.code,{children:"Optional"})," by default, developers will need to make sure to use ",(0,r.jsx)(n.code,{children:"Optional#ifPresent"})," first\nin order to check that the inventory actually exists:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"CuriosApi.getCuriosInventory(livingEntity).ifPresent(curiosInventory -> {\n // code here - with access to the inventory instance that now definitely exists\n});\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Once a developer has the ",(0,r.jsx)(n.code,{children:"ICuriosItemHandler"})," instance, they can use the methods from that instance to interact with the\nCurios inventory."]}),"\n",(0,r.jsx)(n.h2,{id:"accessing-the-inventory",children:"Accessing the inventory"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.p,{children:"As mentioned previously, each slot type assigned to an entity is given a sub-inventory in the Curios inventory to\nprovide easy and categorical access. There are two main ways to interact with these slot inventories, depending on\nwhether the developer wants to access all of the slot inventories or just a particular one."}),"\n",(0,r.jsx)(n.h3,{id:"accessing-the-entire-inventory",children:"Accessing the entire inventory"}),"\n",(0,r.jsxs)(n.p,{children:["The entire Curios inventory exists as a ",(0,r.jsx)(n.code,{children:"Map "}),", with the slot type identifiers acting as each\nkey and the ",(0,r.jsx)(n.code,{children:"ICurioStackHandler"})," acting as the inventory attached to the slot type. To access this, the ",(0,r.jsx)(n.code,{children:"getCurios"}),"\nmethod can be used:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"Map curios = curiosInventory.getCurios();\n"})}),"\n",(0,r.jsx)(n.admonition,{type:"caution",children:(0,r.jsxs)(n.p,{children:["This returns an ",(0,r.jsx)(n.strong,{children:"unmodifiable"})," map so attempts to change the structure of the map directly through this method, such\nas adding or removing slot inventories, will not work. Any changes to the structure needs to be done through other\nmethods, this method is primarily for accessing the list of slot inventories on the entity."]})}),"\n",(0,r.jsx)(n.p,{children:"From here, developers can either iterate through the entire map:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:"curios.forEach((identifier, slotInventory) -> {\n // code here - with the identifier and slot inventory access\n})\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Or developers can access a particular sub-inventory, such as a slot type with the ",(0,r.jsx)(n.code,{children:'"ring"'})," identifier:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'ICurioStackHandler slotInventory = curios.get("ring");\n\n// null check to ensure that the slot inventory exists\nif (slotInventory != null) {\n // code here\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:"However, if all a developer wants is to access a particular sub-inventory, there's a more straightforward method\noutlined in the next section that can be used instead."}),"\n",(0,r.jsx)(n.h3,{id:"accessing-an-inventory-for-a-slot-type",children:"Accessing an inventory for a slot type"}),"\n",(0,r.jsx)(n.p,{children:"In order to access a particular inventory for slot type, developers can either access the whole inventory as outlined\nin the preceding section or skip straight to a sub-inventory for that slot type:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'Optional slotInventory = curiosInventory.getStacksHandler("ring");\n'})}),"\n",(0,r.jsxs)(n.p,{children:["The above code will retrive an ",(0,r.jsx)(n.code,{children:"Optional"})," for the slot inventory with the ",(0,r.jsx)(n.code,{children:'"ring"'})," identifier passed into the\nparameter. This is an ",(0,r.jsx)(n.code,{children:"Optional"})," because the slot inventory being queried may not exist on the entity, which is a\npossibility that developers must consider because higher-priority datapacks are capable of removing slot types from\nentities. For that reason, be sure to use ",(0,r.jsx)(n.code,{children:"ifPresent"})," before accessing the inventory:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-java",children:'curiosInventory.getStacksHandler("ring").ifPresent(slotInventory -> {\n // code here - with access to the slot inventory with the "ring" identifier\n});\n'})})]})}function v(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},5162:(e,n,t)=>{t.d(n,{Z:()=>a});t(7294);var r=t(512);const i={tabItem:"tabItem_Ymn6"};var s=t(5893);function a(e){let{children:n,hidden:t,className:a}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,a),hidden:t,children:n})}},4866:(e,n,t)=>{t.d(n,{Z:()=>I});var r=t(7294),i=t(512),s=t(2466),a=t(6550),o=t(469),l=t(1980),c=t(7392),u=t(12);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:i}}=e;return{value:n,label:t,attributes:r,default:i}}))}(t);return function(e){const n=(0,c.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function v(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function p(e){let{queryString:n=!1,groupId:t}=e;const i=(0,a.k6)(),s=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l._X)(s),(0,r.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(i.location.search);n.set(s,e),i.replace({...i.location,search:n.toString()})}),[s,i])]}function y(e){const{defaultValue:n,queryString:t=!1,groupId:i}=e,s=h(e),[a,l]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!v({value:n,tabValues:t}))throw new Error(`Docusaurus error: The