public class Heightmap extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Heightmap.Purpose |
static class |
Heightmap.Type |
Modifier and Type | Field and Description |
---|---|
private static Predicate<BlockState> |
ALWAYS_TRUE |
private Predicate<BlockState> |
blockPredicate |
private Chunk |
chunk |
private PackedIntegerArray |
storage |
private static Predicate<BlockState> |
SUFFOCATES |
Constructor and Description |
---|
Heightmap(Chunk chunk,
Heightmap.Type type) |
Modifier and Type | Method and Description |
---|---|
long[] |
asLongArray() |
private int |
get(int index) |
int |
get(int x,
int z) |
static void |
populateHeightmaps(Chunk chunk,
Set<Heightmap.Type> types) |
private void |
set(int x,
int z,
int height) |
void |
setTo(long[] heightmap) |
private static int |
toIndex(int x,
int z) |
boolean |
trackUpdate(int x,
int y,
int z,
BlockState state) |
private static final Predicate<BlockState> ALWAYS_TRUE
private static final Predicate<BlockState> SUFFOCATES
private final PackedIntegerArray storage
private final Predicate<BlockState> blockPredicate
private final Chunk chunk
public Heightmap(Chunk chunk, Heightmap.Type type)
public static void populateHeightmaps(Chunk chunk, Set<Heightmap.Type> types)
public boolean trackUpdate(int x, int y, int z, BlockState state)
public int get(int x, int z)
private int get(int index)
private void set(int x, int z, int height)
public void setTo(long[] heightmap)
public long[] asLongArray()
private static int toIndex(int x, int z)