Minestom/docs/net/minestom/server/utils/Position.html
2020-11-15 23:39:49 +01:00

781 lines
35 KiB
HTML

<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Position (Minestom 1.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="declaration: package: net.minestom.server.utils, class: Position">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../script-dir/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../script-dir/jquery-3.4.1.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.js"></script>
</head>
<body class="class-declaration">
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flexBox">
<header role="banner" class="flexHeader">
<nav role="navigation">
<!-- ========= 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-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<div class="navListSearch"><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="skipNav"><a id="skip.navbar.top">
<!-- -->
</a></div>
</nav>
</header>
<div class="flexContent">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">net.minestom.server.utils</a></div>
<h1 title="Class Position" class="title">Class Position</h1>
</div>
<div class="contentContainer">
<div class="inheritance" title="Inheritance Tree">java.lang.Object
<div class="inheritance">net.minestom.server.utils.Position</div>
</div>
<section class="description">
<hr>
<pre>public class <span class="typeNameLabel">Position</span>
extends java.lang.Object</pre>
<div class="block">Represents a position.
The instance is not contained.</div>
</section>
<section class="summary">
<ul class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li class="blockList">
<section class="constructorSummary"><a id="constructor.summary">
<!-- -->
</a>
<h2>Constructor Summary</h2>
<div class="memberSummary">
<table>
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<thead>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">Position</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(float,float,float)">Position</a></span>&#8203;(float&nbsp;x,
float&nbsp;y,
float&nbsp;z)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(float,float,float,float,float)">Position</a></span>&#8203;(float&nbsp;x,
float&nbsp;y,
float&nbsp;z,
float&nbsp;yaw,
float&nbsp;pitch)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li class="blockList">
<section class="methodSummary"><a id="method.summary">
<!-- -->
</a>
<h2>Method Summary</h2>
<div class="memberSummary">
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="tableTab" onclick="show(8);">Concrete Methods</button></div>
<div id="memberSummary_tabpanel" role="tabpanel">
<table aria-labelledby="t0">
<thead>
<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>
</thead>
<tbody>
<tr class="altColor" id="i0">
<td class="colFirst"><code><a href="Position.html" title="class in net.minestom.server.utils">Position</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#add(float,float,float)">add</a></span>&#8203;(float&nbsp;x,
float&nbsp;y,
float&nbsp;z)</code></th>
<td class="colLast">
<div class="block">Adds offsets to the current position.</div>
</td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code><a href="Position.html" title="class in net.minestom.server.utils">Position</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#add(net.minestom.server.utils.Position)">add</a></span>&#8203;(<a href="Position.html" title="class in net.minestom.server.utils">Position</a>&nbsp;position)</code></th>
<td class="colLast">
<div class="block">Adds a position to the current position.</div>
</td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code><a href="Position.html" title="class in net.minestom.server.utils">Position</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">Copies this position object with the same values.</div>
</td>
</tr>
<tr class="rowColor" id="i3">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#copy(net.minestom.server.utils.Position)">copy</a></span>&#8203;(<a href="Position.html" title="class in net.minestom.server.utils">Position</a>&nbsp;position)</code></th>
<td class="colLast">
<div class="block">Sets the x/y/z field of this position to the value of <code>position</code>.</div>
</td>
</tr>
<tr class="altColor" id="i4">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#copy(net.minestom.server.utils.Vector)">copy</a></span>&#8203;(<a href="Vector.html" title="class in net.minestom.server.utils">Vector</a>&nbsp;position)</code></th>
<td class="colLast">
<div class="block">Sets the x/y/z field of this position to the value of <code>position</code>.</div>
</td>
</tr>
<tr class="rowColor" id="i5">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equals(java.lang.Object)">equals</a></span>&#8203;(java.lang.Object&nbsp;o)</code></th>
<td class="colLast">
<div class="block">Gets if the two objects are position and have the same values.</div>
</td>
</tr>
<tr class="altColor" id="i6">
<td class="colFirst"><code><a href="Vector.html" title="class in net.minestom.server.utils">Vector</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDirection()">getDirection</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets a unit-vector pointing in the direction that this Location is
facing.</div>
</td>
</tr>
<tr class="rowColor" id="i7">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDistance(net.minestom.server.utils.Position)">getDistance</a></span>&#8203;(<a href="Position.html" title="class in net.minestom.server.utils">Position</a>&nbsp;position)</code></th>
<td class="colLast">
<div class="block">Gets the distance between 2 positions.</div>
</td>
</tr>
<tr class="altColor" id="i8">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDistanceSquared(net.minestom.server.utils.Position)">getDistanceSquared</a></span>&#8203;(<a href="Position.html" title="class in net.minestom.server.utils">Position</a>&nbsp;position)</code></th>
<td class="colLast">
<div class="block">Gets the square distance to another position.</div>
</td>
</tr>
<tr class="rowColor" id="i9">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPitch()">getPitch</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the position pitch.</div>
</td>
</tr>
<tr class="altColor" id="i10">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getX()">getX</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the position X.</div>
</td>
</tr>
<tr class="rowColor" id="i11">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getY()">getY</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the position Y.</div>
</td>
</tr>
<tr class="altColor" id="i12">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getYaw()">getYaw</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the position yaw.</div>
</td>
</tr>
<tr class="rowColor" id="i13">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getZ()">getZ</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the position Z.</div>
</td>
</tr>
<tr class="altColor" id="i14">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hashCode()">hashCode</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor" id="i15">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasSimilarView(net.minestom.server.utils.Position)">hasSimilarView</a></span>&#8203;(<a href="Position.html" title="class in net.minestom.server.utils">Position</a>&nbsp;position)</code></th>
<td class="colLast">
<div class="block">Checks if two positions have a similar view (yaw/pitch).</div>
</td>
</tr>
<tr class="altColor" id="i16">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isSimilar(net.minestom.server.utils.Position)">isSimilar</a></span>&#8203;(<a href="Position.html" title="class in net.minestom.server.utils">Position</a>&nbsp;position)</code></th>
<td class="colLast">
<div class="block">Checks it two positions are similar (x/y/z).</div>
</td>
</tr>
<tr class="rowColor" id="i17">
<td class="colFirst"><code><a href="Position.html" title="class in net.minestom.server.utils">Position</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDirection(net.minestom.server.utils.Vector)">setDirection</a></span>&#8203;(<a href="Vector.html" title="class in net.minestom.server.utils">Vector</a>&nbsp;vector)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="#getYaw()"><code>yaw</code></a> and <a href="#getPitch()"><code>pitch</code></a> to point
in the direction of the vector.</div>
</td>
</tr>
<tr class="altColor" id="i18">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPitch(float)">setPitch</a></span>&#8203;(float&nbsp;pitch)</code></th>
<td class="colLast">
<div class="block">Changes the position pitch.</div>
</td>
</tr>
<tr class="rowColor" id="i19">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setX(float)">setX</a></span>&#8203;(float&nbsp;x)</code></th>
<td class="colLast">
<div class="block">Changes the position X.</div>
</td>
</tr>
<tr class="altColor" id="i20">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setY(float)">setY</a></span>&#8203;(float&nbsp;y)</code></th>
<td class="colLast">
<div class="block">Changes the position Y.</div>
</td>
</tr>
<tr class="rowColor" id="i21">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setYaw(float)">setYaw</a></span>&#8203;(float&nbsp;yaw)</code></th>
<td class="colLast">
<div class="block">Changes the position yaw.</div>
</td>
</tr>
<tr class="altColor" id="i22">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setZ(float)">setZ</a></span>&#8203;(float&nbsp;z)</code></th>
<td class="colLast">
<div class="block">Changes the position Z.</div>
</td>
</tr>
<tr class="rowColor" id="i23">
<td class="colFirst"><code><a href="Position.html" title="class in net.minestom.server.utils">Position</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#subtract(float,float,float)">subtract</a></span>&#8203;(float&nbsp;x,
float&nbsp;y,
float&nbsp;z)</code></th>
<td class="colLast">
<div class="block">Removes offsets to the current position.</div>
</td>
</tr>
<tr class="altColor" id="i24">
<td class="colFirst"><code><a href="BlockPosition.html" title="class in net.minestom.server.utils">BlockPosition</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toBlockPosition()">toBlockPosition</a></span>()</code></th>
<td class="colLast">
<div class="block">Converts this position to a <a href="BlockPosition.html" title="class in net.minestom.server.utils"><code>BlockPosition</code></a>.</div>
</td>
</tr>
<tr class="rowColor" id="i25">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor" id="i26">
<td class="colFirst"><code><a href="Vector.html" title="class in net.minestom.server.utils">Vector</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toVector()">toVector</a></span>()</code></th>
<td class="colLast">
<div class="block">Converts this position to a <a href="Vector.html" title="class in net.minestom.server.utils"><code>Vector</code></a>.</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="inheritedList">
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a><code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li class="blockList">
<section class="constructorDetails"><a id="constructor.detail">
<!-- -->
</a>
<h2>Constructor Details</h2>
<ul class="blockList">
<li class="blockList">
<section class="detail">
<h3><a id="&lt;init&gt;(float,float,float,float,float)">Position</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="memberName">Position</span>&#8203;(<span class="arguments">float&nbsp;x,
float&nbsp;y,
float&nbsp;z,
float&nbsp;yaw,
float&nbsp;pitch)</span></div>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="&lt;init&gt;(float,float,float)">Position</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="memberName">Position</span>&#8203;(<span class="arguments">float&nbsp;x,
float&nbsp;y,
float&nbsp;z)</span></div>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="&lt;init&gt;()">Position</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="memberName">Position</span>()</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li class="blockList">
<section class="methodDetails"><a id="method.detail">
<!-- -->
</a>
<h2>Method Details</h2>
<ul class="blockList">
<li class="blockList">
<section class="detail">
<h3><a id="add(float,float,float)">add</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="Position.html" title="class in net.minestom.server.utils">Position</a></span>&nbsp;<span class="memberName">add</span>&#8203;(<span class="arguments">float&nbsp;x,
float&nbsp;y,
float&nbsp;z)</span></div>
<div class="block">Adds offsets to the current position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>x</code> - the X offset</dd>
<dd><code>y</code> - the Y offset</dd>
<dd><code>z</code> - the Z offset</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the same object position</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="add(net.minestom.server.utils.Position)">add</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="Position.html" title="class in net.minestom.server.utils">Position</a></span>&nbsp;<span class="memberName">add</span>&#8203;(<span class="arguments"><a href="Position.html" title="class in net.minestom.server.utils">Position</a>&nbsp;position)</span></div>
<div class="block">Adds a position to the current position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>position</code> - the position to add to this</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the same object position</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="subtract(float,float,float)">subtract</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="Position.html" title="class in net.minestom.server.utils">Position</a></span>&nbsp;<span class="memberName">subtract</span>&#8203;(<span class="arguments">float&nbsp;x,
float&nbsp;y,
float&nbsp;z)</span></div>
<div class="block">Removes offsets to the current position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>x</code> - the X offset</dd>
<dd><code>y</code> - the Y offset</dd>
<dd><code>z</code> - the Z offset</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the same object position</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getDistance(net.minestom.server.utils.Position)">getDistance</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">float</span>&nbsp;<span class="memberName">getDistance</span>&#8203;(<span class="arguments"><a href="Position.html" title="class in net.minestom.server.utils">Position</a>&nbsp;position)</span></div>
<div class="block">Gets the distance between 2 positions.
In cases where performance matters, <a href="#getDistanceSquared(net.minestom.server.utils.Position)"><code>getDistanceSquared(Position)</code></a> should be used
as it does not perform the expensive Math.sqrt method.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>position</code> - the second position</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the distance between <code>this</code> and <code>position</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getDistanceSquared(net.minestom.server.utils.Position)">getDistanceSquared</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">float</span>&nbsp;<span class="memberName">getDistanceSquared</span>&#8203;(<span class="arguments"><a href="Position.html" title="class in net.minestom.server.utils">Position</a>&nbsp;position)</span></div>
<div class="block">Gets the square distance to another position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>position</code> - the second position</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the squared distance between <code>this</code> and <code>position</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getDirection()">getDirection</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="Vector.html" title="class in net.minestom.server.utils">Vector</a></span>&nbsp;<span class="memberName">getDirection</span>()</div>
<div class="block">Gets a unit-vector pointing in the direction that this Location is
facing.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a vector pointing the direction of this location's <a href="#getPitch()"><code>pitch</code></a> and <a href="#getYaw()"><code>yaw</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="setDirection(net.minestom.server.utils.Vector)">setDirection</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="Position.html" title="class in net.minestom.server.utils">Position</a></span>&nbsp;<span class="memberName">setDirection</span>&#8203;(<span class="arguments"><a href="Vector.html" title="class in net.minestom.server.utils">Vector</a>&nbsp;vector)</span></div>
<div class="block">Sets the <a href="#getYaw()"><code>yaw</code></a> and <a href="#getPitch()"><code>pitch</code></a> to point
in the direction of the vector.</div>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="copy(net.minestom.server.utils.Vector)">copy</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">copy</span>&#8203;(<span class="arguments"><a href="Vector.html" title="class in net.minestom.server.utils">Vector</a>&nbsp;position)</span></div>
<div class="block">Sets the x/y/z field of this position to the value of <code>position</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>position</code> - the vector to copy the values from</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="copy(net.minestom.server.utils.Position)">copy</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">copy</span>&#8203;(<span class="arguments"><a href="Position.html" title="class in net.minestom.server.utils">Position</a>&nbsp;position)</span></div>
<div class="block">Sets the x/y/z field of this position to the value of <code>position</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>position</code> - the position to copy the values from</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="copy()">copy</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="Position.html" title="class in net.minestom.server.utils">Position</a></span>&nbsp;<span class="memberName">copy</span>()</div>
<div class="block">Copies this position object with the same values.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new <a href="Position.html" title="class in net.minestom.server.utils"><code>Position</code></a> object with the same coordinates</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="equals(java.lang.Object)">equals</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">boolean</span>&nbsp;<span class="memberName">equals</span>&#8203;(<span class="arguments">java.lang.Object&nbsp;o)</span></div>
<div class="block">Gets if the two objects are position and have the same values.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>equals</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>o</code> - the position to check the equality</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the two objects are position with the same values, false otherwise</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="isSimilar(net.minestom.server.utils.Position)">isSimilar</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">boolean</span>&nbsp;<span class="memberName">isSimilar</span>&#8203;(<span class="arguments"><a href="Position.html" title="class in net.minestom.server.utils">Position</a>&nbsp;position)</span></div>
<div class="block">Checks it two positions are similar (x/y/z).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>position</code> - the position to compare</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the two positions are similar</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="hasSimilarView(net.minestom.server.utils.Position)">hasSimilarView</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">boolean</span>&nbsp;<span class="memberName">hasSimilarView</span>&#8203;(<span class="arguments"><a href="Position.html" title="class in net.minestom.server.utils">Position</a>&nbsp;position)</span></div>
<div class="block">Checks if two positions have a similar view (yaw/pitch).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>position</code> - the position to compare</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the two positions have the same view</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="hashCode()">hashCode</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">int</span>&nbsp;<span class="memberName">hashCode</span>()</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>hashCode</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getX()">getX</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">float</span>&nbsp;<span class="memberName">getX</span>()</div>
<div class="block">Gets the position X.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the position X</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="setX(float)">setX</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">setX</span>&#8203;(<span class="arguments">float&nbsp;x)</span></div>
<div class="block">Changes the position X.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>x</code> - the new position X</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getY()">getY</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">float</span>&nbsp;<span class="memberName">getY</span>()</div>
<div class="block">Gets the position Y.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the position Y</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="setY(float)">setY</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">setY</span>&#8203;(<span class="arguments">float&nbsp;y)</span></div>
<div class="block">Changes the position Y.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>y</code> - the new position Y</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getZ()">getZ</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">float</span>&nbsp;<span class="memberName">getZ</span>()</div>
<div class="block">Gets the position Z.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the position Z</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="setZ(float)">setZ</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">setZ</span>&#8203;(<span class="arguments">float&nbsp;z)</span></div>
<div class="block">Changes the position Z.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>z</code> - the new position Z</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getYaw()">getYaw</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">float</span>&nbsp;<span class="memberName">getYaw</span>()</div>
<div class="block">Gets the position yaw.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the yaw</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="setYaw(float)">setYaw</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">setYaw</span>&#8203;(<span class="arguments">float&nbsp;yaw)</span></div>
<div class="block">Changes the position yaw.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>yaw</code> - the new yaw</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getPitch()">getPitch</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">float</span>&nbsp;<span class="memberName">getPitch</span>()</div>
<div class="block">Gets the position pitch.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the pitch</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="setPitch(float)">setPitch</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">setPitch</span>&#8203;(<span class="arguments">float&nbsp;pitch)</span></div>
<div class="block">Changes the position pitch.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pitch</code> - the new pitch</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="toBlockPosition()">toBlockPosition</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="BlockPosition.html" title="class in net.minestom.server.utils">BlockPosition</a></span>&nbsp;<span class="memberName">toBlockPosition</span>()</div>
<div class="block">Converts this position to a <a href="BlockPosition.html" title="class in net.minestom.server.utils"><code>BlockPosition</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the converted <a href="BlockPosition.html" title="class in net.minestom.server.utils"><code>BlockPosition</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="toVector()">toVector</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="Vector.html" title="class in net.minestom.server.utils">Vector</a></span>&nbsp;<span class="memberName">toVector</span>()</div>
<div class="block">Converts this position to a <a href="Vector.html" title="class in net.minestom.server.utils"><code>Vector</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the converted <a href="Vector.html" title="class in net.minestom.server.utils"><code>Vector</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="toString()">toString</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">java.lang.String</span>&nbsp;<span class="memberName">toString</span>()</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
</div>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<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-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</div>
</div>
</body>
</html>