Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
ChunkSnapshot.java
1 package org.bukkit;
2 
3 import org.bukkit.block.Biome;
4 
5 /**
6  * Represents a static, thread-safe snapshot of chunk of blocks.
7  * <p>
8  * Purpose is to allow clean, efficient copy of a chunk data to be made, and
9  * then handed off for processing in another thread (e.g. map rendering)
10  */
11 public interface ChunkSnapshot {
12 
13  /**
14  * Gets the X-coordinate of this chunk
15  *
16  * @return X-coordinate
17  */
18  int getX();
19 
20  /**
21  * Gets the Z-coordinate of this chunk
22  *
23  * @return Z-coordinate
24  */
25  int getZ();
26 
27  /**
28  * Gets name of the world containing this chunk
29  *
30  * @return Parent World Name
31  */
32  String getWorldName();
33 
34  /**
35  * Get block type for block at corresponding coordinate in the chunk
36  *
37  * @param x 0-15
38  * @param y 0-127
39  * @param z 0-15
40  * @return 0-255
41  * @deprecated Magic value
42  */
43  @Deprecated
44  int getBlockTypeId(int x, int y, int z);
45 
46  /**
47  * Get block data for block at corresponding coordinate in the chunk
48  *
49  * @param x 0-15
50  * @param y 0-127
51  * @param z 0-15
52  * @return 0-15
53  * @deprecated Magic value
54  */
55  @Deprecated
56  int getBlockData(int x, int y, int z);
57 
58  /**
59  * Get sky light level for block at corresponding coordinate in the chunk
60  *
61  * @param x 0-15
62  * @param y 0-127
63  * @param z 0-15
64  * @return 0-15
65  */
66  int getBlockSkyLight(int x, int y, int z);
67 
68  /**
69  * Get light level emitted by block at corresponding coordinate in the
70  * chunk
71  *
72  * @param x 0-15
73  * @param y 0-127
74  * @param z 0-15
75  * @return 0-15
76  */
77  int getBlockEmittedLight(int x, int y, int z);
78 
79  /**
80  * Gets the highest non-air coordinate at the given coordinates
81  *
82  * @param x X-coordinate of the blocks
83  * @param z Z-coordinate of the blocks
84  * @return Y-coordinate of the highest non-air block
85  */
86  int getHighestBlockYAt(int x, int z);
87 
88  /**
89  * Get biome at given coordinates
90  *
91  * @param x X-coordinate
92  * @param z Z-coordinate
93  * @return Biome at given coordinate
94  */
95  Biome getBiome(int x, int z);
96 
97  /**
98  * Get raw biome temperature (0.0-1.0) at given coordinate
99  *
100  * @param x X-coordinate
101  * @param z Z-coordinate
102  * @return temperature at given coordinate
103  */
104  double getRawBiomeTemperature(int x, int z);
105 
106  /**
107  * Get raw biome rainfall (0.0-1.0) at given coordinate
108  *
109  * @param x X-coordinate
110  * @param z Z-coordinate
111  * @return rainfall at given coordinate
112  */
113  double getRawBiomeRainfall(int x, int z);
114 
115  /**
116  * Get world full time when chunk snapshot was captured
117  *
118  * @return time in ticks
119  */
120  long getCaptureFullTime();
121 
122  /**
123  * Test if section is empty
124  *
125  * @param sy - section Y coordinate (block Y / 16)
126  * @return true if empty, false if not
127  */
128  boolean isSectionEmpty(int sy);
129 }
double getRawBiomeRainfall(int x, int z)
int getBlockTypeId(int x, int y, int z)
double getRawBiomeTemperature(int x, int z)
int getHighestBlockYAt(int x, int z)
boolean isSectionEmpty(int sy)
Biome getBiome(int x, int z)
int getBlockData(int x, int y, int z)
int getBlockSkyLight(int x, int y, int z)
int getBlockEmittedLight(int x, int y, int z)