Class GlowChunkSnapshot

java.lang.Object
net.glowstone.chunk.GlowChunkSnapshot
All Implemented Interfaces:
org.bukkit.ChunkSnapshot
Direct Known Subclasses:
GlowChunkSnapshot.EmptySnapshot

public class GlowChunkSnapshot extends Object implements org.bukkit.ChunkSnapshot
Class representing a snapshot of a chunk.
  • 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 coordinate
      z - the chunk z coordinate
      world - the world the chunk is in
      sections - the chunk contents
      height - the heightmap
      biomes - the biome map
      svTemp - if true, copy temperature and humidity from the world
  • Method Details

    • getRawHeightmap

      public int[] getRawHeightmap()
      Returns the heightmap, converted to an int[].
      Returns:
      the heightmap as an int[]
    • isSectionEmpty

      public boolean isSectionEmpty(int sy)
      Specified by:
      isSectionEmpty in interface org.bukkit.ChunkSnapshot
    • contains

      public boolean contains(@NotNull @NotNull org.bukkit.block.data.BlockData blockData)
      Specified by:
      contains in interface org.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 interface org.bukkit.ChunkSnapshot
    • getData

      public int getData(int x, int y, int z)
      Specified by:
      getData in interface org.bukkit.ChunkSnapshot
    • getBlockData

      public org.bukkit.block.data.BlockData getBlockData(int x, int y, int z)
      Specified by:
      getBlockData in interface org.bukkit.ChunkSnapshot
    • getBlockSkyLight

      public int getBlockSkyLight(int x, int y, int z)
      Specified by:
      getBlockSkyLight in interface org.bukkit.ChunkSnapshot
    • getBlockEmittedLight

      public int getBlockEmittedLight(int x, int y, int z)
      Specified by:
      getBlockEmittedLight in interface org.bukkit.ChunkSnapshot
    • getHighestBlockYAt

      public int getHighestBlockYAt(int x, int z)
      Specified by:
      getHighestBlockYAt in interface org.bukkit.ChunkSnapshot
    • getBiome

      public org.bukkit.block.Biome getBiome(int x, int z)
      Specified by:
      getBiome in interface org.bukkit.ChunkSnapshot
    • getBiome

      @NotNull public @NotNull org.bukkit.block.Biome getBiome(int x, int y, int z)
      Specified by:
      getBiome in interface org.bukkit.ChunkSnapshot
    • getRawBiomeTemperature

      public double getRawBiomeTemperature(int x, int z)
      Specified by:
      getRawBiomeTemperature in interface org.bukkit.ChunkSnapshot
    • getRawBiomeTemperature

      public double getRawBiomeTemperature(int x, int y, int z)
      Specified by:
      getRawBiomeTemperature in interface org.bukkit.ChunkSnapshot
    • getRawBiomeRainfall

      public double getRawBiomeRainfall(int x, int z)
    • getX

      public int getX()
      Specified by:
      getX in interface org.bukkit.ChunkSnapshot
    • getZ

      public int getZ()
      Specified by:
      getZ in interface org.bukkit.ChunkSnapshot
    • getWorldName

      public String getWorldName()
      Specified by:
      getWorldName in interface org.bukkit.ChunkSnapshot
    • getCaptureFullTime

      public long getCaptureFullTime()
      Specified by:
      getCaptureFullTime in interface org.bukkit.ChunkSnapshot
    • getRawSections

      public ChunkSection[] 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()