Java Code Examples for org.bukkit.block.Block#getLightLevel()
The following examples show how to use
org.bukkit.block.Block#getLightLevel() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CraftBlockState.java From Thermos with GNU General Public License v3.0 | 6 votes |
public CraftBlockState(final Block block) { this.world = (CraftWorld) block.getWorld(); this.x = block.getX(); this.y = block.getY(); this.z = block.getZ(); this.type = block.getTypeId(); this.light = block.getLightLevel(); this.chunk = (CraftChunk) block.getChunk(); this.flag = 3; // Cauldron start - save TE data TileEntity te = world.getHandle().getTileEntity(x, y, z); if (te != null) { nbt = new NBTTagCompound(); te.writeToNBT(nbt); } else nbt = null; // Cauldron end createData(block.getData()); }
Example 2
Source File: FarmChunk.java From civcraft with GNU General Public License v2.0 | 4 votes |
public int getLightLevel(Block block) { return block.getLightLevel(); }