public class GlowBlock extends Object implements org.bukkit.block.Block
| Constructor and Description |
|---|
GlowBlock(GlowChunk chunk,
int x,
int y,
int z)
Creates an object to refer to a block.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyPhysics(org.bukkit.Material oldType,
int newTypeId,
byte oldData,
byte newData)
Notify this block and its surrounding blocks that this block has changed type and data.
|
boolean |
breakNaturally() |
boolean |
breakNaturally(float yield)
Break the block naturally, randomly dropping only some of the drops.
|
boolean |
breakNaturally(float yield,
Collection<org.bukkit.inventory.ItemStack> drops)
Breaks this block and drops items.
|
boolean |
breakNaturally(org.bukkit.inventory.ItemStack tool) |
void |
count(int timeout)
Increments the count of recent state changes.
|
boolean |
equals(Object obj) |
org.bukkit.block.Biome |
getBiome() |
BlockEntity |
getBlockEntity() |
int |
getBlockPower() |
int |
getBlockPower(org.bukkit.block.BlockFace face) |
GlowChunk |
getChunk() |
int |
getCounter()
Returns the number of recent state changes, as defined by
count(int). |
byte |
getData() |
Collection<org.bukkit.inventory.ItemStack> |
getDrops() |
Collection<org.bukkit.inventory.ItemStack> |
getDrops(org.bukkit.inventory.ItemStack tool) |
org.bukkit.block.BlockFace |
getFace(org.bukkit.block.Block block) |
double |
getHumidity() |
byte |
getLightFromBlocks() |
byte |
getLightFromSky() |
byte |
getLightLevel() |
org.bukkit.Location |
getLocation() |
org.bukkit.Location |
getLocation(org.bukkit.Location loc) |
MaterialValueManager.ValueCollection |
getMaterialValues() |
List<org.bukkit.metadata.MetadataValue> |
getMetadata(String metadataKey) |
org.bukkit.block.PistonMoveReaction |
getPistonMoveReaction() |
GlowBlock |
getRelative(org.bukkit.block.BlockFace face) |
GlowBlock |
getRelative(org.bukkit.block.BlockFace face,
int distance) |
GlowBlock |
getRelative(int modX,
int modY,
int modZ) |
GlowBlockState |
getState() |
GlowBlockState |
getState(boolean useSnapshot) |
double |
getTemperature() |
org.bukkit.Material |
getType() |
int |
getTypeId() |
GlowWorld |
getWorld() |
int |
getX() |
int |
getY() |
int |
getZ() |
int |
hashCode() |
boolean |
hasMetadata(String metadataKey) |
boolean |
isBlockFaceIndirectlyPowered(org.bukkit.block.BlockFace face) |
boolean |
isBlockFacePowered(org.bukkit.block.BlockFace face) |
boolean |
isBlockIndirectlyPowered() |
boolean |
isBlockPowered() |
boolean |
isBurnable()
Get block material's burn ability.
|
boolean |
isEmpty() |
boolean |
isFlammable()
Get block material's flammable ability.
|
boolean |
isLiquid() |
void |
removeMetadata(String metadataKey,
org.bukkit.plugin.Plugin owningPlugin) |
void |
setBiome(org.bukkit.block.Biome bio) |
void |
setData(byte data) |
void |
setData(byte data,
boolean applyPhysics) |
void |
setMetadata(String metadataKey,
org.bukkit.metadata.MetadataValue newMetadataValue) |
void |
setType(org.bukkit.Material type) |
void |
setType(org.bukkit.Material type,
boolean applyPhysics)
Set the Material type of a block and optionally apply physics.
|
void |
setType(org.bukkit.Material type,
byte data,
boolean applyPhysics)
Set the Material type of a block with data and optionally apply physics.
|
boolean |
setTypeId(int type) |
boolean |
setTypeId(int type,
boolean applyPhysics) |
boolean |
setTypeIdAndData(int type,
byte data,
boolean applyPhysics) |
String |
toString() |
public GlowBlock(GlowChunk chunk, int x, int y, int z)
chunk - the chunkx - the X coordinatey - the Y coordinatez - the Z coordinatepublic GlowChunk getChunk()
getChunk in interface org.bukkit.block.Blockpublic org.bukkit.Location getLocation()
getLocation in interface org.bukkit.block.Blockpublic org.bukkit.Location getLocation(org.bukkit.Location loc)
getLocation in interface org.bukkit.block.Blockpublic BlockEntity getBlockEntity()
public GlowBlockState getState()
getState in interface org.bukkit.block.Blockpublic GlowBlockState getState(boolean useSnapshot)
getState in interface org.bukkit.block.Blockpublic org.bukkit.block.Biome getBiome()
getBiome in interface org.bukkit.block.Blockpublic void setBiome(org.bukkit.block.Biome bio)
setBiome in interface org.bukkit.block.Blockpublic double getTemperature()
getTemperature in interface org.bukkit.block.Blockpublic double getHumidity()
getHumidity in interface org.bukkit.block.Blockpublic org.bukkit.block.BlockFace getFace(org.bukkit.block.Block block)
getFace in interface org.bukkit.block.Blockpublic GlowBlock getRelative(int modX, int modY, int modZ)
getRelative in interface org.bukkit.block.Blockpublic GlowBlock getRelative(org.bukkit.block.BlockFace face)
getRelative in interface org.bukkit.block.Blockpublic GlowBlock getRelative(org.bukkit.block.BlockFace face, int distance)
getRelative in interface org.bukkit.block.Blockpublic org.bukkit.Material getType()
getType in interface org.bukkit.block.Blockpublic int getTypeId()
getTypeId in interface org.bukkit.block.Blockpublic void setType(org.bukkit.Material type)
setType in interface org.bukkit.block.Blockpublic void setType(org.bukkit.Material type,
boolean applyPhysics)
setType in interface org.bukkit.block.Blockpublic void setType(org.bukkit.Material type,
byte data,
boolean applyPhysics)
type - The type to set the block to.data - The raw data to set the block to.applyPhysics - notify this block and surrounding blocks to update physicspublic boolean setTypeId(int type)
setTypeId in interface org.bukkit.block.Blockpublic boolean setTypeId(int type,
boolean applyPhysics)
setTypeId in interface org.bukkit.block.Blockpublic boolean setTypeIdAndData(int type,
byte data,
boolean applyPhysics)
setTypeIdAndData in interface org.bukkit.block.Blockpublic boolean isEmpty()
isEmpty in interface org.bukkit.block.Blockpublic boolean isLiquid()
isLiquid in interface org.bukkit.block.Blockpublic boolean isFlammable()
public boolean isBurnable()
public MaterialValueManager.ValueCollection getMaterialValues()
public byte getData()
getData in interface org.bukkit.block.Blockpublic void setData(byte data)
setData in interface org.bukkit.block.Blockpublic void setData(byte data,
boolean applyPhysics)
setData in interface org.bukkit.block.Blockpublic byte getLightLevel()
getLightLevel in interface org.bukkit.block.Blockpublic byte getLightFromSky()
getLightFromSky in interface org.bukkit.block.Blockpublic byte getLightFromBlocks()
getLightFromBlocks in interface org.bukkit.block.Blockpublic boolean isBlockPowered()
isBlockPowered in interface org.bukkit.block.Blockpublic boolean isBlockIndirectlyPowered()
isBlockIndirectlyPowered in interface org.bukkit.block.Blockpublic boolean isBlockFacePowered(org.bukkit.block.BlockFace face)
isBlockFacePowered in interface org.bukkit.block.Blockpublic boolean isBlockFaceIndirectlyPowered(org.bukkit.block.BlockFace face)
isBlockFaceIndirectlyPowered in interface org.bukkit.block.Blockpublic int getBlockPower(org.bukkit.block.BlockFace face)
getBlockPower in interface org.bukkit.block.Blockpublic int getBlockPower()
getBlockPower in interface org.bukkit.block.Blockpublic org.bukkit.block.PistonMoveReaction getPistonMoveReaction()
getPistonMoveReaction in interface org.bukkit.block.Blockpublic boolean breakNaturally(float yield)
yield - The approximate portion of the drops to actually drop.public boolean breakNaturally(float yield,
Collection<org.bukkit.inventory.ItemStack> drops)
yield - the probability to drop each itemdrops - the items to potentially droppublic boolean breakNaturally()
breakNaturally in interface org.bukkit.block.Blockpublic boolean breakNaturally(org.bukkit.inventory.ItemStack tool)
breakNaturally in interface org.bukkit.block.Blockpublic Collection<org.bukkit.inventory.ItemStack> getDrops()
getDrops in interface org.bukkit.block.Blockpublic Collection<org.bukkit.inventory.ItemStack> getDrops(org.bukkit.inventory.ItemStack tool)
getDrops in interface org.bukkit.block.Blockpublic void setMetadata(String metadataKey, org.bukkit.metadata.MetadataValue newMetadataValue)
setMetadata in interface org.bukkit.metadata.Metadatablepublic List<org.bukkit.metadata.MetadataValue> getMetadata(String metadataKey)
getMetadata in interface org.bukkit.metadata.Metadatablepublic boolean hasMetadata(String metadataKey)
hasMetadata in interface org.bukkit.metadata.Metadatablepublic void removeMetadata(String metadataKey, org.bukkit.plugin.Plugin owningPlugin)
removeMetadata in interface org.bukkit.metadata.Metadatablepublic void applyPhysics(org.bukkit.Material oldType,
int newTypeId,
byte oldData,
byte newData)
oldType - the old block typenewTypeId - the new block typeoldData - the old datanewData - the new datapublic void count(int timeout)
timeout - the number of game ticks before this state change is no longer considered
recentpublic int getCounter()
count(int). Used to
implement redstone-torch burnout.public int getX()
getX in interface org.bukkit.block.Blockpublic int getY()
getY in interface org.bukkit.block.Blockpublic int getZ()
getZ in interface org.bukkit.block.Blockpublic GlowWorld getWorld()
getWorld in interface org.bukkit.block.BlockCopyright © 2021. All rights reserved.