Files

1374 lines
49 KiB
HTML
Raw Permalink Normal View History

2024-03-20 02:28:51 -04:00
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
2025-10-28 02:05:17 -04:00
<!-- Generated by javadoc (11.0.27) on Tue Oct 28 02:00:43 EDT 2025 -->
2024-03-20 02:28:51 -04:00
<title>IItemStack</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
2025-10-28 02:05:17 -04:00
<meta name="dc.created" content="2025-10-28">
2024-03-20 02:28:51 -04:00
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
2025-10-28 02:05:17 -04:00
<script type="text/javascript" src="../../../../jquery/jquery-3.7.1.min.js"></script>
2024-03-20 02:28:51 -04:00
<script type="text/javascript" src="../../../../jquery/jquery-ui.min.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="IItemStack";
}
}
catch(err) {
}
//-->
2025-05-29 16:27:42 -04:00
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6,"i25":6,"i26":6,"i27":6,"i28":6,"i29":6,"i30":6,"i31":6,"i32":6,"i33":6,"i34":6,"i35":6,"i36":6,"i37":6,"i38":6,"i39":6,"i40":6,"i41":6,"i42":6,"i43":6,"i44":6,"i45":6,"i46":6,"i47":6,"i48":6,"i49":6,"i50":6,"i51":6,"i52":6};
2024-03-20 02:28:51 -04:00
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">noppes.npcs.api.item</a></div>
<h2 title="Interface IItemStack" class="title">Interface IItemStack</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Subinterfaces:</dt>
2025-05-29 16:27:42 -04:00
<dd><code><a href="IItemCustom.html" title="interface in noppes.npcs.api.item">IItemCustom</a></code>, <code><a href="IItemCustomizable.html" title="interface in noppes.npcs.api.item">IItemCustomizable</a></code>, <code><a href="IItemLinked.html" title="interface in noppes.npcs.api.item">IItemLinked</a></code></dd>
2024-03-20 02:28:51 -04:00
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">IItemStack</span></pre>
2025-05-29 16:27:42 -04:00
<div class="block">Represents an item stack with extended functionality:
enchantments, lore, and additional item data.</div>
2024-03-20 02:28:51 -04:00
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addEnchant(int,int)">addEnchant</a></span>&#8203;(int&nbsp;id,
int&nbsp;strength)</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Adds an enchantment to the item.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
<tr id="i1" class="rowColor">
2025-05-29 16:27:42 -04:00
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#compare(noppes.npcs.api.item.IItemStack,boolean)">compare</a></span>&#8203;(<a href="IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a>&nbsp;item,
boolean&nbsp;ignoreNBT)</code></th>
<td class="colLast">
<div class="block">Compares this item with another item, with an option to ignore NBT data.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#compare(noppes.npcs.api.item.IItemStack,boolean,boolean)">compare</a></span>&#8203;(<a href="IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a>&nbsp;item,
boolean&nbsp;ignoreDamage,
boolean&nbsp;ignoreNBT)</code></th>
<td class="colLast">
<div class="block">Compares this item with another item, with options to ignore damage and/or NBT data.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#copy()">copy</a></span>()</code></th>
<td class="colLast">
<div class="block">Creates a deep copy of this item stack.</div>
</td>
</tr>
<tr id="i4" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAttribute(java.lang.String)">getAttribute</a></span>&#8203;(java.lang.String&nbsp;name)</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Retrieves the attribute value using the default MC attribute system.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i5" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBookAuthor()">getBookAuthor</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i6" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>java.lang.String[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBookText()">getBookText</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i7" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBookTitle()">getBookTitle</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i8" class="altColor">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCustomAttribute(java.lang.String)">getCustomAttribute</a></span>&#8203;(java.lang.String&nbsp;key)</code></th>
<td class="colLast">
<div class="block">Returns the custom attribute object associated with the given key.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>java.lang.String[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCustomAttributeKeys()">getCustomAttributeKeys</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns an array of all custom attribute keys stored on the item.</div>
</td>
</tr>
<tr id="i10" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDisplayName()">getDisplayName</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i11" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getItemDamage()">getItemDamage</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i12" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getItemName()">getItemName</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i13" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code><a href="../INbt.html" title="interface in noppes.npcs.api">INbt</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getItemNbt()">getItemNbt</a></span>()</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Returns an INbt instance representing the full NBT data of the item.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i14" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>java.lang.String[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLore()">getLore</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i15" class="rowColor">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMagicAttribute(java.lang.String,int)">getMagicAttribute</a></span>&#8203;(java.lang.String&nbsp;key,
int&nbsp;magicId)</code></th>
<td class="colLast">
<div class="block">Returns the magic attribute object (typically a Float value) associated with the given key and magic identifier.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>java.lang.String[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMagicAttributeKeys(java.lang.String)">getMagicAttributeKeys</a></span>&#8203;(java.lang.String&nbsp;key)</code></th>
<td class="colLast">
<div class="block">Returns an array of all magic attribute keys (as strings) for the specified magic attribute key.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxItemDamage()">getMaxItemDamage</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxStackSize()">getMaxStackSize</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i19" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>net.minecraft.item.ItemStack</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMCItemStack()">getMCItemStack</a></span>()</code></th>
<td class="colLast">
2025-05-29 16:27:42 -04:00
<div class="block">Returns the underlying Minecraft ItemStack.</div>
2024-03-20 02:28:51 -04:00
</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i20" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>net.minecraft.nbt.NBTTagCompound</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMCNbt()">getMCNbt</a></span>()</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Returns the underlying Minecraft NBTTagCompound for the item.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i21" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getName()">getName</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i22" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code><a href="../INbt.html" title="interface in noppes.npcs.api">INbt</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNbt()">getNbt</a></span>()</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Returns an INbt instance representing the item's custom NBT data.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i23" class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRequirement(java.lang.String)">getRequirement</a></span>&#8203;(java.lang.String&nbsp;reqKey)</code></th>
<td class="colLast">
<div class="block">Retrieves the requirement value for the specified key.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>java.lang.String[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRequirementKeys()">getRequirementKeys</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns an array of all requirement keys stored on the item.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStackSize()">getStackSize</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i26" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>java.lang.Object</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTag(java.lang.String)">getTag</a></span>&#8203;(java.lang.String&nbsp;key)</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Returns the value of the NBT tag with the specified key.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i27" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasAttribute(java.lang.String)">hasAttribute</a></span>&#8203;(java.lang.String&nbsp;name)</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Checks if the item has an attribute (using the default MC attribute system).</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i28" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasCustomAttribute(java.lang.String)">hasCustomAttribute</a></span>&#8203;(java.lang.String&nbsp;key)</code></th>
<td class="colLast">
<div class="block">Checks whether the item has a custom attribute with the specified key.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasCustomName()">hasCustomName</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i30" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasEnchant(int)">hasEnchant</a></span>&#8203;(int&nbsp;id)</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Checks if the item has the specified enchantment.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i31" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasLore()">hasLore</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i32" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasMagicAttribute(java.lang.String,int)">hasMagicAttribute</a></span>&#8203;(java.lang.String&nbsp;key,
int&nbsp;magicId)</code></th>
<td class="colLast">
<div class="block">Checks whether the item has a magic attribute with the given key and magic identifier.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasRequirement(java.lang.String)">hasRequirement</a></span>&#8203;(java.lang.String&nbsp;reqKey)</code></th>
<td class="colLast">
<div class="block">Checks whether the item has a requirement with the specified key.</div>
</td>
</tr>
<tr id="i34" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasTag(java.lang.String)">hasTag</a></span>&#8203;(java.lang.String&nbsp;key)</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Checks if the item has an NBT tag with the specified key.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i35" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isBlock()">isBlock</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i36" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isEnchanted()">isEnchanted</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i37" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isWrittenBook()">isWrittenBook</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i38" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#itemHash()">itemHash</a></span>()</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Returns a hash value for the item.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i39" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeCustomAttribute(java.lang.String)">removeCustomAttribute</a></span>&#8203;(java.lang.String&nbsp;key)</code></th>
<td class="colLast">
<div class="block">Removes the custom attribute with the specified key from the item.</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeMagicAttribute(java.lang.String,int)">removeMagicAttribute</a></span>&#8203;(java.lang.String&nbsp;key,
int&nbsp;magicId)</code></th>
<td class="colLast">
<div class="block">Removes the magic attribute with the specified key and magic identifier from the item.</div>
</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeRequirement(java.lang.String)">removeRequirement</a></span>&#8203;(java.lang.String&nbsp;reqKey)</code></th>
<td class="colLast">
<div class="block">Removes the requirement with the specified key from the item.</div>
</td>
</tr>
<tr id="i42" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code><a href="../INbt.html" title="interface in noppes.npcs.api">INbt</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeTags()">removeTags</a></span>()</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Removes all custom tags from the item and returns the removed NBT data.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i43" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAttribute(java.lang.String,double)">setAttribute</a></span>&#8203;(java.lang.String&nbsp;name,
double&nbsp;value)</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Sets an attribute on the item using the default MC attribute system.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i44" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCustomAttribute(java.lang.String,double)">setCustomAttribute</a></span>&#8203;(java.lang.String&nbsp;key,
double&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the custom attribute value for the given key.</div>
</td>
</tr>
<tr id="i45" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCustomName(java.lang.String)">setCustomName</a></span>&#8203;(java.lang.String&nbsp;name)</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Sets the custom name for the item.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i46" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setItemDamage(int)">setItemDamage</a></span>&#8203;(int&nbsp;value)</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Sets the item damage value.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i47" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setLore(java.lang.String%5B%5D)">setLore</a></span>&#8203;(java.lang.String[]&nbsp;lore)</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Sets the lore for the item.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i48" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMagicAttribute(java.lang.String,int,double)">setMagicAttribute</a></span>&#8203;(java.lang.String&nbsp;key,
int&nbsp;magicId,
double&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the magic attribute value for the given key and magic identifier.</div>
</td>
</tr>
<tr id="i49" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMCNbt(net.minecraft.nbt.NBTTagCompound)">setMCNbt</a></span>&#8203;(net.minecraft.nbt.NBTTagCompound&nbsp;compound)</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Sets the underlying Minecraft NBTTagCompound for the item.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i50" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setRequirement(java.lang.String,java.lang.Object)">setRequirement</a></span>&#8203;(java.lang.String&nbsp;reqKey,
java.lang.Object&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets (or applies) a requirement for the item using the given requirement key and value.</div>
</td>
</tr>
<tr id="i51" class="rowColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setStackSize(int)">setStackSize</a></span>&#8203;(int&nbsp;size)</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Sets the stack size of the item.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
2025-05-29 16:27:42 -04:00
<tr id="i52" class="altColor">
2024-03-20 02:28:51 -04:00
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setTag(java.lang.String,java.lang.Object)">setTag</a></span>&#8203;(java.lang.String&nbsp;key,
java.lang.Object&nbsp;value)</code></th>
2025-05-29 16:27:42 -04:00
<td class="colLast">
<div class="block">Sets an NBT tag for this item.</div>
</td>
2024-03-20 02:28:51 -04:00
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getName</h4>
<pre class="methodSignature">java.lang.String&nbsp;getName()</pre>
</li>
</ul>
<a id="getStackSize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStackSize</h4>
<pre class="methodSignature">int&nbsp;getStackSize()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
2025-05-29 16:27:42 -04:00
<dd>Returns the stack size.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="hasCustomName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasCustomName</h4>
<pre class="methodSignature">boolean&nbsp;hasCustomName()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
2025-05-29 16:27:42 -04:00
<dd>Returns whether the item has a custom name.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="setCustomName(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCustomName</h4>
<pre class="methodSignature">void&nbsp;setCustomName&#8203;(java.lang.String&nbsp;name)</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Sets the custom name for the item.</div>
2024-03-20 02:28:51 -04:00
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
2025-05-29 16:27:42 -04:00
<dd><code>name</code> - The custom name.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="getDisplayName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDisplayName</h4>
<pre class="methodSignature">java.lang.String&nbsp;getDisplayName()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
2025-05-29 16:27:42 -04:00
<dd>Returns the in-game displayed name. This is either the item name or the custom name if set.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="getItemName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getItemName</h4>
<pre class="methodSignature">java.lang.String&nbsp;getItemName()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
2025-05-29 16:27:42 -04:00
<dd>Returns the base item name, regardless of any custom name.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="setStackSize(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStackSize</h4>
<pre class="methodSignature">void&nbsp;setStackSize&#8203;(int&nbsp;size)</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Sets the stack size of the item.</div>
2024-03-20 02:28:51 -04:00
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
2025-05-29 16:27:42 -04:00
<dd><code>size</code> - The new stack size (between 1 and 64).</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="getMaxStackSize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxStackSize</h4>
<pre class="methodSignature">int&nbsp;getMaxStackSize()</pre>
2025-05-29 16:27:42 -04:00
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Returns the maximum stack size for this item.</dd>
</dl>
2024-03-20 02:28:51 -04:00
</li>
</ul>
<a id="getItemDamage()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getItemDamage</h4>
<pre class="methodSignature">int&nbsp;getItemDamage()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
2025-05-29 16:27:42 -04:00
<dd>Returns the item damage. For tools, this represents durability.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="setItemDamage(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setItemDamage</h4>
<pre class="methodSignature">void&nbsp;setItemDamage&#8203;(int&nbsp;value)</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Sets the item damage value.</div>
2024-03-20 02:28:51 -04:00
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
2025-05-29 16:27:42 -04:00
<dd><code>value</code> - The new damage value.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="setTag(java.lang.String,java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTag</h4>
<pre class="methodSignature">void&nbsp;setTag&#8203;(java.lang.String&nbsp;key,
java.lang.Object&nbsp;value)</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Sets an NBT tag for this item.</div>
2024-03-20 02:28:51 -04:00
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
2025-05-29 16:27:42 -04:00
<dd><code>key</code> - The tag key.</dd>
<dd><code>value</code> - The value to store (Number or String).</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="hasTag(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasTag</h4>
<pre class="methodSignature">boolean&nbsp;hasTag&#8203;(java.lang.String&nbsp;key)</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Checks if the item has an NBT tag with the specified key.</div>
2024-03-20 02:28:51 -04:00
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
2025-05-29 16:27:42 -04:00
<dd><code>key</code> - The tag key.</dd>
2024-03-20 02:28:51 -04:00
<dt><span class="returnLabel">Returns:</span></dt>
2025-05-29 16:27:42 -04:00
<dd>true if present, false otherwise.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="getTag(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTag</h4>
<pre class="methodSignature">java.lang.Object&nbsp;getTag&#8203;(java.lang.String&nbsp;key)</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Returns the value of the NBT tag with the specified key.</div>
2024-03-20 02:28:51 -04:00
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
2025-05-29 16:27:42 -04:00
<dd><code>key</code> - The tag key.</dd>
2024-03-20 02:28:51 -04:00
<dt><span class="returnLabel">Returns:</span></dt>
2025-05-29 16:27:42 -04:00
<dd>The tag value, or null if not present.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="removeTags()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeTags</h4>
<pre class="methodSignature"><a href="../INbt.html" title="interface in noppes.npcs.api">INbt</a>&nbsp;removeTags()</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Removes all custom tags from the item and returns the removed NBT data.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The removed NBT data.</dd>
</dl>
2024-03-20 02:28:51 -04:00
</li>
</ul>
<a id="isEnchanted()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEnchanted</h4>
<pre class="methodSignature">boolean&nbsp;isEnchanted()</pre>
2025-05-29 16:27:42 -04:00
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Returns whether the item is enchanted.</dd>
</dl>
2024-03-20 02:28:51 -04:00
</li>
</ul>
<a id="hasEnchant(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasEnchant</h4>
<pre class="methodSignature">boolean&nbsp;hasEnchant&#8203;(int&nbsp;id)</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Checks if the item has the specified enchantment.</div>
2024-03-20 02:28:51 -04:00
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
2025-05-29 16:27:42 -04:00
<dd><code>id</code> - The enchantment id.</dd>
2024-03-20 02:28:51 -04:00
<dt><span class="returnLabel">Returns:</span></dt>
2025-05-29 16:27:42 -04:00
<dd>true if present, false otherwise.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="addEnchant(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addEnchant</h4>
<pre class="methodSignature">void&nbsp;addEnchant&#8203;(int&nbsp;id,
int&nbsp;strength)</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Adds an enchantment to the item.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - The enchantment id.</dd>
<dd><code>strength</code> - The enchantment strength.</dd>
</dl>
2024-03-20 02:28:51 -04:00
</li>
</ul>
<a id="setAttribute(java.lang.String,double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAttribute</h4>
<pre class="methodSignature">void&nbsp;setAttribute&#8203;(java.lang.String&nbsp;name,
double&nbsp;value)</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Sets an attribute on the item using the default MC attribute system.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - The attribute key.</dd>
<dd><code>value</code> - The attribute value.</dd>
</dl>
2024-03-20 02:28:51 -04:00
</li>
</ul>
<a id="getAttribute(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAttribute</h4>
<pre class="methodSignature">double&nbsp;getAttribute&#8203;(java.lang.String&nbsp;name)</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Retrieves the attribute value using the default MC attribute system.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - The attribute key.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The attribute value.</dd>
</dl>
</li>
</ul>
<a id="hasAttribute(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasAttribute</h4>
<pre class="methodSignature">boolean&nbsp;hasAttribute&#8203;(java.lang.String&nbsp;name)</pre>
<div class="block">Checks if the item has an attribute (using the default MC attribute system).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - The attribute key.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if present, false otherwise.</dd>
</dl>
</li>
</ul>
<a id="setCustomAttribute(java.lang.String,double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCustomAttribute</h4>
<pre class="methodSignature">void&nbsp;setCustomAttribute&#8203;(java.lang.String&nbsp;key,
double&nbsp;value)</pre>
<div class="block">Sets the custom attribute value for the given key.
The value is stored in the item's custom NBT structure.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - The custom attribute key.</dd>
<dd><code>value</code> - The attribute value.</dd>
</dl>
</li>
</ul>
<a id="hasCustomAttribute(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasCustomAttribute</h4>
<pre class="methodSignature">boolean&nbsp;hasCustomAttribute&#8203;(java.lang.String&nbsp;key)</pre>
<div class="block">Checks whether the item has a custom attribute with the specified key.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - The custom attribute key.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the attribute exists, false otherwise.</dd>
</dl>
</li>
</ul>
<a id="getCustomAttribute(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCustomAttribute</h4>
<pre class="methodSignature">float&nbsp;getCustomAttribute&#8203;(java.lang.String&nbsp;key)</pre>
<div class="block">Returns the custom attribute object associated with the given key.
This may be a raw value or a more complex structure.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - The custom attribute key.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The attribute object value</dd>
</dl>
</li>
</ul>
<a id="removeCustomAttribute(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeCustomAttribute</h4>
<pre class="methodSignature">void&nbsp;removeCustomAttribute&#8203;(java.lang.String&nbsp;key)</pre>
<div class="block">Removes the custom attribute with the specified key from the item.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - The custom attribute key.</dd>
</dl>
</li>
</ul>
<a id="setMagicAttribute(java.lang.String,int,double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMagicAttribute</h4>
<pre class="methodSignature">void&nbsp;setMagicAttribute&#8203;(java.lang.String&nbsp;key,
int&nbsp;magicId,
double&nbsp;value)</pre>
<div class="block">Sets the magic attribute value for the given key and magic identifier.
The value is stored in the item's custom NBT under "RPGCore" -> "Magic".</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - The magic attribute key.</dd>
<dd><code>magicId</code> - The magic identifier.</dd>
<dd><code>value</code> - The attribute value.</dd>
</dl>
</li>
</ul>
<a id="hasMagicAttribute(java.lang.String,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasMagicAttribute</h4>
<pre class="methodSignature">boolean&nbsp;hasMagicAttribute&#8203;(java.lang.String&nbsp;key,
int&nbsp;magicId)</pre>
<div class="block">Checks whether the item has a magic attribute with the given key and magic identifier.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - The magic attribute key.</dd>
<dd><code>magicId</code> - The magic identifier.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the attribute exists, false otherwise.</dd>
</dl>
</li>
</ul>
<a id="getMagicAttribute(java.lang.String,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMagicAttribute</h4>
<pre class="methodSignature">float&nbsp;getMagicAttribute&#8203;(java.lang.String&nbsp;key,
int&nbsp;magicId)</pre>
<div class="block">Returns the magic attribute object (typically a Float value) associated with the given key and magic identifier.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - The magic attribute key.</dd>
<dd><code>magicId</code> - The magic identifier.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The attribute object, or null if not present.</dd>
</dl>
</li>
</ul>
<a id="removeMagicAttribute(java.lang.String,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeMagicAttribute</h4>
<pre class="methodSignature">void&nbsp;removeMagicAttribute&#8203;(java.lang.String&nbsp;key,
int&nbsp;magicId)</pre>
<div class="block">Removes the magic attribute with the specified key and magic identifier from the item.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - The magic attribute key.</dd>
<dd><code>magicId</code> - The magic identifier.</dd>
</dl>
</li>
</ul>
<a id="setRequirement(java.lang.String,java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRequirement</h4>
<pre class="methodSignature">void&nbsp;setRequirement&#8203;(java.lang.String&nbsp;reqKey,
java.lang.Object&nbsp;value)</pre>
<div class="block">Sets (or applies) a requirement for the item using the given requirement key and value.
The requirement data is stored under "RPGCore" → "Requirements" in the item's NBT.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reqKey</code> - The requirement key.</dd>
<dd><code>value</code> - The requirement value (Number or String).</dd>
</dl>
</li>
</ul>
<a id="hasRequirement(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasRequirement</h4>
<pre class="methodSignature">boolean&nbsp;hasRequirement&#8203;(java.lang.String&nbsp;reqKey)</pre>
<div class="block">Checks whether the item has a requirement with the specified key.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reqKey</code> - The requirement key.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the requirement exists, false otherwise.</dd>
</dl>
</li>
</ul>
<a id="getRequirement(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRequirement</h4>
<pre class="methodSignature">java.lang.Object&nbsp;getRequirement&#8203;(java.lang.String&nbsp;reqKey)</pre>
<div class="block">Retrieves the requirement value for the specified key.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reqKey</code> - The requirement key.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The requirement value as an Object (or null if not present).</dd>
</dl>
</li>
</ul>
<a id="removeRequirement(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeRequirement</h4>
<pre class="methodSignature">void&nbsp;removeRequirement&#8203;(java.lang.String&nbsp;reqKey)</pre>
<div class="block">Removes the requirement with the specified key from the item.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reqKey</code> - The requirement key.</dd>
</dl>
</li>
</ul>
<a id="getCustomAttributeKeys()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCustomAttributeKeys</h4>
<pre class="methodSignature">java.lang.String[]&nbsp;getCustomAttributeKeys()</pre>
<div class="block">Returns an array of all custom attribute keys stored on the item.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an array of custom attribute keys.</dd>
</dl>
</li>
</ul>
<a id="getMagicAttributeKeys(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMagicAttributeKeys</h4>
<pre class="methodSignature">java.lang.String[]&nbsp;getMagicAttributeKeys&#8203;(java.lang.String&nbsp;key)</pre>
<div class="block">Returns an array of all magic attribute keys (as strings) for the specified magic attribute key.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - the magic attribute key (e.g. "magic_damage").</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an array of magic identifier keys as strings.</dd>
</dl>
</li>
</ul>
<a id="getRequirementKeys()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRequirementKeys</h4>
<pre class="methodSignature">java.lang.String[]&nbsp;getRequirementKeys()</pre>
<div class="block">Returns an array of all requirement keys stored on the item.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an array of requirement keys.</dd>
</dl>
2024-03-20 02:28:51 -04:00
</li>
</ul>
<a id="getLore()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLore</h4>
<pre class="methodSignature">java.lang.String[]&nbsp;getLore()</pre>
2025-05-29 16:27:42 -04:00
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Returns the lore (descriptive text) for the item.</dd>
</dl>
2024-03-20 02:28:51 -04:00
</li>
</ul>
<a id="hasLore()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasLore</h4>
<pre class="methodSignature">boolean&nbsp;hasLore()</pre>
2025-05-29 16:27:42 -04:00
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Returns whether the item has lore.</dd>
</dl>
2024-03-20 02:28:51 -04:00
</li>
</ul>
<a id="setLore(java.lang.String[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLore</h4>
<pre class="methodSignature">void&nbsp;setLore&#8203;(java.lang.String[]&nbsp;lore)</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Sets the lore for the item.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lore</code> - An array of lore strings.</dd>
</dl>
2024-03-20 02:28:51 -04:00
</li>
</ul>
2025-05-29 16:27:42 -04:00
<a id="copy()">
2024-03-20 02:28:51 -04:00
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
2025-05-29 16:27:42 -04:00
<h4>copy</h4>
<pre class="methodSignature"><a href="IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a>&nbsp;copy()</pre>
<div class="block">Creates a deep copy of this item stack.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A copy of the item stack.</dd>
</dl>
</li>
</ul>
<a id="getMaxItemDamage()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxItemDamage</h4>
<pre class="methodSignature">int&nbsp;getMaxItemDamage()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Returns the maximum damage the item can sustain.</dd>
</dl>
2024-03-20 02:28:51 -04:00
</li>
</ul>
<a id="isWrittenBook()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isWrittenBook</h4>
<pre class="methodSignature">boolean&nbsp;isWrittenBook()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
2025-05-29 16:27:42 -04:00
<dd>Returns whether the item is a written book.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="getBookTitle()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBookTitle</h4>
<pre class="methodSignature">java.lang.String&nbsp;getBookTitle()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
2025-05-29 16:27:42 -04:00
<dd>Returns the book's title.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="getBookAuthor()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBookAuthor</h4>
<pre class="methodSignature">java.lang.String&nbsp;getBookAuthor()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
2025-05-29 16:27:42 -04:00
<dd>Returns the book's author.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="getBookText()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBookText</h4>
<pre class="methodSignature">java.lang.String[]&nbsp;getBookText()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
2025-05-29 16:27:42 -04:00
<dd>If the item is a book, returns the book pages.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="isBlock()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isBlock</h4>
<pre class="methodSignature">boolean&nbsp;isBlock()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
2025-05-29 16:27:42 -04:00
<dd>Returns whether the item represents a block.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="getNbt()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNbt</h4>
<pre class="methodSignature"><a href="../INbt.html" title="interface in noppes.npcs.api">INbt</a>&nbsp;getNbt()</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Returns an INbt instance representing the item's custom NBT data.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The custom NBT data.</dd>
</dl>
2024-03-20 02:28:51 -04:00
</li>
</ul>
<a id="getItemNbt()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getItemNbt</h4>
<pre class="methodSignature"><a href="../INbt.html" title="interface in noppes.npcs.api">INbt</a>&nbsp;getItemNbt()</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Returns an INbt instance representing the full NBT data of the item.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The complete NBT data.</dd>
</dl>
2024-03-20 02:28:51 -04:00
</li>
</ul>
<a id="getMCItemStack()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMCItemStack</h4>
<pre class="methodSignature">net.minecraft.item.ItemStack&nbsp;getMCItemStack()</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Returns the underlying Minecraft ItemStack.
<p>No support is given for this method. Use with caution.</p></div>
2024-03-20 02:28:51 -04:00
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
2025-05-29 16:27:42 -04:00
<dd>The Minecraft ItemStack.</dd>
2024-03-20 02:28:51 -04:00
</dl>
</li>
</ul>
<a id="itemHash()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>itemHash</h4>
<pre class="methodSignature">int&nbsp;itemHash()</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Returns a hash value for the item.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The item's hash code.</dd>
</dl>
2024-03-20 02:28:51 -04:00
</li>
</ul>
<a id="getMCNbt()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMCNbt</h4>
<pre class="methodSignature">net.minecraft.nbt.NBTTagCompound&nbsp;getMCNbt()</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Returns the underlying Minecraft NBTTagCompound for the item.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The NBTTagCompound.</dd>
</dl>
2024-03-20 02:28:51 -04:00
</li>
</ul>
<a id="setMCNbt(net.minecraft.nbt.NBTTagCompound)">
<!-- -->
</a>
2025-05-29 16:27:42 -04:00
<ul class="blockList">
2024-03-20 02:28:51 -04:00
<li class="blockList">
<h4>setMCNbt</h4>
<pre class="methodSignature">void&nbsp;setMCNbt&#8203;(net.minecraft.nbt.NBTTagCompound&nbsp;compound)</pre>
2025-05-29 16:27:42 -04:00
<div class="block">Sets the underlying Minecraft NBTTagCompound for the item.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>compound</code> - The NBTTagCompound to set.</dd>
</dl>
</li>
</ul>
<a id="compare(noppes.npcs.api.item.IItemStack,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compare</h4>
<pre class="methodSignature">boolean&nbsp;compare&#8203;(<a href="IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a>&nbsp;item,
boolean&nbsp;ignoreNBT)</pre>
<div class="block">Compares this item with another item, with an option to ignore NBT data.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>item</code> - The item to compare.</dd>
<dd><code>ignoreNBT</code> - true to ignore NBT data.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the items are considered equal, false otherwise.</dd>
</dl>
</li>
</ul>
<a id="compare(noppes.npcs.api.item.IItemStack,boolean,boolean)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>compare</h4>
<pre class="methodSignature">boolean&nbsp;compare&#8203;(<a href="IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a>&nbsp;item,
boolean&nbsp;ignoreDamage,
boolean&nbsp;ignoreNBT)</pre>
<div class="block">Compares this item with another item, with options to ignore damage and/or NBT data.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>item</code> - The item to compare.</dd>
<dd><code>ignoreDamage</code> - true to ignore damage values.</dd>
<dd><code>ignoreNBT</code> - true to ignore NBT data.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the items are considered equal, false otherwise.</dd>
</dl>
2024-03-20 02:28:51 -04:00
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>