Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
BlockChangeDelegate.java
1 package org.bukkit;
2 
3 /**
4  * A delegate for handling block changes. This serves as a direct interface
5  * between generation algorithms in the server implementation and utilizing
6  * code.
7  */
8 public interface BlockChangeDelegate {
9 
10  /**
11  * Set a block type at the specified coordinates without doing all world
12  * updates and notifications.
13  * <p>
14  * It is safe to have this call World.setTypeId, but it may be slower than
15  * World.setRawTypeId.
16  *
17  * @param x X coordinate
18  * @param y Y coordinate
19  * @param z Z coordinate
20  * @param typeId New block ID
21  * @return true if the block was set successfully
22  * @deprecated Magic value
23  */
24  @Deprecated
25  public boolean setRawTypeId(int x, int y, int z, int typeId);
26 
27  /**
28  * Set a block type and data at the specified coordinates without doing
29  * all world updates and notifications.
30  * <p>
31  * It is safe to have this call World.setTypeId, but it may be slower than
32  * World.setRawTypeId.
33  *
34  * @param x X coordinate
35  * @param y Y coordinate
36  * @param z Z coordinate
37  * @param typeId New block ID
38  * @param data Block data
39  * @return true if the block was set successfully
40  * @deprecated Magic value
41  */
42  @Deprecated
43  public boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data);
44 
45  /**
46  * Set a block type at the specified coordinates.
47  * <p>
48  * This method cannot call World.setRawTypeId, a full update is needed.
49  *
50  * @param x X coordinate
51  * @param y Y coordinate
52  * @param z Z coordinate
53  * @param typeId New block ID
54  * @return true if the block was set successfully
55  * @deprecated Magic value
56  */
57  @Deprecated
58  public boolean setTypeId(int x, int y, int z, int typeId);
59 
60  /**
61  * Set a block type and data at the specified coordinates.
62  * <p>
63  * This method cannot call World.setRawTypeId, a full update is needed.
64  *
65  * @param x X coordinate
66  * @param y Y coordinate
67  * @param z Z coordinate
68  * @param typeId New block ID
69  * @param data Block data
70  * @return true if the block was set successfully
71  * @deprecated Magic value
72  */
73  @Deprecated
74  public boolean setTypeIdAndData(int x, int y, int z, int typeId, int data);
75 
76  /**
77  * Get the block type at the location.
78  *
79  * @param x X coordinate
80  * @param y Y coordinate
81  * @param z Z coordinate
82  * @return The block ID
83  * @deprecated Magic value
84  */
85  @Deprecated
86  public int getTypeId(int x, int y, int z);
87 
88  /**
89  * Gets the height of the world.
90  *
91  * @return Height of the world
92  */
93  public int getHeight();
94 
95  /**
96  * Checks if the specified block is empty (air) or not.
97  *
98  * @param x X coordinate
99  * @param y Y coordinate
100  * @param z Z coordinate
101  * @return True if the block is considered empty.
102  */
103  public boolean isEmpty(int x, int y, int z);
104 }
int getTypeId(int x, int y, int z)
boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data)
boolean isEmpty(int x, int y, int z)
boolean setRawTypeId(int x, int y, int z, int typeId)
boolean setTypeIdAndData(int x, int y, int z, int typeId, int data)
boolean setTypeId(int x, int y, int z, int typeId)