ViaVersion/common/src/main/java/us/myles/ViaVersion/api/minecraft/chunks/Chunk.java

66 lines
1.3 KiB
Java
Raw Normal View History

package us.myles.ViaVersion.api.minecraft.chunks;
2016-03-12 13:32:00 +01:00
2017-05-14 14:34:51 +02:00
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
2021-01-20 17:59:34 +01:00
import org.jetbrains.annotations.Nullable;
2021-01-20 17:59:34 +01:00
import java.util.BitSet;
import java.util.List;
2018-10-25 20:26:24 +02:00
public interface Chunk {
2020-04-04 00:32:00 +02:00
2018-10-25 20:26:24 +02:00
int getX();
int getZ();
2021-01-20 17:59:34 +01:00
/**
* @return whether this chunk holds biome data, always true for 1.17+ chunks
*/
2018-10-25 20:26:24 +02:00
boolean isBiomeData();
2021-01-20 17:59:34 +01:00
/**
* @return whether this is a full chunk, always true for 1.17+ chunks
*/
2020-04-04 00:32:00 +02:00
boolean isFullChunk();
@Deprecated
default boolean isGroundUp() {
return isFullChunk();
}
2020-06-16 18:38:16 +02:00
boolean isIgnoreOldLightData();
void setIgnoreOldLightData(boolean ignoreOldLightData);
2021-01-20 17:59:34 +01:00
/**
2021-02-17 14:49:10 +01:00
* @return chunk section bit mask for chunks < 1.17
2021-01-20 17:59:34 +01:00
* @see #getChunkMask()
*/
2018-10-25 20:26:24 +02:00
int getBitmask();
2021-01-20 18:24:43 +01:00
void setBitmask(int bitmask);
2021-01-20 17:59:34 +01:00
/**
* @return chunk section bit mask, only non-null available for 1.17+ chunks
* @see #getBitmask()
*/
@Nullable
BitSet getChunkMask();
void setChunkMask(BitSet chunkSectionMask);
2018-10-25 20:26:24 +02:00
ChunkSection[] getSections();
2021-02-11 00:00:02 +01:00
void setSections(ChunkSection[] sections);
2021-01-20 17:59:34 +01:00
@Nullable
2018-12-05 19:52:53 +01:00
int[] getBiomeData();
2018-10-25 20:26:24 +02:00
2019-12-02 11:20:48 +01:00
void setBiomeData(int[] biomeData);
2019-04-24 18:40:03 +02:00
CompoundTag getHeightMap();
void setHeightMap(CompoundTag heightMap);
2018-10-25 20:26:24 +02:00
List<CompoundTag> getBlockEntities();
2016-03-12 13:32:00 +01:00
}