# Global

Constants, classes and functions

# Components, KubeJS and you!

In 1.18.2 and beyond KubeJS uses Components in a lot of places. It returns them for entity names, item names and accepts them for everything from tooltips to sending messages to players.

<p class="callout info">All examples use `event.player.tell` from the `player.chat` event to output their example, but they will with anywhere that accepts a Component!</p>

Making your own Components starts from the ComponentWrapper class, invokable with just `Component` or `Text` from anywhere. The examples all use `Component` but `Text` works just the same.

#### ComponentWrapper methods:

<table border="1" id="bkmrk-name-return-type-inf" style="border-collapse: collapse; width: 100%; height: 435px;"><thead><tr style="height: 29px;"><td style="width: 6.9444%; height: 29px;">Name

</td><td style="width: 8.2716%; height: 29px;">Return Type</td><td style="width: 9.78395%; height: 29px;">Info</td></tr></thead><tbody><tr style="height: 29px;"><td style="width: 6.9444%; height: 29px;">of(Object o)</td><td style="width: 8.2716%; height: 29px;">MutableComponent</td><td style="width: 9.78395%; height: 29px;">Returns a component based on what was input. Accepts strings, primitives like numbers, snbt/nbt format of Components and a couple others.</td></tr><tr style="height: 29px;"><td style="width: 6.9444%; height: 29px;">clickEventOf(Object o)</td><td style="width: 8.2716%; height: 29px;">ClickEvent</td><td style="width: 9.78395%; height: 29px;">Returns a ClickEvent based on what was input. See examples below</td></tr><tr style="height: 29px;"><td style="width: 6.9444%; height: 29px;">prettyPrintNbt(Tag tag)</td><td style="width: 8.2716%; height: 29px;">Component</td><td style="width: 9.78395%; height: 29px;">Returns a component with a prettified version of the input NBT.</td></tr><tr style="height: 29px;"><td style="width: 6.9444%; height: 29px;">join(MutableComponent seperator, Iterable&lt;? extends Component&gt; texts)</td><td style="width: 8.2716%; height: 29px;">MutableComponent</td><td style="width: 9.78395%; height: 29px;">Returns the result of looping through `texts` and joining them, separating each one with `seperator`.</td></tr><tr style="height: 29px;"><td style="width: 6.9444%; height: 29px;">string(String text)</td><td style="width: 8.2716%; height: 29px;">MutableComponent</td><td style="width: 9.78395%; height: 29px;">Returns a basic unformatted TextComponent with just the input text</td></tr><tr style="height: 29px;"><td style="width: 6.9444%; height: 29px;">translate(String key)</td><td style="width: 8.2716%; height: 29px;">MutableComponent</td><td style="width: 9.78395%; height: 29px;">Returns a basic unformatted TranslatableComponent with the input key.</td></tr><tr style="height: 29px;"><td style="width: 6.9444%; height: 29px;">translate(String key, Object... objects)</td><td style="width: 8.2716%; height: 29px;">MutableComponent</td><td style="width: 9.78395%; height: 29px;">Returns an unformatted TranslatableComponent with `objects` as the replacements for %s in the translation output. </td></tr><tr style="height: 29px;"><td style="width: 6.9444%; height: 29px;">keybind(String keybind)</td><td style="width: 8.2716%; height: 29px;">MutableComponent</td><td style="width: 9.78395%; height: 29px;">Returns a basic unformatted KeybindComponent with the specified keybind.</td></tr><tr style="height: 29px;"><td style="width: 6.9444%; height: 29px;">&lt;color&gt;(Object text)</td><td style="width: 8.2716%; height: 29px;">MutableComponent</td><td style="width: 9.78395%; height: 29px;">Returns a basic Component with the specified color for text coloring. Valid colors are in the list below. Do not include the &lt;&gt; brackets.

</td></tr></tbody></table>

A list of colors accepted in various places:

- black
- darkBlue
- darkGreen
- darkAqua
- darkRed
- darkPurple
- gold
- gray
- darkGray
- blue
- green
- aqua
- red
- lightPurple
- yellow
- white

Basic examples:

```JavaScript
onEvent('player.chat', event => {
  // Tell the player a normal message
  event.player.tell(Component.string('Hello world'))
  // Now in black
  event.player.tell(Component.black('Welcome to the dark side, we have cookies!'))
  // Tell them the diamond item, in whatever language they have set
  event.player.tell(Component.translate('item.minecraft.diamond'))
  // Now tell them whatever key they have crouching set to
  event.player.tell(Component.keybind('key.sneak'))
  // And finally show them the nbt data of the item they are holding
  event.player.tell(Component.prettyPrintNbt(event.player.mainHandItem.nbt))
})
```

### MutableComponent

These are methods you can call on any MutableComponent. This includes ComponentKJS, which is a KubeJS extension for vanilla's components and is injected into vanillas code on runtime. All methods from ComponentKJS are included, but only relevant ones from vanilla are included.

<table border="1" id="bkmrk-name-return-type-inf-0" style="border-collapse: collapse; width: 100%; height: 702px;"><thead><tr style="height: 29px;"><td style="width: 33.3333%; height: 35px;">Name

</td><td style="width: 33.3333%; height: 35px;">Return Type</td><td style="width: 33.3333%; height: 35px;">Info</td></tr></thead><tbody><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;">iterator()</td><td style="width: 33.3333%; height: 29px;">Iterator&lt;Component&gt;</td><td style="width: 33.3333%; height: 29px;">Returns an Iterator for the components contained in this component, useful for when multiple have been joined or appended. From ComponentKJS.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;">self()</td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Returns the component you ran it on. From ComponentKJS.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;">toJson()</td><td style="width: 33.3333%; height: 29px;">JsonElement</td><td style="width: 33.3333%; height: 29px;">Returns the Json representation of this Component. From ComponentKJS.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;">&lt;color&gt;()</td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Modifies the Component with the specified color applied as formatting, and returns itself. Do not include the &lt;&gt; brackets. From ComponentKJS.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;">color(Color c)</td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Modifies the Component to have the input Color, and returns itself. (Color is a Rhino color). From ComponentKJS.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;">noColor()</td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Modifies the Component to have no color, and returns itself. From ComponentKJS.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;">bold()

italic()

underlined()

strikethrough()

obfuscated()

</td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Modifies the Component to have said formatting and returns itself. From ComponentKJS.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;">bold(<span class="pl-c1">@</span><span class="pl-c1">Nullable</span> <span class="pl-smi">Boolean</span> <span class="pl-s1">value</span>)

italic(<span class="pl-c1">@</span><span class="pl-c1">Nullable</span> <span class="pl-smi">Boolean</span> <span class="pl-s1">value</span>)

underlined(<span class="pl-c1">@</span><span class="pl-c1">Nullable</span> <span class="pl-smi">Boolean</span> <span class="pl-s1">value</span>)

strikethrough(<span class="pl-c1">@</span><span class="pl-c1">Nullable</span> <span class="pl-smi">Boolean</span> <span class="pl-s1">value</span>)

obfuscated(<span class="pl-c1">@</span><span class="pl-c1">Nullable</span> <span class="pl-smi">Boolean</span> <span class="pl-s1">value</span>)

</td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Modifies the Component to have said formatting and returns itself. From ComponentKJS.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.18/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=insertion&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fcore%2FComponentKJS.java&ref=1.18%2Fmain&language=Java&row=153&col=26&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="5c12c47eec7f01b276e23682fb85a56cc0d4f03635890ff6e9722498b43585b3">insertion</span></span>(<span class="pl-c1">@</span><span class="pl-c1">Nullable</span> <span class="pl-smi">String</span> <span class="pl-s1">s)</span></td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Makes the Component insert the specified string into the players chat box when shift clicked (does not send it) and returns itself. From ComponentKJS.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.18/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=font&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fcore%2FComponentKJS.java&ref=1.18%2Fmain&language=Java&row=157&col=26&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="276f1ba53a07fc4f1b441a2c7b26cd61a67e923d93dee734be42ef4503735a65">font</span></span>(<span class="pl-c1">@</span><span class="pl-c1">Nullable</span> <span class="pl-smi">ResourceLocation</span> <span class="pl-s1">s</span>)</td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Changes the Components font to the specified font and returns itself. For more information on adding fonts see the [Minecraft Wiki's Resource packs page.](https://minecraft.fandom.com/wiki/Resource_Pack#Fonts) From ComponentKJS.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.18/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=click&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fcore%2FComponentKJS.java&ref=1.18%2Fmain&language=Java&row=161&col=26&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="bbd9d948e199cbf55c2bb4aeed654147503a1e31b4d79981eb8b3d38483f03e6">click</span></span>(<span class="pl-c1">@</span><span class="pl-c1">Nullable</span> <span class="pl-smi">ClickEvent</span> <span class="pl-s1">s)</span></td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Sets this components ClickEvent to the specified ClickEvent. From ComponentKJS.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.18/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=hover&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fcore%2FComponentKJS.java&ref=1.18%2Fmain&language=Java&row=165&col=26&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="d27c550e46a885d9524d27dba04d8adf0cea0b657f93851ea2de0fbad01a39d4">hover</span></span>(<span class="pl-c1">@</span><span class="pl-c1">Nullable</span> <span class="pl-smi">Component</span> <span class="pl-s1">s</span>)</td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Sets the hover tooltip for this Component to the input Component. From ComponentKJS.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.18/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=hover&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fcore%2FComponentKJS.java&ref=1.18%2Fmain&language=Java&row=165&col=26&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="d27c550e46a885d9524d27dba04d8adf0cea0b657f93851ea2de0fbad01a39d4">setStyle(Style style)</span></span></td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Sets the style to the input Style (net.minecraft.network.chat.Style) and returns itself. Not recommended for use, use the specific methods added by CompontentKJS instead.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.18/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=hover&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fcore%2FComponentKJS.java&ref=1.18%2Fmain&language=Java&row=165&col=26&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="d27c550e46a885d9524d27dba04d8adf0cea0b657f93851ea2de0fbad01a39d4">append(String string)</span></span></td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Appends the input string as a basic TextComponent to this Component then returns itself.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.18/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=hover&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fcore%2FComponentKJS.java&ref=1.18%2Fmain&language=Java&row=165&col=26&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="d27c550e46a885d9524d27dba04d8adf0cea0b657f93851ea2de0fbad01a39d4">append(Component component)</span></span></td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Appends the input Component to this Component then returns itself.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.18/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=hover&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fcore%2FComponentKJS.java&ref=1.18%2Fmain&language=Java&row=165&col=26&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="d27c550e46a885d9524d27dba04d8adf0cea0b657f93851ea2de0fbad01a39d4">withStyle(Style style)</span></span></td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Merges the input style with the current style, preffering properties from the new style if a conflict exists.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.18/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=hover&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fcore%2FComponentKJS.java&ref=1.18%2Fmain&language=Java&row=165&col=26&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="d27c550e46a885d9524d27dba04d8adf0cea0b657f93851ea2de0fbad01a39d4">getStyle()</span></span></td><td style="width: 33.3333%; height: 29px;">Style</td><td style="width: 33.3333%; height: 29px;">Returns this Components current Style.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.18/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=hover&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fcore%2FComponentKJS.java&ref=1.18%2Fmain&language=Java&row=165&col=26&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="d27c550e46a885d9524d27dba04d8adf0cea0b657f93851ea2de0fbad01a39d4">getContents()</span></span></td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Returns this Components contents. Will return the text for TextComponents, the pattern for SelectorComponents and an empty string for all other Components.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.18/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=hover&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fcore%2FComponentKJS.java&ref=1.18%2Fmain&language=Java&row=165&col=26&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="d27c550e46a885d9524d27dba04d8adf0cea0b657f93851ea2de0fbad01a39d4">getSiblings()</span></span></td><td style="width: 33.3333%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.18/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=hover&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fcore%2FComponentKJS.java&ref=1.18%2Fmain&language=Java&row=165&col=26&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="d27c550e46a885d9524d27dba04d8adf0cea0b657f93851ea2de0fbad01a39d4">List&lt;Component&gt; </span></span></td><td style="width: 33.3333%; height: 29px;">Returns a list of all Components which have been append()ed to this Component </td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.18/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=hover&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fcore%2FComponentKJS.java&ref=1.18%2Fmain&language=Java&row=165&col=26&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="d27c550e46a885d9524d27dba04d8adf0cea0b657f93851ea2de0fbad01a39d4">plainCopy()</span></span></td><td style="width: 33.3333%; height: 29px;">BaseComponent</td><td style="width: 33.3333%; height: 29px;">Returns a basic copy of this, preserving only the contents and not the style or siblings.</td></tr><tr style="height: 29px;"><td style="width: 33.3333%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.18/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=hover&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fcore%2FComponentKJS.java&ref=1.18%2Fmain&language=Java&row=165&col=26&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="d27c550e46a885d9524d27dba04d8adf0cea0b657f93851ea2de0fbad01a39d4">copy()</span></span></td><td style="width: 33.3333%; height: 29px;">MutableComponent</td><td style="width: 33.3333%; height: 29px;">Returns a full copy of this Component, preserving style and siblings</td></tr><tr><td style="width: 33.3333%;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.18/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=hover&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fcore%2FComponentKJS.java&ref=1.18%2Fmain&language=Java&row=165&col=26&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="d27c550e46a885d9524d27dba04d8adf0cea0b657f93851ea2de0fbad01a39d4">getString()</span></span></td><td style="width: 33.3333%;">String</td><td style="width: 33.3333%;">Returns this components text as a String. Will return a blank string for any non-text component</td></tr></tbody></table>

More complex examples:

```JavaScript
// First a prefix, like a rank. This won't be changing so we can just declare it up here.
const prefix = Component.darkRed('[Admin]').underlined()

onEvent('player.chat', event => {
  
  // First cancel the event because we are going to be sending the message ourselves
  event.cancel()
  
  // The main Component we will be adding stuff to. It is just a copy of the prefix component for now
  let component = prefix.copy() // If we didn't copy it all the modifications we made to it would be applied to the original as well!
  
  // Make a component of the players name and then surround with < > and make it white again. Then append it our main copmponent.
  // A component will inherit any styiling it doesnt have from whatever it has been .append()ed to, so you need to apply formatting	rather liberally some times!
  let playerName = Component.string(event.getUsername())
  // Doing it this way means we only have to apply the white formatting and no underline once to the name
  let nameComponent = Component.white(' <').underlined(false).append(playerName).append('> ')
  component.append(nameComponent)
  
  // Finnally add the message (obfuscated, of course) and send it!
  // We make sure to set its color and underline though, otherwise it will end up inheriting the red and underline from the prefix!
  component.append(Component.string(event.message).obfuscated().white().underlined(false))
  event.server.tell(component)
  
})	
```

# Item and Ingredient

When making recipes you can specify items in many ways, the most common is just to use `'namspace:id'`, like `'minecraft:diamond'`, however you can also use `Item#of` and `Ingredient#of` for advanced additions, such as NBT or count.

Note that Item and Ingredient are **not** the same! They may work similarly but there are differences. Item can only ever represent a single item type whereas Ingredient can represent multiple item types (and multiple instances of the same item type with different properties such as NBT data). For most cases Ingredient should be preferred over Item.

#### Item/ItemWrapper

Its Java class name is ItemWrapper but it is bound to Item in JS.

<table border="1" id="bkmrk-name-return-type-inf" style="border-collapse: collapse; width: 100%; height: 701px;"><thead><tr style="height: 29px;"><td style="width: 46.2266%; height: 29px;">Name

</td><td style="width: 14.7129%; height: 29px;">Return Type</td><td style="width: 39.1842%; height: 29px;">Info</td></tr></thead><tbody><tr style="height: 29px;"><td style="width: 46.2266%; height: 29px;">of(<span class="pl-c1"><span class="pl-smi">ItemStackJS</span> in</span>)</td><td style="width: 14.7129%; height: 29px;">ItemStackJS</td><td style="width: 39.1842%; height: 29px;">Returns an ItemStackJS based on what was input.

Note that this relies mostly on Rhinos type wrapping to function, see [paragraph below](https://mods.latvian.dev/books/kubejs-legacy/page/item-and-ingredient#:~:text=Item%23of%20relies%20on%20Rhinos%20type%20wrapping%20to%20function%2C%20which%20calls%20ItemStackJS%23of.%20This%20tries%20its%20best%20to%20turn%20the%20input%20into%20an%20ItemStackJS.%20If%20no%20match%20is%20found%20ItemStackJS.EMPTY%20is%20returned.) about ItemStackJS#of for more info

</td></tr><tr style="height: 35px;"><td style="width: 46.2266%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":17,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=of&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FItemWrapper.java&ref=1.19%2Fmain&language=Java&row=22&col=27&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="e72933dec6181d4b1d69ff9d622927393aa92c3959345325ecaac0d5846a2c52">of</span></span>(<span class="pl-smi">ItemStackJS</span> <span class="pl-s1">in</span>, <span class="pl-smi">int</span> <span class="pl-s1">count</span>)</td><td style="width: 14.7129%; height: 35px;">ItemStackJS</td><td style="width: 39.1842%; height: 35px;">See above. count will override any other count set from the first parameter.

</td></tr><tr style="height: 57px;"><td style="width: 46.2266%; height: 57px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":17,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=of&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FItemWrapper.java&ref=1.19%2Fmain&language=Java&row=22&col=27&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="e72933dec6181d4b1d69ff9d622927393aa92c3959345325ecaac0d5846a2c52">of(<span class="pl-smi">ItemStackJS</span> <span class="pl-s1">in</span>, <span class="pl-smi">CompoundTag</span> <span class="pl-s1">tag</span>)</span></span></td><td style="width: 14.7129%; height: 57px;">ItemStackJS</td><td style="width: 39.1842%; height: 57px;">See above. NBT is merged, with the input NBT taking priority over existing NBT.

</td></tr><tr style="height: 49px;"><td style="width: 46.2266%; height: 49px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":17,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=of&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FItemWrapper.java&ref=1.19%2Fmain&language=Java&row=22&col=27&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="e72933dec6181d4b1d69ff9d622927393aa92c3959345325ecaac0d5846a2c52">of(<span class="pl-smi">ItemStackJS</span> <span class="pl-s1">in</span>, <span class="pl-smi">int</span> <span class="pl-s1">count</span>, <span class="pl-smi">CompoundTag</span> <span class="pl-s1">nbt</span>)</span></span></td><td style="width: 14.7129%; height: 49px;">ItemStackJS</td><td style="width: 39.1842%; height: 49px;">Combines the functionality of the above two.

</td></tr><tr style="height: 49px;"><td style="width: 46.2266%; height: 49px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":17,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=of&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FItemWrapper.java&ref=1.19%2Fmain&language=Java&row=22&col=27&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="e72933dec6181d4b1d69ff9d622927393aa92c3959345325ecaac0d5846a2c52"> withNBT(<span class="pl-smi">ItemStackJS</span> <span class="pl-s1">in</span>, <span class="pl-smi">CompoundTag</span> <span class="pl-s1">nbt</span>)</span></span></td><td style="width: 14.7129%; height: 49px;">ItemStackJS</td><td style="width: 39.1842%; height: 49px;">Same as the corresponding #of.

</td></tr><tr style="height: 49px;"><td style="width: 46.2266%; height: 49px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":17,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=of&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FItemWrapper.java&ref=1.19%2Fmain&language=Java&row=22&col=27&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="e72933dec6181d4b1d69ff9d622927393aa92c3959345325ecaac0d5846a2c52">withChance(<span class="pl-smi">ItemStackJS</span> <span class="pl-s1">in</span>, <span class="pl-smi">double</span> chance)</span></span></td><td style="width: 14.7129%; height: 49px;">ItemStackJS</td><td style="width: 39.1842%; height: 49px;">Same as #of, chance will override currently set chance.

</td></tr><tr style="height: 35px;"><td style="width: 46.2266%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":17,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=of&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FItemWrapper.java&ref=1.19%2Fmain&language=Java&row=22&col=27&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="e72933dec6181d4b1d69ff9d622927393aa92c3959345325ecaac0d5846a2c52">getList()</span></span></td><td style="width: 14.7129%; height: 35px;">ListJS</td><td style="width: 39.1842%; height: 35px;">Returns a list of ItemStackJS, one per registered item.

</td></tr><tr style="height: 35px;"><td style="width: 46.2266%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":17,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=of&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FItemWrapper.java&ref=1.19%2Fmain&language=Java&row=22&col=27&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="e72933dec6181d4b1d69ff9d622927393aa92c3959345325ecaac0d5846a2c52">getTypeList()</span></span></td><td style="width: 14.7129%; height: 35px;">ListJS</td><td style="width: 39.1842%; height: 35px;">Returns a list of String, one per registered item.

</td></tr><tr style="height: 35px;"><td style="width: 46.2266%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":17,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=of&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FItemWrapper.java&ref=1.19%2Fmain&language=Java&row=22&col=27&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="e72933dec6181d4b1d69ff9d622927393aa92c3959345325ecaac0d5846a2c52">getEmpty()</span></span></td><td style="width: 14.7129%; height: 35px;">ItemStackJS</td><td style="width: 39.1842%; height: 35px;">Returns ItemSTackJS.EMPTY

</td></tr><tr style="height: 57px;"><td style="width: 46.2266%; height: 57px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":17,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=of&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FItemWrapper.java&ref=1.19%2Fmain&language=Java&row=22&col=27&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="e72933dec6181d4b1d69ff9d622927393aa92c3959345325ecaac0d5846a2c52">clearListCache()</span></span></td><td style="width: 14.7129%; height: 57px;">void</td><td style="width: 39.1842%; height: 57px;">Clears the caches used for #getList and #getTypeList

</td></tr><tr style="height: 102px;"><td style="width: 46.2266%; height: 102px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=fireworks&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FItemWrapper.java&ref=1.19%2Fmain&language=Java&row=61&col=27&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="d8d6e3b7f2b7a78eef96f231587a55fe08096d6abb399d3ff0eb00fb10602cbd">fireworks</span></span>(<span class="pl-smi">Map</span>&lt;<span class="pl-smi">String</span>, <span class="pl-smi">Object</span>&gt; <span class="pl-s1">properties</span>)</td><td style="width: 14.7129%; height: 102px;">FireworkJS</td><td style="width: 39.1842%; height: 102px;">Returns a FireworkJS based on the input map of propeties. See FireworkJS#of on the FireworkJS page for more information &lt;TODO: Make and link FireworkJS page&gt;

</td></tr><tr style="height: 35px;"><td style="width: 46.2266%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":19,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getItem&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FItemWrapper.java&ref=1.19%2Fmain&language=Java&row=65&col=20&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="6d0b6bb83090c9fe42ee8eb64c38693b6d8a7ddcd495f197a20543f783268d51">getItem</span></span>(<span class="pl-smi">ResourceLocation</span> <span class="pl-s1">id</span>)</td><td style="width: 14.7129%; height: 35px;">Item</td><td style="width: 39.1842%; height: 35px;">Returns the instance of the Item class associated with the item id passed in.

</td></tr><tr style="height: 35px;"><td style="width: 46.2266%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":17,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=of&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FItemWrapper.java&ref=1.19%2Fmain&language=Java&row=22&col=27&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="e72933dec6181d4b1d69ff9d622927393aa92c3959345325ecaac0d5846a2c52"><span class="pl-c1">@</span><span class="pl-c1">Nullable </span>findGroup(String id)</span></span></td><td style="width: 14.7129%; height: 35px;">CreativeModTab</td><td style="width: 39.1842%; height: 35px;">Returns the Creative tab associated with the id passed in, returns null if none found.

</td></tr><tr style="height: 35px;"><td style="width: 46.2266%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":17,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=of&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FItemWrapper.java&ref=1.19%2Fmain&language=Java&row=22&col=27&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="e72933dec6181d4b1d69ff9d622927393aa92c3959345325ecaac0d5846a2c52">exists(<span class="pl-smi">ResourceLocation</span> <span class="pl-s1">id</span>)</span></span></td><td style="width: 14.7129%; height: 35px;">boolean</td><td style="width: 39.1842%; height: 35px;">Returns if the item id passed in exists or not.

</td></tr><tr style="height: 35px;"><td style="width: 46.2266%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":17,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=of&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FItemWrapper.java&ref=1.19%2Fmain&language=Java&row=22&col=27&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="e72933dec6181d4b1d69ff9d622927393aa92c3959345325ecaac0d5846a2c52"> isItem(<span class="pl-c1">@</span><span class="pl-c1">Nullable</span> <span class="pl-smi">Object</span> <span class="pl-s1">o</span>)</span></span></td><td style="width: 14.7129%; height: 35px;">boolean</td><td style="width: 39.1842%; height: 35px;">Just does an instanceof ItemStackJS check on the object passed in.

</td></tr></tbody></table>

Item#of relies on Rhinos type wrapping to function, which calls ItemStackJS#of. This tries its best to turn the input into an ItemStackJS. If no match is found ItemStackJS.EMPTY is returned. Valid inputs:

- null/ItemStack.EMPTY/Items.EMPTY/ItemStackJS.EMPTY - will return ItemStackJS.EMPTY
- ItemStackJS - will return the same object passed in.
- FluidStackJS - will return a new DummyFluidItemStackJS
- <span class="pl-smi">IngredientJS - will return the first item in the Ingredient</span>
- <span class="pl-smi">ItemStack - w</span><span class="pl-smi">ill return a new ItemStackJS wrapping the ItemStack passed in</span>
- <span class="pl-smi">ResourceLocation - will lookup this ResourceLocation in the item registry and return it if found. If not found will return ItemStackJS.EMPTY, and throw an error if RecipeJS.itemErrors is true</span>
- <span class="pl-smi">ItemLike - will return a new ItemStackJS of the input</span>
- <span class="pl-smi">JsonObject - will return an item based on properties in the Json. `item` will be used as the item id, or `tag` if item does not exist. `count`, `chance` and `nbt` all set their respective properties</span>
- <span class="pl-smi">RegEx - will return a new ItemStackJS of the first item id that matches this regex.</span>
- <span class="pl-smi">String (CharSequence) - will parse it and return a new ItemStackJS based on the input item id. Prefix with `nx ` to change the count (where n is any number between 1 and 64). Put `#` before the item id to parse it as a tag instead. Put `@` before the item id to parse it as a modid instead. Prefix with `%` to parse it as a creative menu tab group. Surround in `/` to parse as a RegEx. NOTE: will only be the first item in any of the groups mentioned above!</span>
- <span class="pl-smi">Map/JS Object - uses the same rules as a JsonObject.</span>

#### Ingredient/IngredientWrapper

Its Java class name is IngredientWrapper but it is bound to Ingredient in JS. All static methods.

<table border="1" id="bkmrk-name-return-type-inf-0" style="border-collapse: collapse; width: 100%; height: 701px;"><thead><tr style="height: 29px;"><td style="width: 46.4663%; height: 29px;">Name

</td><td style="width: 14.4731%; height: 29px;">Return Type</td><td style="width: 39.1842%; height: 29px;">Info</td></tr></thead><tbody><tr style="height: 29px;"><td style="width: 46.4663%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getNone&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FIngredientWrapper.java&ref=1.19%2Fmain&language=Java&row=20&col=28&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="787f1179d79e67b019b2ad49dc1074e390868ebadea334cb5445003deef5bb34">getNone</span></span>()</td><td style="width: 14.4731%; height: 29px;">IngredientJS</td><td style="width: 39.1842%; height: 29px;">Returns ItemStack.EMPTY

</td></tr><tr><td style="width: 46.4663%;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getNone&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FIngredientWrapper.java&ref=1.19%2Fmain&language=Java&row=20&col=28&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="787f1179d79e67b019b2ad49dc1074e390868ebadea334cb5445003deef5bb34">getAll()</span></span></td><td style="width: 14.4731%;">IngredientJS</td><td style="width: 39.1842%;">Returns an IngredientJS of every single item in game. All of them.

</td></tr><tr><td style="width: 46.4663%;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getNone&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FIngredientWrapper.java&ref=1.19%2Fmain&language=Java&row=20&col=28&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="787f1179d79e67b019b2ad49dc1074e390868ebadea334cb5445003deef5bb34">of(<span class="pl-smi">Object</span> <span class="pl-s1">object)</span></span></span></td><td style="width: 14.4731%;">IngredientJS</td><td style="width: 39.1842%;">Works exactly the same as Item#of except it recognises Ingredient and forge json ingredient syntax.

</td></tr><tr><td style="width: 46.4663%;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getNone&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FIngredientWrapper.java&ref=1.19%2Fmain&language=Java&row=20&col=28&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="787f1179d79e67b019b2ad49dc1074e390868ebadea334cb5445003deef5bb34">of(<span class="pl-smi">Object</span> <span class="pl-s1">object</span>, <span class="pl-smi">int</span> <span class="pl-s1">count</span>)</span></span></td><td style="width: 14.4731%;">IngredientJS</td><td style="width: 39.1842%;">Same as above. The count passed in will override any from the first parameter.

</td></tr><tr><td style="width: 46.4663%;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getNone&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FIngredientWrapper.java&ref=1.19%2Fmain&language=Java&row=20&col=28&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="787f1179d79e67b019b2ad49dc1074e390868ebadea334cb5445003deef5bb34">custom(<span class="pl-smi">Predicate</span>&lt;<span class="pl-smi">ItemStackJS</span>&gt; <span class="pl-s1">predicate</span>)</span></span></td><td style="width: 14.4731%;">IngredientJS</td><td style="width: 39.1842%;">Takes the arrow function or anonymous function passed in and makes an IngredientJS with that as IngredientJS#test.

Return true from the function if the ItemStackJS passed should match as an ingredient.

</td></tr><tr><td style="width: 46.4663%;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getNone&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FIngredientWrapper.java&ref=1.19%2Fmain&language=Java&row=20&col=28&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="787f1179d79e67b019b2ad49dc1074e390868ebadea334cb5445003deef5bb34">custom(<span class="pl-smi">IngredientJS</span> <span class="pl-s1">in</span>, <span class="pl-smi">Predicate</span>&lt;<span class="pl-smi">ItemStackJS</span>&gt; <span class="pl-s1">predicate</span>)</span></span></td><td style="width: 14.4731%;">IngredientJS</td><td style="width: 39.1842%;">Same as above except it must match the IngredientJS passed in as the first parameter before the custom function is called.

</td></tr><tr><td style="width: 46.4663%;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getNone&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FIngredientWrapper.java&ref=1.19%2Fmain&language=Java&row=20&col=28&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="787f1179d79e67b019b2ad49dc1074e390868ebadea334cb5445003deef5bb34">customNBT(<span class="pl-smi">IngredientJS</span> <span class="pl-s1">in</span>, <span class="pl-smi">Predicate</span>&lt;<span class="pl-smi">CompoundTag</span>&gt; <span class="pl-s1">predicate</span>)</span></span></td><td style="width: 14.4731%;">IngredientJS</td><td style="width: 39.1842%;">Same as above except the Predicate is passed the items NBT instead of the full ItemStackJS. Useful for advanced NBT matching.

</td></tr><tr><td style="width: 46.4663%;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getNone&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FIngredientWrapper.java&ref=1.19%2Fmain&language=Java&row=20&col=28&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="787f1179d79e67b019b2ad49dc1074e390868ebadea334cb5445003deef5bb34">matchAny(<span class="pl-smi">Object</span> <span class="pl-s1">objects</span>)</span></span></td><td style="width: 14.4731%;">IngredientJS</td><td style="width: 39.1842%;">Adds the passed in object to an ingredient. If it is a list then it adds all items in the list. All objects are passed through #of before adding.

</td></tr><tr><td style="width: 46.4663%;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getNone&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FIngredientWrapper.java&ref=1.19%2Fmain&language=Java&row=20&col=28&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="787f1179d79e67b019b2ad49dc1074e390868ebadea334cb5445003deef5bb34">registerCustomIngredientAction(<span class="pl-smi">String</span> <span class="pl-s1">id</span>, <span class="pl-smi">CustomIngredientActionCallback</span> <span class="pl-s1">callback</span>)</span></span></td><td style="width: 14.4731%;">void</td><td style="width: 39.1842%;">Registers a custom ingredient action. See the [recipe page](https://mods.latvian.dev/books/kubejs-legacy/page/recipeeventjs#bkmrk-poorly-documented-th) for more information.

</td></tr><tr><td style="width: 46.4663%;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"1.19/main","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getNone&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fbindings%2FIngredientWrapper.java&ref=1.19%2Fmain&language=Java&row=20&col=28&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="787f1179d79e67b019b2ad49dc1074e390868ebadea334cb5445003deef5bb34">isIngredient(<span class="pl-c1">@</span><span class="pl-c1">Nullable</span> <span class="pl-smi">Object</span> <span class="pl-s1">o</span>)</span></span></td><td style="width: 14.4731%;">boolean</td><td style="width: 39.1842%;">Just does an instanceof IngredientJS check on the object passed in.

</td></tr></tbody></table>

<p class="callout warning">Remember that Item and Ingredient are not equivalent!</p>

Examples

```
<TODO: examples>
```

#### ItemStackJS

A wrapper class for vanilla's ItemStack. All methods listed here are instance methods, all useful static methods are wrapped in ItemWrapper. Implements IngredientJS and overrides most of its default methods.

<table border="1" id="bkmrk-name-return-type-inf-1" style="border-collapse: collapse; width: 100%; height: 2645px;"><thead><tr style="height: 29px;"><td style="width: 39.801%; height: 29px;">Name

</td><td style="width: 21.0148%; height: 29px;">Return Type</td><td style="width: 39.1842%; height: 29px;">Info</td></tr></thead><tbody><tr style="height: 29px;"><td style="width: 39.801%; height: 29px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getItem&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=562&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="53f0a57f897b477592aa5704063867f8fb103db452c766e44ab8b974fc4c8e0c">getItem</span></span>()</td><td style="width: 21.0148%; height: 29px;">Item</td><td style="width: 39.1842%; height: 29px;">Returns the instance of the Item class associated with this ItemStackJS.</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getItemStack&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=566&col=18&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="7d3a5f3f5809a57115db51766f32f8b0da7357d94dad0b6a5c4ea8c96eef9847">getItemStack</span></span>()</td><td style="width: 21.0148%; height: 35px;">ItemStack</td><td style="width: 39.1842%; height: 35px;">Returns the vanilla ItemStack that this wraps.

</td></tr><tr style="height: 39px;"><td style="width: 39.801%; height: 39px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getId&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=570&col=15&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="af561a28dbb61856c3366f28cb6e31d240671d53eb3f010448c69d0809894ee1">getId</span></span>()</td><td style="width: 21.0148%; height: 39px;">String</td><td style="width: 39.1842%; height: 39px;">Returns the item id associated with this ItemStackJS in the form mod\_name:item\_name

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getTags&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=574&col=37&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="5e52cdda66216ad284941a8b0000498e383d9edf7e475ef170d9c402097b794e">getTags</span></span>()</td><td style="width: 21.0148%; height: 35px;">Colletion&lt;ResourceLocation&gt;</td><td style="width: 39.1842%; height: 35px;">Returns all item tags the item has. (NOT NBT tags).

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=hasTag&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=578&col=16&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="c0bc6c096eb38c596057b533f5b9a8b506ec1f52385ab4247523a8a0c8900452">hasTag</span></span>(<span class="pl-smi">ResourceLocation</span> <span class="pl-s1">tag</span>)</td><td style="width: 21.0148%; height: 35px;">boolean</td><td style="width: 39.1842%; height: 35px;">Returns if the item has the input tag or not.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=copy&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=583&col=20&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="b3f7eb72fb777219b3ecfc79fda101a36654bae76b2475ef4a55ee6b1548f004">copy</span></span>()</td><td style="width: 21.0148%; height: 35px;">ItemStackJS</td><td style="width: 39.1842%; height: 35px;">Returns a copy of this ItemStackJS.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setCount&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=594&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="f79d50293707de7afc970affee03315b73b5b5620d2791d268fdb247909be4ff">setCount</span></span>(<span class="pl-smi">int</span> <span class="pl-s1">count</span>)</td><td style="width: 21.0148%; height: 35px;">void</td><td style="width: 39.1842%; height: 35px;">Sets the count on this ItemStackJS.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;">getCount()</td><td style="width: 21.0148%; height: 35px;">int</td><td style="width: 39.1842%; height: 35px;">Gets the count.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;">withCount()</td><td style="width: 21.0148%; height: 35px;">ItemStackJS</td><td style="width: 39.1842%; height: 35px;">Returns a copy of this ItemStackJS with a different count.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=isEmpty&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=615&col=16&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="d4ef4c1fc1ada60e620f6ffbcd7e3202cfacc428be2ed1def4b2a37990ea8b3e">isEmpty</span></span>()</td><td style="width: 21.0148%; height: 35px;">boolean</td><td style="width: 39.1842%; height: 35px;">Returns if this is an empty item or not.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=isInvalidRecipeIngredient&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=620&col=16&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="692531abe457d29d88a0981a65e588f1636a8eada3f50847e272bda008601920">isInvalidRecipeIngredient</span></span>()</td><td style="width: 21.0148%; height: 35px;">boolean</td><td style="width: 39.1842%; height: 35px;">Returns if this is a valid recipe ingredient.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=isBlock&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=624&col=16&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="9e3c731c4337dfc259721147e98d0b7ac3649d0da9e31e2e66411fcdd9005dd1">isBlock</span></span>()</td><td style="width: 21.0148%; height: 35px;">boolean</td><td style="width: 39.1842%; height: 35px;">Returns if this item is a BlockItem, that is it can be placed and form a block.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=629&col=20&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="e08895205be09493486ab45212b61e517b6566c6393a83f39b3a8b3e684796b4"><span class="pl-c1">@</span><span class="pl-c1">Nullable </span>getNbt</span></span>()</td><td style="width: 21.0148%; height: 35px;">CompoundTag</td><td style="width: 39.1842%; height: 35px;">Gets this items NBT data.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">setNbt</span></span>(<span class="pl-c1">@</span><span class="pl-c1">Nullable</span> <span class="pl-smi">CompoundTag</span> <span class="pl-s1">tag</span>)</td><td style="width: 21.0148%; height: 35px;">void</td><td style="width: 39.1842%; height: 35px;">Sets this items NBT data

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0"> hasNBT() </span></span></td><td style="width: 21.0148%; height: 35px;">boolean</td><td style="width: 39.1842%; height: 35px;">Returns if this item has NBT data.

</td></tr><tr style="height: 80px;"><td style="width: 39.801%; height: 80px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">getNbtString()</span></span></td><td style="width: 21.0148%; height: 80px;">String</td><td style="width: 39.1842%; height: 80px;">Returns this items NBT data as a string. If you want to display it to the player see [Text#prettyPrintNbt](https://mods.latvian.dev/books/kubejs-legacy/page/components-kubejs-and-you#:~:text=prettyPrintNbt(Tag%20tag)).

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">removeNBT()</span></span></td><td style="width: 21.0148%; height: 35px;">ItemStackJS</td><td style="width: 39.1842%; height: 35px;">Returns a copy with no NBT data.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">withNBT(<span class="pl-smi">CompoundTag</span> <span class="pl-s1">nbt</span>)</span></span></td><td style="width: 21.0148%; height: 35px;">ItemStackJS</td><td style="width: 39.1842%; height: 35px;">Returns a copy with the specified NBT data. Any tags from the original NBT are kept if not overwritten by the NBT passed in.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0"> hasChance()</span></span></td><td style="width: 21.0148%; height: 35px;">boolean</td><td style="width: 39.1842%; height: 35px;">Returns if the ItemStackJS has a chance.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">removeChance()</span></span></td><td style="width: 21.0148%; height: 35px;">void</td><td style="width: 39.1842%; height: 35px;">Removes the chance from this ItemStackJS.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">setChance(<span class="pl-smi">double</span> <span class="pl-s1">c</span>)</span></span></td><td style="width: 21.0148%; height: 35px;">void</td><td style="width: 39.1842%; height: 35px;">Sets the chance for this ItemStackJS.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">getChance()</span></span></td><td style="width: 21.0148%; height: 35px;">double</td><td style="width: 39.1842%; height: 35px;">Returns the chance.

</td></tr><tr style="height: 80px;"><td style="width: 39.801%; height: 80px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">withChance(<span class="pl-smi">double</span> <span class="pl-s1">c</span>)</span></span></td><td style="width: 21.0148%; height: 80px;">ItemStackJS</td><td style="width: 39.1842%; height: 80px;">Returns a copy with the chance passed in, unless the chance passed in is the same as the current chance, in which case it returns this.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">getName()</span></span></td><td style="width: 21.0148%; height: 35px;">Components</td><td style="width: 39.1842%; height: 35px;">Returns this items name. Probably a Translateable Component unless its been overridden by something else (ie method below).

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">withName(<span class="pl-c1">@</span><span class="pl-c1">Nullable</span> <span class="pl-smi">Component</span> <span class="pl-s1">displayName</span>)</span></span></td><td style="width: 21.0148%; height: 35px;">ItemStackJS</td><td style="width: 39.1842%; height: 35px;">Returns a copy with a different display name set.

</td></tr><tr style="height: 80px;"><td style="width: 39.801%; height: 80px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">toString()</span></span></td><td style="width: 21.0148%; height: 80px;">String</td><td style="width: 39.1842%; height: 80px;">Returns a string representing this ItemStackJS. The same method used for the `/kubejs hand` command.

</td></tr><tr style="height: 57px;"><td style="width: 39.801%; height: 57px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">test(<span class="pl-smi">ItemStackJS</span> <span class="pl-s1">other)</span></span></span></td><td style="width: 21.0148%; height: 57px;">boolean</td><td style="width: 39.1842%; height: 57px;">Returns if this ItemStackJS equals another one. Tests for item type and NBT data.

</td></tr><tr style="height: 57px;"><td style="width: 39.801%; height: 57px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">testVanilla(<span class="pl-smi">ItemStack</span> <span class="pl-s1">other</span>)</span></span></td><td style="width: 21.0148%; height: 57px;">boolean</td><td style="width: 39.1842%; height: 57px;">Returns if this ItemStackJS equals the passed in ItemStack. Tests for item type and NBT data.

</td></tr><tr style="height: 80px;"><td style="width: 39.801%; height: 80px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">testVanillaItem(<span class="pl-smi">Item</span> <span class="pl-s1">item</span>)</span></span>

</td><td style="width: 21.0148%; height: 80px;">boolean</td><td style="width: 39.1842%; height: 80px;">Returns if the Item passed in is the same as this ItemStackJS's Item. Basically checks they are the same item type.

</td></tr><tr style="height: 57px;"><td style="width: 39.801%; height: 57px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">getStacks()</span></span></td><td style="width: 21.0148%; height: 57px;"><span class="pl-smi">Set</span>&lt;<span class="pl-smi">ItemStackJS</span>&gt;</td><td style="width: 39.1842%; height: 57px;">Returns this ItemStackJS as the only entry in a Set.

</td></tr><tr style="height: 57px;"><td style="width: 39.801%; height: 57px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">getVanillaItems()</span></span></td><td style="width: 21.0148%; height: 57px;">Set&lt;Item&gt;</td><td style="width: 39.1842%; height: 57px;">Returns this ItemStackJS associated Item as the only entry in a Set.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">getFirst()</span></span></td><td style="width: 21.0148%; height: 35px;">ItemStackJS</td><td style="width: 39.1842%; height: 35px;">Retuns a copy of this ItemStackJS

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0"> hashCode()</span></span></td><td style="width: 21.0148%; height: 35px;">int</td><td style="width: 39.1842%; height: 35px;">Returns a hash code of the Item and NBT data.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">equals(<span class="pl-smi">Object</span> <span class="pl-s1">o</span>)</span></span></td><td style="width: 21.0148%; height: 35px;">boolean</td><td style="width: 39.1842%; height: 35px;">Returns if this is equal to the input object.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">strongEquals(<span class="pl-smi">Object</span> <span class="pl-s1">o</span>)</span></span></td><td style="width: 21.0148%; height: 35px;">boolean</td><td style="width: 39.1842%; height: 35px;">Returns if this is equal to the input object. Checks count as well.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">getEnchantments()</span></span></td><td style="width: 21.0148%; height: 35px;">MapJS</td><td style="width: 39.1842%; height: 35px;">Returns a MapJS of this itemStackJS enchament id's to their level.

</td></tr><tr style="height: 57px;"><td style="width: 39.801%; height: 57px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">hasEnchantment(<span class="pl-smi">Enchantment</span> <span class="pl-s1">enchantment</span>, <span class="pl-smi">int</span> <span class="pl-s1">level</span>)</span></span></td><td style="width: 21.0148%; height: 57px;">boolean</td><td style="width: 39.1842%; height: 57px;">Returns if this ItemStackJS is enchanted with a minimum of the passed in enchantment level.

</td></tr><tr style="height: 102px;"><td style="width: 39.801%; height: 102px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0"> enchant(<span class="pl-smi">MapJS</span> <span class="pl-s1">enchantments</span>)</span></span></td><td style="width: 21.0148%; height: 102px;">ItemStackJS</td><td style="width: 39.1842%; height: 102px;">Enchants a copy of this ItemStackJS with the MapJS passed in (it should be a map of enchantment ids to levels), then returns the copy.

</td></tr><tr style="height: 80px;"><td style="width: 39.801%; height: 80px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">enchant(<span class="pl-smi">Enchantment</span> <span class="pl-s1">enchantment</span>, <span class="pl-smi">int</span> <span class="pl-s1">level</span>)</span></span></td><td style="width: 21.0148%; height: 80px;">ItemStackJS</td><td style="width: 39.1842%; height: 80px;">Enchants a copy of this item with the passed in Enchantment at the specified level, then returns the copy.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">getMod()</span></span></td><td style="width: 21.0148%; height: 35px;">String</td><td style="width: 39.1842%; height: 35px;">Returns the mod id of the mod this item is from.

</td></tr><tr style="height: 57px;"><td style="width: 39.801%; height: 57px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">ignoreNBT()</span></span></td><td style="width: 21.0148%; height: 57px;">IngredientJS</td><td style="width: 39.1842%; height: 57px;">Returns a new <span class="pl-smi"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=IgnoreNBTIngredientJS&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=937&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="790eaec8706d147317bd58b38b56a78b4787d2fbc8b6c34dfba8bf874e5f86f2">IgnoreNBTIngredientJS of this item.</span></span>

</td></tr><tr style="height: 57px;"><td style="width: 39.801%; height: 57px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">weakNBT()</span></span></td><td style="width: 21.0148%; height: 57px;">IngredientJS</td><td style="width: 39.1842%; height: 57px;">Returns a new Weak<span class="pl-smi"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=IgnoreNBTIngredientJS&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=937&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="790eaec8706d147317bd58b38b56a78b4787d2fbc8b6c34dfba8bf874e5f86f2">NBTIngredientJS of this item.</span></span>

</td></tr><tr style="height: 57px;"><td style="width: 39.801%; height: 57px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">areItemsEqual(<span class="pl-smi">ItemStackJS</span> <span class="pl-s1">other</span>)</span></span></td><td style="width: 21.0148%; height: 57px;">boolean</td><td style="width: 39.1842%; height: 57px;">Returns if this item type is equal to the item type of the passed in ItemStackJS

</td></tr><tr style="height: 57px;"><td style="width: 39.801%; height: 57px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">areItemsEqual(<span class="pl-smi">ItemStack</span> <span class="pl-s1">other</span>)</span></span></td><td style="width: 21.0148%; height: 57px;">boolean</td><td style="width: 39.1842%; height: 57px;">Returns if this item type is equal to the item type of the passed in ItemStack

</td></tr><tr style="height: 57px;"><td style="width: 39.801%; height: 57px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">isNBTEqual(<span class="pl-smi">ItemStackJS</span> <span class="pl-s1">other</span>)</span></span></td><td style="width: 21.0148%; height: 57px;">boolean</td><td style="width: 39.1842%; height: 57px;">Returns if the NBT of this ItemStackJS is equal to the NBT of the ItemStackJS passed in.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">isNBTEqual(<span class="pl-smi">ItemStack</span> <span class="pl-s1">other</span>)</span></span></td><td style="width: 21.0148%; height: 35px;">boolean</td><td style="width: 39.1842%; height: 35px;">Returns if the NBT of this ItemStackJS is equal to the NBT of the ItemStack passed in.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">getHarvestSpeed(<span class="pl-c1">@</span><span class="pl-c1">Nullable</span> <span class="pl-smi">BlockContainerJS</span> <span class="pl-s1">block</span>)</span></span></td><td style="width: 21.0148%; height: 35px;">float</td><td style="width: 39.1842%; height: 35px;">Returns the mining speed of this ItemStackJS if used to mine the passed in BlockContainerJS

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0"> getHarvestSpeed()</span></span></td><td style="width: 21.0148%; height: 35px;">float</td><td style="width: 39.1842%; height: 35px;">Returns this items default mining speed

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;">toJson() <span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">toResultJson()</span></span>

<span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=setNbt&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=633&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="1335ef3ac30e50b7ccec30094a75449f1723b3ddff123b42af780601f8da64d0">toRawResultJson()</span></span>

</td><td style="width: 21.0148%; height: 35px;">JsonElement</td><td style="width: 39.1842%; height: 35px;">Returns a Json representation of this ItemStackJS. They all appear to work almost identically.

</td></tr><tr style="height: 80px;"><td style="width: 39.801%; height: 80px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=toNBT&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=1026&col=20&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="191aa82c4815ff0e2cdb1275538c31a372eb9268654ed8a48b1b0a2009435c99">toNBT</span></span>()</td><td style="width: 21.0148%; height: 80px;">CompoundTag</td><td style="width: 39.1842%; height: 80px;">Returns an NBT representation of this ItemStackJS, the same sort that vanilla uses to store items in blocks.

</td></tr><tr style="height: 57px;"><td style="width: 39.801%; height: 57px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=onChanged&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=1031&col=13&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="0b10f889d232030de77f06a13c3aaf3606d00c3647b0e23414c7b8043cd58406">onChanged</span></span>(<span class="pl-c1">@</span><span class="pl-c1">Nullable</span> <span class="pl-smi">Tag</span> <span class="pl-s1">o</span>)</td><td style="width: 21.0148%; height: 57px;">void</td><td style="width: 39.1842%; height: 57px;">Sets the items NBT data to the tag passed in, only if it is a CompoundTag or null.

</td></tr><tr style="height: 35px;"><td style="width: 39.801%; height: 35px;"><span class="pl-en"><span class="pl-token" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":46427577,"ref":"2b5102307b08168ce6d6d4af4206d865d27fd6ee","language":"Java","backend":"ALEPH_FUZZY","code_nav_context":"BLOB_VIEW","retry_backend":"","cross_repo_results_included":"CROSS_REPO_NOT_ENABLED","in_repo_result_count":1,"cross_repo_result_count":0,"originating_url":"https://github.com/KubeJS-Mods/KubeJS/find-definition?q=getItemGroup&blob_path=common%2Fsrc%2Fmain%2Fjava%2Fdev%2Flatvian%2Fmods%2Fkubejs%2Fitem%2FItemStackJS.java&ref=2b5102307b08168ce6d6d4af4206d865d27fd6ee&language=Java&row=1037&col=15&code_nav_context=BLOB_VIEW","user_id":73862885}}" data-hydro-click-hmac="290ffede52ea8130a3ae4c63aa930f948c0b715186b2a13fdc75a930b37ce57d">getItemGroup</span></span>()</td><td style="width: 21.0148%; height: 35px;">String</td><td style="width: 39.1842%; height: 35px;">Returns the name of the creative tab this item belongs in. An empty string if it does not exist in the creative tabs (like a jigsaw block).

</td></tr><tr style="height: 29px;"><td style="width: 39.801%; height: 29px;">getItemIds()</td><td style="width: 21.0148%; height: 29px;">Set&lt;String&gt;</td><td style="width: 39.1842%; height: 29px;">Returns a set with this items id as the only entry.</td></tr><tr style="height: 45px;"><td style="width: 39.801%; height: 45px;">getFluidStack()</td><td style="width: 21.0148%; height: 45px;">FluidStackJS</td><td style="width: 39.1842%; height: 45px;">Returns null, by default. Overriden by some superclasses to return the FluidStackJS that this item represents.</td></tr><tr style="height: 29px;"><td style="width: 39.801%; height: 29px;">getTypeData()</td><td style="width: 21.0148%; height: 29px;">CompoundTag</td><td style="width: 39.1842%; height: 29px;">Unknown purpose.</td></tr></tbody></table>

```
<TODO: Examples>
```