mirror of
https://github.com/KAMKEEL/CustomNPC-Gecko-Addon.git
synced 2026-11-25 05:14:29 +00:00
607 lines
26 KiB
HTML
607 lines
26 KiB
HTML
<!DOCTYPE HTML>
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc -->
|
|
<title>IGeckoItemModel (CustomNPC-Gecko-Addon 1.4-pre API)</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<link rel="stylesheet" type="text/css" href="../../../../javadoc-theme.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]-->
|
|
<script type="text/javascript" src="../../../../jquery/jquery-3.7.1.min.js"></script>
|
|
<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="IGeckoItemModel (CustomNPC-Gecko-Addon 1.4-pre API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
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};
|
|
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="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-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage"><div id="javadoc-header"><a href="/CustomNPC-DBC-Addon/" class="header-brand"><div class="header-title">CustomNPC+ DBC Addon<span>Javadoc Reference</span></div></a><a href="/CustomNPC-DBC-Addon/" class="header-back">Back to Index</a></div></div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses.html">All 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: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </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"> </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> <a href="package-summary.html">com.goodbird.npcgecko.api</a></div>
|
|
<h2 title="Interface IGeckoItemModel" class="title">Interface IGeckoItemModel</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<hr>
|
|
<pre>public interface <span class="typeNameLabel">IGeckoItemModel</span></pre>
|
|
<div class="block">Interface for accessing and modifying GeckoLib 3D model configuration on items.
|
|
Provides control over model, texture, animation files, display transforms,
|
|
and display JSON settings for Scripted and Linked items.
|
|
|
|
<p>Changes made through this interface are automatically persisted to the
|
|
ItemStack's NBT and synced to clients via container mechanics.</p>
|
|
|
|
<p>Obtain an instance via <a href="AbstractGeckoAPI.html#getItemGecko(noppes.npcs.api.item.IItemCustomizable)"><code>AbstractGeckoAPI.getItemGecko(noppes.npcs.api.item.IItemCustomizable)</code></a>.</p>
|
|
|
|
<p>Usage example:</p>
|
|
<pre>
|
|
var itemGecko = gecko.getItemGecko(event.item);
|
|
itemGecko.setModel("geckolib3:geo/sword.geo.json");
|
|
itemGecko.setTexture("geckolib3:textures/model/sword.png");
|
|
itemGecko.setAnimationFile("geckolib3:animations/sword.animation.json");
|
|
|
|
var anim = itemGecko.getItemAnimation();
|
|
anim.setIdleAnimation("animation.sword.idle");
|
|
anim.setSwingAnimation("animation.sword.swing");
|
|
anim.setAttackAnimation("animation.sword.attack");
|
|
</pre></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="AbstractGeckoAPI.html#getItemGecko(noppes.npcs.api.item.IItemCustomizable)"><code>AbstractGeckoAPI.getItemGecko(noppes.npcs.api.item.IItemCustomizable)</code></a></dd>
|
|
</dl>
|
|
</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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </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="#clear()">clear</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Remove the gecko model from this item, reverting it to normal 2D rendering.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAnimationFile()">getAnimationFile</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get the animation file resource location.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDisplayJSON()">getDisplayJSON</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get the display JSON filename currently assigned to this item.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code><a href="IItemAnimation.html" title="interface in com.goodbird.npcgecko.api">IItemAnimation</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getItemAnimation()">getItemAnimation</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get the item animation configuration interface.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getModel()">getModel</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get the geo model resource location.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTexture()">getTexture</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get the texture resource location.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTransitionLengthTicks()">getTransitionLengthTicks</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get the transition duration between animations in ticks.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasModel()">hasModel</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Check if this item currently has a gecko model assigned.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAnimationFile(java.lang.String)">setAnimationFile</a></span>​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> animationFile)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set the animation file resource location.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDisplay(java.lang.String,float,float,float,float,float,float,float,float,float)">setDisplay</a></span>​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> context,
|
|
float tx,
|
|
float ty,
|
|
float tz,
|
|
float rx,
|
|
float ry,
|
|
float rz,
|
|
float sx,
|
|
float sy,
|
|
float sz)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set the display transform for a specific render context.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDisplayJSON(java.lang.String)">setDisplayJSON</a></span>​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> displayFile)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set the display JSON file for controlling how the 3D model is positioned,
|
|
rotated, and scaled in each render context (first person, third person,
|
|
inventory, and ground).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setModel(java.lang.String)">setModel</a></span>​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> model)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set the GeckoLib geo model resource location.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setTexture(java.lang.String)">setTexture</a></span>​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> texture)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set the texture resource location used when rendering this item's 3D model.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setTransitionLengthTicks(int)">setTransitionLengthTicks</a></span>​(int ticks)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set the transition duration between animations in ticks.</div>
|
|
</td>
|
|
</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="hasModel()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>hasModel</h4>
|
|
<pre class="methodSignature">boolean hasModel()</pre>
|
|
<div class="block">Check if this item currently has a gecko model assigned.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true if the item has a GeckoLib 3D model</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getModel()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getModel</h4>
|
|
<pre class="methodSignature"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> getModel()</pre>
|
|
<div class="block">Get the geo model resource location.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the model resource location string, or an empty string if no model is set</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setModel(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setModel</h4>
|
|
<pre class="methodSignature">void setModel​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> model)</pre>
|
|
<div class="block">Set the GeckoLib geo model resource location.
|
|
The model file should be a Blockbench geo JSON exported for GeckoLib.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>model</code> - the model resource location (e.g. "geckolib3:geo/sword.geo.json")</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getTexture()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getTexture</h4>
|
|
<pre class="methodSignature"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> getTexture()</pre>
|
|
<div class="block">Get the texture resource location.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the texture resource location string, or an empty string if no texture is set</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setTexture(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setTexture</h4>
|
|
<pre class="methodSignature">void setTexture​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> texture)</pre>
|
|
<div class="block">Set the texture resource location used when rendering this item's 3D model.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>texture</code> - the texture resource location (e.g. "geckolib3:textures/model/sword.png")</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getAnimationFile()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAnimationFile</h4>
|
|
<pre class="methodSignature"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> getAnimationFile()</pre>
|
|
<div class="block">Get the animation file resource location.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the animation file resource location string, or an empty string if none is set</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setAnimationFile(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setAnimationFile</h4>
|
|
<pre class="methodSignature">void setAnimationFile​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> animationFile)</pre>
|
|
<div class="block">Set the animation file resource location.
|
|
The file should be a Blockbench animation JSON exported for GeckoLib.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>animationFile</code> - the animation file resource location
|
|
(e.g. "geckolib3:animations/sword.animation.json")</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getItemAnimation()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getItemAnimation</h4>
|
|
<pre class="methodSignature"><a href="IItemAnimation.html" title="interface in com.goodbird.npcgecko.api">IItemAnimation</a> getItemAnimation()</pre>
|
|
<div class="block">Get the item animation configuration interface.
|
|
Provides access to getters and setters for all animation types
|
|
(idle, swing, attack, use).</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the item animation interface</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="IItemAnimation.html" title="interface in com.goodbird.npcgecko.api"><code>IItemAnimation</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getTransitionLengthTicks()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getTransitionLengthTicks</h4>
|
|
<pre class="methodSignature">int getTransitionLengthTicks()</pre>
|
|
<div class="block">Get the transition duration between animations in ticks.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the transition length in ticks (default: 10)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setTransitionLengthTicks(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setTransitionLengthTicks</h4>
|
|
<pre class="methodSignature">void setTransitionLengthTicks​(int ticks)</pre>
|
|
<div class="block">Set the transition duration between animations in ticks.
|
|
Controls how smoothly one animation blends into the next.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>ticks</code> - the transition length in ticks (20 ticks = 1 second)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getDisplayJSON()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getDisplayJSON</h4>
|
|
<pre class="methodSignature"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> getDisplayJSON()</pre>
|
|
<div class="block">Get the display JSON filename currently assigned to this item.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the display JSON filename (e.g. "sword.json"), or an empty string if none is set</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setDisplayJSON(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setDisplayJSON</h4>
|
|
<pre class="methodSignature">void setDisplayJSON​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> displayFile)</pre>
|
|
<div class="block">Set the display JSON file for controlling how the 3D model is positioned,
|
|
rotated, and scaled in each render context (first person, third person,
|
|
inventory, and ground).
|
|
|
|
<p>Display files are loaded from <code>assets/{domain}/item_displays/</code> resource folders.
|
|
Use <a href="AbstractGeckoAPI.html#getDisplayFileList()"><code>AbstractGeckoAPI.getDisplayFileList()</code></a> to list available files.</p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>displayFile</code> - the display JSON filename (e.g. "sword.json")</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="AbstractGeckoAPI.html#getDisplayFileList()"><code>AbstractGeckoAPI.getDisplayFileList()</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setDisplay(java.lang.String,float,float,float,float,float,float,float,float,float)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setDisplay</h4>
|
|
<pre class="methodSignature">void setDisplay​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> context,
|
|
float tx,
|
|
float ty,
|
|
float tz,
|
|
float rx,
|
|
float ry,
|
|
float rz,
|
|
float sx,
|
|
float sy,
|
|
float sz)</pre>
|
|
<div class="block">Set the display transform for a specific render context.
|
|
This overrides any display JSON settings for the specified context and
|
|
controls how the 3D model is positioned, rotated, and scaled.
|
|
|
|
<p>Valid context values:</p>
|
|
<ul>
|
|
<li><code>"first_person"</code> - held item in first-person view</li>
|
|
<li><code>"third_person"</code> - held item in third-person view</li>
|
|
<li><code>"inventory"</code> - item icon in inventory GUI</li>
|
|
<li><code>"ground"</code> - dropped item entity on the ground</li>
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>context</code> - the render context name</dd>
|
|
<dd><code>tx</code> - translation X offset</dd>
|
|
<dd><code>ty</code> - translation Y offset</dd>
|
|
<dd><code>tz</code> - translation Z offset</dd>
|
|
<dd><code>rx</code> - rotation X in degrees</dd>
|
|
<dd><code>ry</code> - rotation Y in degrees</dd>
|
|
<dd><code>rz</code> - rotation Z in degrees</dd>
|
|
<dd><code>sx</code> - scale X multiplier</dd>
|
|
<dd><code>sy</code> - scale Y multiplier</dd>
|
|
<dd><code>sz</code> - scale Z multiplier</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the context name is not recognized</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="clear()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>clear</h4>
|
|
<pre class="methodSignature">void clear()</pre>
|
|
<div class="block">Remove the gecko model from this item, reverting it to normal 2D rendering.
|
|
Clears all model, texture, animation, and display settings.</div>
|
|
</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="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-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage"><script>(function() {// Fix uppercase text in table cells// Javadoc 11: method names are in th[scope="row"] a, not td afunction fixCase() {document.querySelectorAll("th[scope='row'] a, td a, .memberNameLink a").forEach(function(el) {var t = el.textContent.trim();if (t.length > 2 && t === t.toUpperCase() && t.indexOf(" ") === -1) {el.textContent = t.toLowerCase();}});}// Correct navPadding = topNav height + subNav height// Uses !important to override jQuery's inline stylefunction fixPadding() {var topNav = document.querySelector(".topNav");var subNav = document.querySelector(".subNav");var pad = document.querySelector(".navPadding");if (!pad) return;var h = (topNav ? topNav.offsetHeight : 0) + (subNav ? subNav.offsetHeight : 0);if (h > 0) {pad.style.setProperty("padding-top", h + "px", "important");}}document.addEventListener("DOMContentLoaded", function() {fixCase();// Run fixPadding after jQuery has had its chancesetTimeout(fixPadding, 0);setTimeout(fixPadding, 50);setTimeout(fixPadding, 200);// Use MutationObserver to permanently override any further jQuery writesvar pad = document.querySelector(".navPadding");if (pad) {var observer = new MutationObserver(function() {fixPadding();});observer.observe(pad, { attributes: true, attributeFilter: ["style"] });}});})();</script></div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses.html">All 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: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </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>
|