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
-
Constructor Summary
ConstructorDescriptionGlowChunkSnapshot
(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 TypeMethodDescriptionboolean
contains
(@NotNull org.bukkit.block.data.BlockData blockData) org.bukkit.block.Biome
getBiome
(int x, int z) @NotNull org.bukkit.block.Biome
getBiome
(int x, int y, int z) org.bukkit.block.data.BlockData
getBlockData
(int x, int y, int z) int
getBlockEmittedLight
(int x, int y, int z) int
getBlockSkyLight
(int x, int y, int z) org.bukkit.Material
getBlockType
(int x, int y, int z) int
getBlockTypeId
(int x, int y, int z) long
int
getData
(int x, int y, int z) int
getHighestBlockYAt
(int x, int z) double
getRawBiomeRainfall
(int x, int z) byte[]
double
getRawBiomeTemperature
(int x, int z) double
getRawBiomeTemperature
(int x, int y, int z) int[]
Returns the heightmap, converted to anint[]
.The ChunkSection array backing this snapshot.int
getX()
int
getZ()
boolean
isSectionEmpty
(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:
isSectionEmpty
in interfaceorg.bukkit.ChunkSnapshot
-
contains
public boolean contains(@NotNull @NotNull org.bukkit.block.data.BlockData blockData) - Specified by:
contains
in 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:
getBlockType
in interfaceorg.bukkit.ChunkSnapshot
-
getData
public int getData(int x, int y, int z) - Specified by:
getData
in interfaceorg.bukkit.ChunkSnapshot
-
getBlockData
public org.bukkit.block.data.BlockData getBlockData(int x, int y, int z) - Specified by:
getBlockData
in interfaceorg.bukkit.ChunkSnapshot
-
getBlockSkyLight
public int getBlockSkyLight(int x, int y, int z) - Specified by:
getBlockSkyLight
in interfaceorg.bukkit.ChunkSnapshot
-
getBlockEmittedLight
public int getBlockEmittedLight(int x, int y, int z) - Specified by:
getBlockEmittedLight
in interfaceorg.bukkit.ChunkSnapshot
-
getHighestBlockYAt
public int getHighestBlockYAt(int x, int z) - Specified by:
getHighestBlockYAt
in interfaceorg.bukkit.ChunkSnapshot
-
getBiome
public org.bukkit.block.Biome getBiome(int x, int z) - Specified by:
getBiome
in interfaceorg.bukkit.ChunkSnapshot
-
getBiome
@NotNull public @NotNull org.bukkit.block.Biome getBiome(int x, int y, int z) - Specified by:
getBiome
in interfaceorg.bukkit.ChunkSnapshot
-
getRawBiomeTemperature
public double getRawBiomeTemperature(int x, int z) - Specified by:
getRawBiomeTemperature
in interfaceorg.bukkit.ChunkSnapshot
-
getRawBiomeTemperature
public double getRawBiomeTemperature(int x, int y, int z) - Specified by:
getRawBiomeTemperature
in interfaceorg.bukkit.ChunkSnapshot
-
getRawBiomeRainfall
public double getRawBiomeRainfall(int x, int z) -
getX
public int getX()- Specified by:
getX
in interfaceorg.bukkit.ChunkSnapshot
-
getZ
public int getZ()- Specified by:
getZ
in interfaceorg.bukkit.ChunkSnapshot
-
getWorldName
- Specified by:
getWorldName
in interfaceorg.bukkit.ChunkSnapshot
-
getCaptureFullTime
public long getCaptureFullTime()- Specified by:
getCaptureFullTime
in 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()
-