Minestom/net/minestom/server/instance/Chunk.html

931 lines
68 KiB
HTML

<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) -->
<title>Chunk (minestom dev API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: net.minestom.server.instance, class: Chunk">
<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.min.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">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#class">Help</a></li>
</ul>
<ul class="sub-nav-list-small">
<li>
<p>Summary:</p>
<ul>
<li><a href="#nested-class-summary">Nested</a></li>
<li><a href="#field-summary">Field</a></li>
<li><a href="#constructor-summary">Constr</a></li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li><a href="#field-detail">Field</a></li>
<li><a href="#constructor-detail">Constr</a></li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li><a href="#nested-class-summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&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="nav-list-search"><a href="../../../../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Search">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">net.minestom.server.instance</a></div>
<h1 title="Class Chunk" class="title">Class Chunk</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">net.minestom.server.instance.Chunk</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="block/Block.Getter.html" title="interface in net.minestom.server.instance.block">Block.Getter</a></code>, <code><a href="block/Block.Setter.html" title="interface in net.minestom.server.instance.block">Block.Setter</a></code>, <code><a href="../snapshot/Snapshotable.html" title="interface in net.minestom.server.snapshot">Snapshotable</a></code>, <code><a href="../tag/Taggable.html" title="interface in net.minestom.server.tag">Taggable</a></code>, <code><a href="../tag/TagReadable.html" title="interface in net.minestom.server.tag">TagReadable</a></code>, <code><a href="../tag/TagWritable.html" title="interface in net.minestom.server.tag">TagWritable</a></code>, <code><a href="../Tickable.html" title="interface in net.minestom.server">Tickable</a></code>, <code><a href="../Viewable.html" title="interface in net.minestom.server">Viewable</a></code>, <code><a href="../world/biomes/Biome.Getter.html" title="interface in net.minestom.server.world.biomes">Biome.Getter</a></code>, <code><a href="../world/biomes/Biome.Setter.html" title="interface in net.minestom.server.world.biomes">Biome.Setter</a></code></dd>
</dl>
<dl class="notes">
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="DynamicChunk.html" title="class in net.minestom.server.instance">DynamicChunk</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">Chunk</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
implements <a href="block/Block.Getter.html" title="interface in net.minestom.server.instance.block">Block.Getter</a>, <a href="block/Block.Setter.html" title="interface in net.minestom.server.instance.block">Block.Setter</a>, <a href="../world/biomes/Biome.Getter.html" title="interface in net.minestom.server.world.biomes">Biome.Getter</a>, <a href="../world/biomes/Biome.Setter.html" title="interface in net.minestom.server.world.biomes">Biome.Setter</a>, <a href="../Viewable.html" title="interface in net.minestom.server">Viewable</a>, <a href="../Tickable.html" title="interface in net.minestom.server">Tickable</a>, <a href="../tag/Taggable.html" title="interface in net.minestom.server.tag">Taggable</a>, <a href="../snapshot/Snapshotable.html" title="interface in net.minestom.server.snapshot">Snapshotable</a></span></div>
<div class="block">A chunk is a part of an <a href="Instance.html" title="class in net.minestom.server.instance"><code>Instance</code></a>, limited by a size of 16x256x16 blocks and subdivided in 16 sections of 16 blocks height.
Should contain all the blocks located at those positions and manage their tick updates.
Be aware that implementations do not need to be thread-safe, all chunks are guarded by their own instance ('this').
<p>
You can create your own implementation of this class by extending it
and create the objects in <a href="InstanceContainer.html#setChunkSupplier(net.minestom.server.utils.chunk.ChunkSupplier)"><code>InstanceContainer.setChunkSupplier(ChunkSupplier)</code></a>.
<p>
You generally want to avoid storing references of this object as this could lead to a huge memory leak,
you should store the chunk coordinates instead.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<li>
<section class="nested-class-summary" id="nested-class-summary">
<h2>Nested Class Summary</h2>
<div class="inherited-list">
<h2 id="nested-classes-inherited-from-class-net.minestom.server.instance.block.Block.Getter">Nested classes/interfaces inherited from interface&nbsp;net.minestom.server.instance.block.<a href="block/Block.Getter.html" title="interface in net.minestom.server.instance.block">Block.Getter</a></h2>
<code><a href="block/Block.Getter.Condition.html" title="enum class in net.minestom.server.instance.block">Block.Getter.Condition</a></code></div>
</section>
</li>
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>static final int</code></div>
<div class="col-second even-row-color"><code><a href="#CHUNK_SECTION_SIZE" class="member-name-link">CHUNK_SECTION_SIZE</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>static final int</code></div>
<div class="col-second odd-row-color"><code><a href="#CHUNK_SIZE_X" class="member-name-link">CHUNK_SIZE_X</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>static final int</code></div>
<div class="col-second even-row-color"><code><a href="#CHUNK_SIZE_Z" class="member-name-link">CHUNK_SIZE_Z</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>protected final int</code></div>
<div class="col-second odd-row-color"><code><a href="#chunkX" class="member-name-link">chunkX</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>protected final int</code></div>
<div class="col-second even-row-color"><code><a href="#chunkZ" class="member-name-link">chunkZ</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>protected <a href="../entity/pathfinding/PFColumnarSpace.html" title="class in net.minestom.server.entity.pathfinding">PFColumnarSpace</a></code></div>
<div class="col-second odd-row-color"><code><a href="#columnarSpace" class="member-name-link">columnarSpace</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>protected <a href="Instance.html" title="class in net.minestom.server.instance">Instance</a></code></div>
<div class="col-second even-row-color"><code><a href="#instance" class="member-name-link">instance</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>protected boolean</code></div>
<div class="col-second odd-row-color"><code><a href="#loaded" class="member-name-link">loaded</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>protected final int</code></div>
<div class="col-second even-row-color"><code><a href="#maxSection" class="member-name-link">maxSection</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>protected final int</code></div>
<div class="col-second odd-row-color"><code><a href="#minSection" class="member-name-link">minSection</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(net.minestom.server.instance.Instance,int,int,boolean)" class="member-name-link">Chunk</a><wbr>(@NotNull <a href="Instance.html" title="class in net.minestom.server.instance">Instance</a>&nbsp;instance,
int&nbsp;chunkX,
int&nbsp;chunkZ,
boolean&nbsp;shouldGenerate)</code></div>
<div class="col-last even-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel" aria-labelledby="method-summary-table-tab0">
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addViewer(net.minestom.server.entity.Player)" class="member-name-link">addViewer</a><wbr>(@NotNull <a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds a viewer.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract @NotNull <a href="Chunk.html" title="class in net.minestom.server.instance">Chunk</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#copy(net.minestom.server.instance.Instance,int,int)" class="member-name-link">copy</a><wbr>(@NotNull <a href="Instance.html" title="class in net.minestom.server.instance">Instance</a>&nbsp;instance,
int&nbsp;chunkX,
int&nbsp;chunkZ)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Creates a copy of this chunk, including blocks state id, custom block id, biomes, update data.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getChunkX()" class="member-name-link">getChunkX</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the chunk X.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getChunkZ()" class="member-name-link">getChunkZ</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the chunk Z.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract @NotNull <a href="../network/packet/server/SendablePacket.html" title="interface in net.minestom.server.network.packet.server">SendablePacket</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getFullDataPacket()" class="member-name-link">getFullDataPacket</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>@NotNull <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getIdentifier()" class="member-name-link">getIdentifier</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the unique identifier of this chunk.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>@NotNull <a href="Instance.html" title="class in net.minestom.server.instance">Instance</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getInstance()" class="member-name-link">getInstance</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the instance where this chunk is stored</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract long</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getLastChangeTime()" class="member-name-link">getLastChangeTime</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the last time that this chunk changed.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMaxSection()" class="member-name-link">getMaxSection</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the highest (exclusive) section Y available in this chunk</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMinSection()" class="member-name-link">getMinSection</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the lowest (inclusive) section Y available in this chunk</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract @NotNull <a href="Section.html" title="class in net.minestom.server.instance">Section</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getSection(int)" class="member-name-link">getSection</a><wbr>(int&nbsp;section)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>@NotNull <a href="Section.html" title="class in net.minestom.server.instance">Section</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSectionAt(int)" class="member-name-link">getSectionAt</a><wbr>(int&nbsp;blockY)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract @NotNull <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><wbr>&lt;<a href="Section.html" title="class in net.minestom.server.instance">Section</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getSections()" class="member-name-link">getSections</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>@NotNull <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a><wbr>&lt;<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getViewers()" class="member-name-link">getViewers</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets all the viewers of this viewable element.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#invalidate()" class="member-name-link">invalidate</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Invalidate the chunk caches</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isLoaded()" class="member-name-link">isLoaded</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Used to verify if the chunk should still be kept in memory.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isReadOnly()" class="member-name-link">isReadOnly</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets if this chunk is read-only.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#loadHeightmapsFromNBT(org.jglrxavpok.hephaistos.nbt.NBTCompound)" class="member-name-link">loadHeightmapsFromNBT</a><wbr>(org.jglrxavpok.hephaistos.nbt.NBTCompound&nbsp;heightmaps)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract @NotNull <a href="heightmap/Heightmap.html" title="class in net.minestom.server.instance.heightmap">Heightmap</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#motionBlockingHeightmap()" class="member-name-link">motionBlockingHeightmap</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#onGenerate()" class="member-name-link">onGenerate</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Called when the chunk generator has finished generating the chunk.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#onLoad()" class="member-name-link">onLoad</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Called when the chunk has been successfully loaded.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#removeViewer(net.minestom.server.entity.Player)" class="member-name-link">removeViewer</a><wbr>(@NotNull <a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Removes a viewer.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#reset()" class="member-name-link">reset</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Resets the chunk, this means clearing all the data making it empty.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sendChunk()" class="member-name-link">sendChunk</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sendChunk(net.minestom.server.entity.Player)" class="member-name-link">sendChunk</a><wbr>(@NotNull <a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sends the chunk data to <code>player</code>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setBlock(int,int,int,net.minestom.server.instance.block.Block)" class="member-name-link">setBlock</a><wbr>(int&nbsp;x,
int&nbsp;y,
int&nbsp;z,
@NotNull <a href="block/Block.html" title="interface in net.minestom.server.instance.block">Block</a>&nbsp;block)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets a block at a position.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>protected abstract void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setBlock(int,int,int,net.minestom.server.instance.block.Block,net.minestom.server.instance.block.BlockHandler.Placement,net.minestom.server.instance.block.BlockHandler.Destroy)" class="member-name-link">setBlock</a><wbr>(int&nbsp;x,
int&nbsp;y,
int&nbsp;z,
@NotNull <a href="block/Block.html" title="interface in net.minestom.server.instance.block">Block</a>&nbsp;block,
<a href="block/BlockHandler.Placement.html" title="class in net.minestom.server.instance.block">BlockHandler.Placement</a>&nbsp;placement,
<a href="block/BlockHandler.Destroy.html" title="class in net.minestom.server.instance.block">BlockHandler.Destroy</a>&nbsp;destroy)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setColumnarSpace(net.minestom.server.entity.pathfinding.PFColumnarSpace)" class="member-name-link">setColumnarSpace</a><wbr>(<a href="../entity/pathfinding/PFColumnarSpace.html" title="class in net.minestom.server.entity.pathfinding">PFColumnarSpace</a>&nbsp;columnarSpace)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Changes this chunk columnar space.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setReadOnly(boolean)" class="member-name-link">setReadOnly</a><wbr>(boolean&nbsp;readOnly)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Changes the read state of the chunk.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#shouldGenerate()" class="member-name-link">shouldGenerate</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets if this chunk will or had been loaded with a <a href="ChunkGenerator.html" title="interface in net.minestom.server.instance"><code>ChunkGenerator</code></a>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>@NotNull <a href="../tag/TagHandler.html" title="interface in net.minestom.server.tag">TagHandler</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#tagHandler()" class="member-name-link">tagHandler</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#tick(long)" class="member-name-link">tick</a><wbr>(long&nbsp;time)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Executes a chunk tick.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>@NotNull <a href="../coordinate/Point.html" title="interface in net.minestom.server.coordinate">Point</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toPosition()" class="member-name-link">toPosition</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the world position of this chunk.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">toString</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#unload()" class="member-name-link">unload</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the chunk as "unloaded".</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract @NotNull <a href="heightmap/Heightmap.html" title="class in net.minestom.server.instance.heightmap">Heightmap</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#worldSurfaceHeightmap()" class="member-name-link">worldSurfaceHeightmap</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">&nbsp;</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-net.minestom.server.world.biomes.Biome.Getter">Methods inherited from interface&nbsp;net.minestom.server.world.biomes.<a href="../world/biomes/Biome.Getter.html" title="interface in net.minestom.server.world.biomes">Biome.Getter</a></h3>
<code><a href="../world/biomes/Biome.Getter.html#getBiome(int,int,int)">getBiome</a>, <a href="../world/biomes/Biome.Getter.html#getBiome(net.minestom.server.coordinate.Point)">getBiome</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-net.minestom.server.world.biomes.Biome.Setter">Methods inherited from interface&nbsp;net.minestom.server.world.biomes.<a href="../world/biomes/Biome.Setter.html" title="interface in net.minestom.server.world.biomes">Biome.Setter</a></h3>
<code><a href="../world/biomes/Biome.Setter.html#setBiome(int,int,int,net.minestom.server.world.biomes.Biome)">setBiome</a>, <a href="../world/biomes/Biome.Setter.html#setBiome(net.minestom.server.coordinate.Point,net.minestom.server.world.biomes.Biome)">setBiome</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-net.minestom.server.instance.block.Block.Getter">Methods inherited from interface&nbsp;net.minestom.server.instance.block.<a href="block/Block.Getter.html" title="interface in net.minestom.server.instance.block">Block.Getter</a></h3>
<code><a href="block/Block.Getter.html#getBlock(int,int,int)">getBlock</a>, <a href="block/Block.Getter.html#getBlock(int,int,int,net.minestom.server.instance.block.Block.Getter.Condition)">getBlock</a>, <a href="block/Block.Getter.html#getBlock(net.minestom.server.coordinate.Point)">getBlock</a>, <a href="block/Block.Getter.html#getBlock(net.minestom.server.coordinate.Point,net.minestom.server.instance.block.Block.Getter.Condition)">getBlock</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-net.minestom.server.instance.block.Block.Setter">Methods inherited from interface&nbsp;net.minestom.server.instance.block.<a href="block/Block.Setter.html" title="interface in net.minestom.server.instance.block">Block.Setter</a></h3>
<code><a href="block/Block.Setter.html#setBlock(net.minestom.server.coordinate.Point,net.minestom.server.instance.block.Block)">setBlock</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-net.minestom.server.snapshot.Snapshotable">Methods inherited from interface&nbsp;net.minestom.server.snapshot.<a href="../snapshot/Snapshotable.html" title="interface in net.minestom.server.snapshot">Snapshotable</a></h3>
<code><a href="../snapshot/Snapshotable.html#updateSnapshot(net.minestom.server.snapshot.SnapshotUpdater)">updateSnapshot</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-net.minestom.server.tag.Taggable">Methods inherited from interface&nbsp;net.minestom.server.tag.<a href="../tag/Taggable.html" title="interface in net.minestom.server.tag">Taggable</a></h3>
<code><a href="../tag/Taggable.html#getTag(net.minestom.server.tag.Tag)">getTag</a>, <a href="../tag/Taggable.html#hasTag(net.minestom.server.tag.Tag)">hasTag</a>, <a href="../tag/Taggable.html#removeTag(net.minestom.server.tag.Tag)">removeTag</a>, <a href="../tag/Taggable.html#setTag(net.minestom.server.tag.Tag,T)">setTag</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-net.minestom.server.Viewable">Methods inherited from interface&nbsp;net.minestom.server.<a href="../Viewable.html" title="interface in net.minestom.server">Viewable</a></h3>
<code><a href="../Viewable.html#getViewersAsAudience()">getViewersAsAudience</a>, <a href="../Viewable.html#getViewersAsAudiences()">getViewersAsAudiences</a>, <a href="../Viewable.html#isViewer(net.minestom.server.entity.Player)">isViewer</a>, <a href="../Viewable.html#sendPacketsToViewers(java.util.Collection)">sendPacketsToViewers</a>, <a href="../Viewable.html#sendPacketsToViewers(net.minestom.server.network.packet.server.SendablePacket...)">sendPacketsToViewers</a>, <a href="../Viewable.html#sendPacketToViewers(net.minestom.server.network.packet.server.SendablePacket)">sendPacketToViewers</a>, <a href="../Viewable.html#sendPacketToViewersAndSelf(net.minestom.server.network.packet.server.SendablePacket)">sendPacketToViewersAndSelf</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="CHUNK_SIZE_X">
<h3>CHUNK_SIZE_X</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">CHUNK_SIZE_X</span></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../../../../constant-values.html#net.minestom.server.instance.Chunk.CHUNK_SIZE_X">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="CHUNK_SIZE_Z">
<h3>CHUNK_SIZE_Z</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">CHUNK_SIZE_Z</span></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../../../../constant-values.html#net.minestom.server.instance.Chunk.CHUNK_SIZE_Z">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="CHUNK_SECTION_SIZE">
<h3>CHUNK_SECTION_SIZE</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">CHUNK_SECTION_SIZE</span></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../../../../constant-values.html#net.minestom.server.instance.Chunk.CHUNK_SECTION_SIZE">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="instance">
<h3>instance</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="Instance.html" title="class in net.minestom.server.instance">Instance</a></span>&nbsp;<span class="element-name">instance</span></div>
</section>
</li>
<li>
<section class="detail" id="chunkX">
<h3>chunkX</h3>
<div class="member-signature"><span class="modifiers">protected final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">chunkX</span></div>
</section>
</li>
<li>
<section class="detail" id="chunkZ">
<h3>chunkZ</h3>
<div class="member-signature"><span class="modifiers">protected final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">chunkZ</span></div>
</section>
</li>
<li>
<section class="detail" id="minSection">
<h3>minSection</h3>
<div class="member-signature"><span class="modifiers">protected final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">minSection</span></div>
</section>
</li>
<li>
<section class="detail" id="maxSection">
<h3>maxSection</h3>
<div class="member-signature"><span class="modifiers">protected final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">maxSection</span></div>
</section>
</li>
<li>
<section class="detail" id="loaded">
<h3>loaded</h3>
<div class="member-signature"><span class="modifiers">protected volatile</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">loaded</span></div>
</section>
</li>
<li>
<section class="detail" id="columnarSpace">
<h3>columnarSpace</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="../entity/pathfinding/PFColumnarSpace.html" title="class in net.minestom.server.entity.pathfinding">PFColumnarSpace</a></span>&nbsp;<span class="element-name">columnarSpace</span></div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;(net.minestom.server.instance.Instance,int,int,boolean)">
<h3>Chunk</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">Chunk</span><wbr><span class="parameters">(@NotNull
@NotNull <a href="Instance.html" title="class in net.minestom.server.instance">Instance</a>&nbsp;instance,
int&nbsp;chunkX,
int&nbsp;chunkZ,
boolean&nbsp;shouldGenerate)</span></div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="setBlock(int,int,int,net.minestom.server.instance.block.Block)">
<h3>setBlock</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setBlock</span><wbr><span class="parameters">(int&nbsp;x,
int&nbsp;y,
int&nbsp;z,
@NotNull
@NotNull <a href="block/Block.html" title="interface in net.minestom.server.instance.block">Block</a>&nbsp;block)</span></div>
<div class="block">Sets a block at a position.
<p>
This is used when the previous block has to be destroyed/replaced, meaning that it clears the previous data and update method.
<p>
WARNING: this method is not thread-safe (in order to bring performance improvement with <a href="batch/Batch.html" title="interface in net.minestom.server.instance.batch"><code>batches</code></a>)
The thread-safe version is <a href="Instance.html#setBlock(int,int,int,net.minestom.server.instance.block.Block)"><code>Instance.setBlock(int, int, int, Block)</code></a> (or any similar instance methods)
Otherwise, you can simply do not forget to have this chunk synchronized when this is called.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="block/Block.Setter.html#setBlock(int,int,int,net.minestom.server.instance.block.Block)">setBlock</a></code>&nbsp;in interface&nbsp;<code><a href="block/Block.Setter.html" title="interface in net.minestom.server.instance.block">Block.Setter</a></code></dd>
<dt>Parameters:</dt>
<dd><code>x</code> - the block X</dd>
<dd><code>y</code> - the block Y</dd>
<dd><code>z</code> - the block Z</dd>
<dd><code>block</code> - the block to place</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setBlock(int,int,int,net.minestom.server.instance.block.Block,net.minestom.server.instance.block.BlockHandler.Placement,net.minestom.server.instance.block.BlockHandler.Destroy)">
<h3>setBlock</h3>
<div class="member-signature"><span class="modifiers">protected abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setBlock</span><wbr><span class="parameters">(int&nbsp;x,
int&nbsp;y,
int&nbsp;z,
@NotNull
@NotNull <a href="block/Block.html" title="interface in net.minestom.server.instance.block">Block</a>&nbsp;block,
@Nullable
<a href="block/BlockHandler.Placement.html" title="class in net.minestom.server.instance.block">BlockHandler.Placement</a>&nbsp;placement,
@Nullable
<a href="block/BlockHandler.Destroy.html" title="class in net.minestom.server.instance.block">BlockHandler.Destroy</a>&nbsp;destroy)</span></div>
</section>
</li>
<li>
<section class="detail" id="getSections()">
<h3>getSections</h3>
<div class="member-signature"><span class="annotations">@NotNull
</span><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">@NotNull <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="Section.html" title="class in net.minestom.server.instance">Section</a>&gt;</span>&nbsp;<span class="element-name">getSections</span>()</div>
</section>
</li>
<li>
<section class="detail" id="getSection(int)">
<h3>getSection</h3>
<div class="member-signature"><span class="annotations">@NotNull
</span><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">@NotNull <a href="Section.html" title="class in net.minestom.server.instance">Section</a></span>&nbsp;<span class="element-name">getSection</span><wbr><span class="parameters">(int&nbsp;section)</span></div>
</section>
</li>
<li>
<section class="detail" id="motionBlockingHeightmap()">
<h3>motionBlockingHeightmap</h3>
<div class="member-signature"><span class="annotations">@NotNull
</span><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">@NotNull <a href="heightmap/Heightmap.html" title="class in net.minestom.server.instance.heightmap">Heightmap</a></span>&nbsp;<span class="element-name">motionBlockingHeightmap</span>()</div>
</section>
</li>
<li>
<section class="detail" id="worldSurfaceHeightmap()">
<h3>worldSurfaceHeightmap</h3>
<div class="member-signature"><span class="annotations">@NotNull
</span><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">@NotNull <a href="heightmap/Heightmap.html" title="class in net.minestom.server.instance.heightmap">Heightmap</a></span>&nbsp;<span class="element-name">worldSurfaceHeightmap</span>()</div>
</section>
</li>
<li>
<section class="detail" id="loadHeightmapsFromNBT(org.jglrxavpok.hephaistos.nbt.NBTCompound)">
<h3>loadHeightmapsFromNBT</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">loadHeightmapsFromNBT</span><wbr><span class="parameters">(org.jglrxavpok.hephaistos.nbt.NBTCompound&nbsp;heightmaps)</span></div>
</section>
</li>
<li>
<section class="detail" id="getSectionAt(int)">
<h3>getSectionAt</h3>
<div class="member-signature"><span class="annotations">@NotNull
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">@NotNull <a href="Section.html" title="class in net.minestom.server.instance">Section</a></span>&nbsp;<span class="element-name">getSectionAt</span><wbr><span class="parameters">(int&nbsp;blockY)</span></div>
</section>
</li>
<li>
<section class="detail" id="tick(long)">
<h3>tick</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">tick</span><wbr><span class="parameters">(long&nbsp;time)</span></div>
<div class="block">Executes a chunk tick.
<p>
Should be used to update all the blocks in the chunk.
<p>
WARNING: this method doesn't necessary have to be thread-safe, proceed with caution.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Tickable.html#tick(long)">tick</a></code>&nbsp;in interface&nbsp;<code><a href="../Tickable.html" title="interface in net.minestom.server">Tickable</a></code></dd>
<dt>Parameters:</dt>
<dd><code>time</code> - the time of the update in milliseconds</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLastChangeTime()">
<h3>getLastChangeTime</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name">getLastChangeTime</span>()</div>
<div class="block">Gets the last time that this chunk changed.
<p>
"Change" means here data used in <a href="../network/packet/server/play/ChunkDataPacket.html" title="class in net.minestom.server.network.packet.server.play"><code>ChunkDataPacket</code></a>.
It is necessary to see if the cached version of this chunk can be used
instead of re-writing and compressing everything.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the last change time in milliseconds</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="sendChunk(net.minestom.server.entity.Player)">
<h3>sendChunk</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">sendChunk</span><wbr><span class="parameters">(@NotNull
@NotNull <a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player)</span></div>
<div class="block">Sends the chunk data to <code>player</code>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>player</code> - the player</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="sendChunk()">
<h3>sendChunk</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">sendChunk</span>()</div>
</section>
</li>
<li>
<section class="detail" id="getFullDataPacket()">
<h3>getFullDataPacket</h3>
<div class="member-signature"><span class="annotations">@Internal
@NotNull
</span><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">@NotNull <a href="../network/packet/server/SendablePacket.html" title="interface in net.minestom.server.network.packet.server">SendablePacket</a></span>&nbsp;<span class="element-name">getFullDataPacket</span>()</div>
</section>
</li>
<li>
<section class="detail" id="copy(net.minestom.server.instance.Instance,int,int)">
<h3>copy</h3>
<div class="member-signature"><span class="annotations">@NotNull
</span><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">@NotNull <a href="Chunk.html" title="class in net.minestom.server.instance">Chunk</a></span>&nbsp;<span class="element-name">copy</span><wbr><span class="parameters">(@NotNull
@NotNull <a href="Instance.html" title="class in net.minestom.server.instance">Instance</a>&nbsp;instance,
int&nbsp;chunkX,
int&nbsp;chunkZ)</span></div>
<div class="block">Creates a copy of this chunk, including blocks state id, custom block id, biomes, update data.
<p>
The chunk position (X/Z) can be modified using the given arguments.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>instance</code> - the chunk owner</dd>
<dd><code>chunkX</code> - the chunk X of the copy</dd>
<dd><code>chunkZ</code> - the chunk Z of the copy</dd>
<dt>Returns:</dt>
<dd>a copy of this chunk with a potentially new instance and position</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="reset()">
<h3>reset</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">reset</span>()</div>
<div class="block">Resets the chunk, this means clearing all the data making it empty.</div>
</section>
</li>
<li>
<section class="detail" id="getIdentifier()">
<h3>getIdentifier</h3>
<div class="member-signature"><span class="annotations">@NotNull
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">@NotNull <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a></span>&nbsp;<span class="element-name">getIdentifier</span>()</div>
<div class="block">Gets the unique identifier of this chunk.
<p>
WARNING: this UUID is not persistent but randomized once the object is instantiated.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the chunk identifier</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getInstance()">
<h3>getInstance</h3>
<div class="member-signature"><span class="annotations">@NotNull
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">@NotNull <a href="Instance.html" title="class in net.minestom.server.instance">Instance</a></span>&nbsp;<span class="element-name">getInstance</span>()</div>
<div class="block">Gets the instance where this chunk is stored</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the linked instance</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getChunkX()">
<h3>getChunkX</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getChunkX</span>()</div>
<div class="block">Gets the chunk X.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the chunk X</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getChunkZ()">
<h3>getChunkZ</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getChunkZ</span>()</div>
<div class="block">Gets the chunk Z.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the chunk Z</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMinSection()">
<h3>getMinSection</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getMinSection</span>()</div>
<div class="block">Gets the lowest (inclusive) section Y available in this chunk</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the lowest (inclusive) section Y available in this chunk</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMaxSection()">
<h3>getMaxSection</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getMaxSection</span>()</div>
<div class="block">Gets the highest (exclusive) section Y available in this chunk</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the highest (exclusive) section Y available in this chunk</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="toPosition()">
<h3>toPosition</h3>
<div class="member-signature"><span class="annotations">@NotNull
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">@NotNull <a href="../coordinate/Point.html" title="interface in net.minestom.server.coordinate">Point</a></span>&nbsp;<span class="element-name">toPosition</span>()</div>
<div class="block">Gets the world position of this chunk.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the position of this chunk</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="shouldGenerate()">
<h3>shouldGenerate</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">shouldGenerate</span>()</div>
<div class="block">Gets if this chunk will or had been loaded with a <a href="ChunkGenerator.html" title="interface in net.minestom.server.instance"><code>ChunkGenerator</code></a>.
<p>
If false, the chunk will be entirely empty when loaded.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>true if this chunk is affected by a <a href="ChunkGenerator.html" title="interface in net.minestom.server.instance"><code>ChunkGenerator</code></a></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isReadOnly()">
<h3>isReadOnly</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isReadOnly</span>()</div>
<div class="block">Gets if this chunk is read-only.
<p>
Being read-only should prevent block placing/breaking and setting block from an <a href="Instance.html" title="class in net.minestom.server.instance"><code>Instance</code></a>.
It does not affect <a href="IChunkLoader.html" title="interface in net.minestom.server.instance"><code>IChunkLoader</code></a> and <a href="ChunkGenerator.html" title="interface in net.minestom.server.instance"><code>ChunkGenerator</code></a>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>true if the chunk is read-only</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setReadOnly(boolean)">
<h3>setReadOnly</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setReadOnly</span><wbr><span class="parameters">(boolean&nbsp;readOnly)</span></div>
<div class="block">Changes the read state of the chunk.
<p>
Being read-only should prevent block placing/breaking and setting block from an <a href="Instance.html" title="class in net.minestom.server.instance"><code>Instance</code></a>.
It does not affect <a href="IChunkLoader.html" title="interface in net.minestom.server.instance"><code>IChunkLoader</code></a> and <a href="ChunkGenerator.html" title="interface in net.minestom.server.instance"><code>ChunkGenerator</code></a>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>readOnly</code> - true to make the chunk read-only, false otherwise</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setColumnarSpace(net.minestom.server.entity.pathfinding.PFColumnarSpace)">
<h3>setColumnarSpace</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setColumnarSpace</span><wbr><span class="parameters">(<a href="../entity/pathfinding/PFColumnarSpace.html" title="class in net.minestom.server.entity.pathfinding">PFColumnarSpace</a>&nbsp;columnarSpace)</span></div>
<div class="block">Changes this chunk columnar space.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>columnarSpace</code> - the new columnar space</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isLoaded()">
<h3>isLoaded</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isLoaded</span>()</div>
<div class="block">Used to verify if the chunk should still be kept in memory.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>true if the chunk is loaded</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="onLoad()">
<h3>onLoad</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">onLoad</span>()</div>
<div class="block">Called when the chunk has been successfully loaded.</div>
</section>
</li>
<li>
<section class="detail" id="onGenerate()">
<h3>onGenerate</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">onGenerate</span>()</div>
<div class="block">Called when the chunk generator has finished generating the chunk.</div>
</section>
</li>
<li>
<section class="detail" id="toString()">
<h3>toString</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">toString</span>()</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addViewer(net.minestom.server.entity.Player)">
<h3>addViewer</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">addViewer</span><wbr><span class="parameters">(@NotNull
@NotNull <a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../Viewable.html#addViewer(net.minestom.server.entity.Player)">Viewable</a></code></span></div>
<div class="block">Adds a viewer.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Viewable.html#addViewer(net.minestom.server.entity.Player)">addViewer</a></code>&nbsp;in interface&nbsp;<code><a href="../Viewable.html" title="interface in net.minestom.server">Viewable</a></code></dd>
<dt>Parameters:</dt>
<dd><code>player</code> - the viewer to add</dd>
<dt>Returns:</dt>
<dd>true if the player has been added, false otherwise (could be because he is already a viewer)</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="removeViewer(net.minestom.server.entity.Player)">
<h3>removeViewer</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">removeViewer</span><wbr><span class="parameters">(@NotNull
@NotNull <a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../Viewable.html#removeViewer(net.minestom.server.entity.Player)">Viewable</a></code></span></div>
<div class="block">Removes a viewer.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Viewable.html#removeViewer(net.minestom.server.entity.Player)">removeViewer</a></code>&nbsp;in interface&nbsp;<code><a href="../Viewable.html" title="interface in net.minestom.server">Viewable</a></code></dd>
<dt>Parameters:</dt>
<dd><code>player</code> - the viewer to remove</dd>
<dt>Returns:</dt>
<dd>true if the player has been removed, false otherwise (could be because he was not a viewer)</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getViewers()">
<h3>getViewers</h3>
<div class="member-signature"><span class="annotations">@NotNull
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">@NotNull <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a>&lt;<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&gt;</span>&nbsp;<span class="element-name">getViewers</span>()</div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../Viewable.html#getViewers()">Viewable</a></code></span></div>
<div class="block">Gets all the viewers of this viewable element.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Viewable.html#getViewers()">getViewers</a></code>&nbsp;in interface&nbsp;<code><a href="../Viewable.html" title="interface in net.minestom.server">Viewable</a></code></dd>
<dt>Returns:</dt>
<dd>A Set containing all the element's viewers</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="tagHandler()">
<h3>tagHandler</h3>
<div class="member-signature"><span class="annotations">@NotNull
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">@NotNull <a href="../tag/TagHandler.html" title="interface in net.minestom.server.tag">TagHandler</a></span>&nbsp;<span class="element-name">tagHandler</span>()</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../tag/Taggable.html#tagHandler()">tagHandler</a></code>&nbsp;in interface&nbsp;<code><a href="../tag/Taggable.html" title="interface in net.minestom.server.tag">Taggable</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="unload()">
<h3>unload</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">unload</span>()</div>
<div class="block">Sets the chunk as "unloaded".</div>
</section>
</li>
<li>
<section class="detail" id="invalidate()">
<h3>invalidate</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">invalidate</span>()</div>
<div class="block">Invalidate the chunk caches</div>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>