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