mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-10 20:13:44 +00:00
475 lines
16 KiB
HTML
475 lines
16 KiB
HTML
<!DOCTYPE HTML>
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (11.0.27) on Tue Oct 28 02:00:43 EDT 2025 -->
|
|
<title>IProjectile</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="dc.created" content="2025-10-28">
|
|
<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]-->
|
|
<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="IProjectile";
|
|
}
|
|
}
|
|
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};
|
|
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 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">noppes.npcs.api.entity</a></div>
|
|
<h2 title="Interface IProjectile" class="title">Interface IProjectile</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<hr>
|
|
<pre>public interface <span class="typeNameLabel">IProjectile</span></pre>
|
|
<div class="block">Represents a projectile entity.
|
|
Provides methods to access and modify the projectile's item, gravity, accuracy, heading,
|
|
and to enable scripting events.</div>
|
|
</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="#enableEvents()">enableEvents</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Enables projectile events for the current scripting container.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAccuracy()">getAccuracy</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the accuracy value for the projectile.</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="#getHasGravity()">getHasGravity</a></span>()</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code><a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getItem()">getItem</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the item associated with the projectile (e.g.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code><a href="IEntity.html" title="interface in noppes.npcs.api.entity">IEntity</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getThrower()">getThrower</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the thrower (the entity that launched the projectile).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAccuracy(int)">setAccuracy</a></span>​(int accuracy)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the accuracy value for the projectile.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setHasGravity(boolean)">setHasGravity</a></span>​(boolean bo)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets whether the projectile is affected by gravity.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setHeading(double,double,double)">setHeading</a></span>​(double x,
|
|
double y,
|
|
double z)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the heading for the projectile to the specified coordinates.</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="#setHeading(float,float)">setHeading</a></span>​(float yaw,
|
|
float pitch)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the heading using yaw and pitch values.</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="#setHeading(noppes.npcs.api.entity.IEntity)">setHeading</a></span>​(<a href="IEntity.html" title="interface in noppes.npcs.api.entity">IEntity</a> entity)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the heading (target destination) for the projectile based on the target entity.</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="#setItem(noppes.npcs.api.item.IItemStack)">setItem</a></span>​(<a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a> item)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the item for the projectile.</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="getItem()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getItem</h4>
|
|
<pre class="methodSignature"><a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a> getItem()</pre>
|
|
<div class="block">Returns the item associated with the projectile (e.g. arrow, fireball).</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the item as an IItemStack.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setItem(noppes.npcs.api.item.IItemStack)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setItem</h4>
|
|
<pre class="methodSignature">void setItem​(<a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a> item)</pre>
|
|
<div class="block">Sets the item for the projectile.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>item</code> - the item to set.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getHasGravity()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getHasGravity</h4>
|
|
<pre class="methodSignature">boolean getHasGravity()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true if the projectile is affected by gravity; false if it flies straight.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setHasGravity(boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setHasGravity</h4>
|
|
<pre class="methodSignature">void setHasGravity​(boolean bo)</pre>
|
|
<div class="block">Sets whether the projectile is affected by gravity.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>bo</code> - true to enable gravity; false otherwise.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getAccuracy()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAccuracy</h4>
|
|
<pre class="methodSignature">int getAccuracy()</pre>
|
|
<div class="block">Returns the accuracy value for the projectile.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the accuracy.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setAccuracy(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setAccuracy</h4>
|
|
<pre class="methodSignature">void setAccuracy​(int accuracy)</pre>
|
|
<div class="block">Sets the accuracy value for the projectile.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>accuracy</code> - the accuracy value.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setHeading(noppes.npcs.api.entity.IEntity)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setHeading</h4>
|
|
<pre class="methodSignature">void setHeading​(<a href="IEntity.html" title="interface in noppes.npcs.api.entity">IEntity</a> entity)</pre>
|
|
<div class="block">Sets the heading (target destination) for the projectile based on the target entity.
|
|
The projectile's position should already be set.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>entity</code> - the target entity.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setHeading(double,double,double)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setHeading</h4>
|
|
<pre class="methodSignature">void setHeading​(double x,
|
|
double y,
|
|
double z)</pre>
|
|
<div class="block">Sets the heading for the projectile to the specified coordinates.
|
|
The projectile's position should already be set.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - the target x coordinate.</dd>
|
|
<dd><code>y</code> - the target y coordinate.</dd>
|
|
<dd><code>z</code> - the target z coordinate.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setHeading(float,float)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setHeading</h4>
|
|
<pre class="methodSignature">void setHeading​(float yaw,
|
|
float pitch)</pre>
|
|
<div class="block">Sets the heading using yaw and pitch values.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>yaw</code> - the yaw angle.</dd>
|
|
<dd><code>pitch</code> - the pitch angle.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getThrower()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getThrower</h4>
|
|
<pre class="methodSignature"><a href="IEntity.html" title="interface in noppes.npcs.api.entity">IEntity</a> getThrower()</pre>
|
|
<div class="block">Returns the thrower (the entity that launched the projectile).</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the thrower as an IEntity.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="enableEvents()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>enableEvents</h4>
|
|
<pre class="methodSignature">void enableEvents()</pre>
|
|
<div class="block">Enables projectile events for the current scripting container.
|
|
Must be called during a script.</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="../../../../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 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>
|