Package net.glowstone.chunk
Class GlowChunkSnapshot
java.lang.Object
net.glowstone.chunk.GlowChunkSnapshot
- All Implemented Interfaces:
org.bukkit.ChunkSnapshot
- Direct Known Subclasses:
GlowChunkSnapshot.EmptySnapshot
Class representing a snapshot of a chunk.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionGlowChunkSnapshot(int x, int z, org.bukkit.World world, ChunkSection[] sections, byte[] height, byte[] biomes, boolean svTemp, boolean isSlimeChunk) Creates a snapshot of a chunk. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(@NotNull org.bukkit.block.data.BlockData blockData) org.bukkit.block.BiomegetBiome(int x, int z) @NotNull org.bukkit.block.BiomegetBiome(int x, int y, int z) org.bukkit.block.data.BlockDatagetBlockData(int x, int y, int z) intgetBlockEmittedLight(int x, int y, int z) intgetBlockSkyLight(int x, int y, int z) org.bukkit.MaterialgetBlockType(int x, int y, int z) intgetBlockTypeId(int x, int y, int z) longintgetData(int x, int y, int z) intgetHighestBlockYAt(int x, int z) doublegetRawBiomeRainfall(int x, int z) byte[]doublegetRawBiomeTemperature(int x, int z) doublegetRawBiomeTemperature(int x, int y, int z) int[]Returns the heightmap, converted to anint[].The ChunkSection array backing this snapshot.intgetX()intgetZ()booleanisSectionEmpty(int sy) boolean
-
Constructor Details
-
GlowChunkSnapshot
public GlowChunkSnapshot(int x, int z, org.bukkit.World world, ChunkSection[] sections, byte[] height, byte[] biomes, boolean svTemp, boolean isSlimeChunk) Creates a snapshot of a chunk.- Parameters:
x- the chunk x coordinatez- the chunk z coordinateworld- the world the chunk is insections- the chunk contentsheight- the heightmapbiomes- the biome mapsvTemp- if true, copy temperature and humidity from the world
-
-
Method Details
-
getRawHeightmap
public int[] getRawHeightmap()Returns the heightmap, converted to anint[].- Returns:
- the heightmap as an
int[]
-
isSectionEmpty
public boolean isSectionEmpty(int sy) - Specified by:
isSectionEmptyin interfaceorg.bukkit.ChunkSnapshot
-
contains
public boolean contains(@NotNull @NotNull org.bukkit.block.data.BlockData blockData) - Specified by:
containsin interfaceorg.bukkit.ChunkSnapshot
-
getBlockTypeId
public int getBlockTypeId(int x, int y, int z) -
getBlockType
public org.bukkit.Material getBlockType(int x, int y, int z) - Specified by:
getBlockTypein interfaceorg.bukkit.ChunkSnapshot
-
getData
public int getData(int x, int y, int z) - Specified by:
getDatain interfaceorg.bukkit.ChunkSnapshot
-
getBlockData
public org.bukkit.block.data.BlockData getBlockData(int x, int y, int z) - Specified by:
getBlockDatain interfaceorg.bukkit.ChunkSnapshot
-
getBlockSkyLight
public int getBlockSkyLight(int x, int y, int z) - Specified by:
getBlockSkyLightin interfaceorg.bukkit.ChunkSnapshot
-
getBlockEmittedLight
public int getBlockEmittedLight(int x, int y, int z) - Specified by:
getBlockEmittedLightin interfaceorg.bukkit.ChunkSnapshot
-
getHighestBlockYAt
public int getHighestBlockYAt(int x, int z) - Specified by:
getHighestBlockYAtin interfaceorg.bukkit.ChunkSnapshot
-
getBiome
public org.bukkit.block.Biome getBiome(int x, int z) - Specified by:
getBiomein interfaceorg.bukkit.ChunkSnapshot
-
getBiome
@NotNull public @NotNull org.bukkit.block.Biome getBiome(int x, int y, int z) - Specified by:
getBiomein interfaceorg.bukkit.ChunkSnapshot
-
getRawBiomeTemperature
public double getRawBiomeTemperature(int x, int z) - Specified by:
getRawBiomeTemperaturein interfaceorg.bukkit.ChunkSnapshot
-
getRawBiomeTemperature
public double getRawBiomeTemperature(int x, int y, int z) - Specified by:
getRawBiomeTemperaturein interfaceorg.bukkit.ChunkSnapshot
-
getRawBiomeRainfall
public double getRawBiomeRainfall(int x, int z) -
getX
public int getX()- Specified by:
getXin interfaceorg.bukkit.ChunkSnapshot
-
getZ
public int getZ()- Specified by:
getZin interfaceorg.bukkit.ChunkSnapshot
-
getWorldName
- Specified by:
getWorldNamein interfaceorg.bukkit.ChunkSnapshot
-
getCaptureFullTime
public long getCaptureFullTime()- Specified by:
getCaptureFullTimein interfaceorg.bukkit.ChunkSnapshot
-
getRawSections
The ChunkSection array backing this snapshot. In general, it should not be modified externally.- Returns:
- The array of ChunkSections.
-
getRawBiomes
public byte[] getRawBiomes() -
isSlimeChunk
public boolean isSlimeChunk()
-