001 package org.bukkit; 002 003 /** 004 * A delegate for handling block changes. This serves as a direct interface 005 * between generation algorithms in the server implementation and utilizing 006 * code. 007 */ 008 public interface BlockChangeDelegate { 009 010 /** 011 * Set a block type at the specified coordinates without doing all world 012 * updates and notifications. 013 * <p> 014 * It is safe to have this call World.setTypeId, but it may be slower than 015 * World.setRawTypeId. 016 * 017 * @param x X coordinate 018 * @param y Y coordinate 019 * @param z Z coordinate 020 * @param typeId New block ID 021 * @return true if the block was set successfully 022 * @deprecated Magic value 023 */ 024 @Deprecated 025 public boolean setRawTypeId(int x, int y, int z, int typeId); 026 027 /** 028 * Set a block type and data at the specified coordinates without doing 029 * all world updates and notifications. 030 * <p> 031 * It is safe to have this call World.setTypeId, but it may be slower than 032 * World.setRawTypeId. 033 * 034 * @param x X coordinate 035 * @param y Y coordinate 036 * @param z Z coordinate 037 * @param typeId New block ID 038 * @param data Block data 039 * @return true if the block was set successfully 040 * @deprecated Magic value 041 */ 042 @Deprecated 043 public boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data); 044 045 /** 046 * Set a block type at the specified coordinates. 047 * <p> 048 * This method cannot call World.setRawTypeId, a full update is needed. 049 * 050 * @param x X coordinate 051 * @param y Y coordinate 052 * @param z Z coordinate 053 * @param typeId New block ID 054 * @return true if the block was set successfully 055 * @deprecated Magic value 056 */ 057 @Deprecated 058 public boolean setTypeId(int x, int y, int z, int typeId); 059 060 /** 061 * Set a block type and data at the specified coordinates. 062 * <p> 063 * This method cannot call World.setRawTypeId, a full update is needed. 064 * 065 * @param x X coordinate 066 * @param y Y coordinate 067 * @param z Z coordinate 068 * @param typeId New block ID 069 * @param data Block data 070 * @return true if the block was set successfully 071 * @deprecated Magic value 072 */ 073 @Deprecated 074 public boolean setTypeIdAndData(int x, int y, int z, int typeId, int data); 075 076 /** 077 * Get the block type at the location. 078 * 079 * @param x X coordinate 080 * @param y Y coordinate 081 * @param z Z coordinate 082 * @return The block ID 083 * @deprecated Magic value 084 */ 085 @Deprecated 086 public int getTypeId(int x, int y, int z); 087 088 /** 089 * Gets the height of the world. 090 * 091 * @return Height of the world 092 */ 093 public int getHeight(); 094 095 /** 096 * Checks if the specified block is empty (air) or not. 097 * 098 * @param x X coordinate 099 * @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 }