public interface ChunkSection
Modifier and Type | Field and Description |
---|---|
static int |
BIOME_SIZE
Size (dimensions) of biomes in a chunks section.
|
static int |
SIZE
Size (dimensions) of blocks in a chunks section.
|
Modifier and Type | Method and Description |
---|---|
void |
addPalette(PaletteType type,
DataPalette blockPalette) |
default void |
addPaletteEntry(int id)
Deprecated.
|
default void |
clearPalette()
Deprecated.
|
default int |
getBlockData(int x,
int y,
int z)
Deprecated.
|
default int |
getBlockWithoutData(int x,
int y,
int z)
Deprecated.
|
default int |
getFlatBlock(int idx)
Deprecated.
|
default int |
getFlatBlock(int x,
int y,
int z)
Deprecated.
|
@Nullable ChunkSectionLight |
getLight()
Returns the light of the chunk section.
|
int |
getNonAirBlocksCount()
Returns the number of non-air blocks in this section.
|
default int |
getPaletteEntry(int index)
Deprecated.
|
default int |
getPaletteIndex(int idx)
Deprecated.
|
default int |
getPaletteSize()
Deprecated.
|
default boolean |
hasLight()
Returns whether this section holds light data.
|
static int |
index(int x,
int y,
int z) |
@Nullable DataPalette |
palette(PaletteType type)
Returns the palette of the given type if present.
|
void |
removePalette(PaletteType type) |
default void |
replacePaletteEntry(int oldId,
int newId)
Deprecated.
|
default void |
setBlockWithData(int idx,
int type,
int data)
Deprecated.
|
default void |
setBlockWithData(int x,
int y,
int z,
int type,
int data)
Deprecated.
|
default void |
setFlatBlock(int idx,
int id)
Deprecated.
|
default void |
setFlatBlock(int x,
int y,
int z,
int id)
Deprecated.
|
void |
setLight(@Nullable ChunkSectionLight light) |
void |
setNonAirBlocksCount(int nonAirBlocksCount) |
default void |
setPaletteEntry(int index,
int id)
Deprecated.
|
default void |
setPaletteIndex(int idx,
int index)
Deprecated.
|
static int |
xFromIndex(int idx) |
static int |
yFromIndex(int idx) |
static int |
zFromIndex(int idx) |
static final int SIZE
static final int BIOME_SIZE
static int index(int x, int y, int z)
static int xFromIndex(int idx)
static int yFromIndex(int idx)
static int zFromIndex(int idx)
@Deprecated default int getFlatBlock(int idx)
@Deprecated default int getFlatBlock(int x, int y, int z)
@Deprecated default void setFlatBlock(int idx, int id)
@Deprecated default void setFlatBlock(int x, int y, int z, int id)
@Deprecated default int getBlockWithoutData(int x, int y, int z)
@Deprecated default int getBlockData(int x, int y, int z)
@Deprecated default void setBlockWithData(int x, int y, int z, int type, int data)
@Deprecated default void setBlockWithData(int idx, int type, int data)
@Deprecated default void setPaletteIndex(int idx, int index)
@Deprecated default int getPaletteIndex(int idx)
@Deprecated default int getPaletteSize()
@Deprecated default int getPaletteEntry(int index)
@Deprecated default void setPaletteEntry(int index, int id)
@Deprecated default void replacePaletteEntry(int oldId, int newId)
@Deprecated default void addPaletteEntry(int id)
@Deprecated default void clearPalette()
int getNonAirBlocksCount()
void setNonAirBlocksCount(int nonAirBlocksCount)
default boolean hasLight()
@Nullable ChunkSectionLight getLight()
void setLight(@Nullable ChunkSectionLight light)
@Nullable DataPalette palette(PaletteType type)
type
- type of the palettevoid addPalette(PaletteType type, DataPalette blockPalette)
void removePalette(PaletteType type)