public class Heightmap
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Heightmap.Type |
static class |
Heightmap.Usage |
Modifier and Type | Field and Description |
---|---|
private static java.util.function.Predicate<BlockState> |
BLOCKS_MOVEMENT |
private IChunk |
chunk |
private BitArray |
data |
private java.util.function.Predicate<BlockState> |
heightLimitPredicate |
private static java.util.function.Predicate<BlockState> |
IS_NOT_AIR |
Constructor and Description |
---|
Heightmap(IChunk chunkIn,
Heightmap.Type type) |
Modifier and Type | Method and Description |
---|---|
long[] |
getDataArray() |
private static int |
getDataArrayIndex(int x,
int z) |
private int |
getHeight(int dataArrayIndex) |
int |
getHeight(int x,
int z) |
private void |
set(int x,
int z,
int value) |
void |
setDataArray(long[] dataIn) |
boolean |
update(int p_202270_1_,
int p_202270_2_,
int p_202270_3_,
BlockState p_202270_4_) |
static void |
updateChunkHeightmaps(IChunk chunkIn,
java.util.Set<Heightmap.Type> types) |
private static final java.util.function.Predicate<BlockState> IS_NOT_AIR
private static final java.util.function.Predicate<BlockState> BLOCKS_MOVEMENT
private final BitArray data
private final java.util.function.Predicate<BlockState> heightLimitPredicate
private final IChunk chunk
public Heightmap(IChunk chunkIn, Heightmap.Type type)
public static void updateChunkHeightmaps(IChunk chunkIn, java.util.Set<Heightmap.Type> types)
public boolean update(int p_202270_1_, int p_202270_2_, int p_202270_3_, BlockState p_202270_4_)
public int getHeight(int x, int z)
private int getHeight(int dataArrayIndex)
private void set(int x, int z, int value)
public void setDataArray(long[] dataIn)
public long[] getDataArray()
private static int getDataArrayIndex(int x, int z)