Package net.glowstone.block
Class GlowBlock
java.lang.Object
net.glowstone.block.GlowBlock
- All Implemented Interfaces:
 org.bukkit.block.Block,org.bukkit.metadata.Metadatable
Represents a single block in a world.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanapplyBoneMeal(@NotNull org.bukkit.block.BlockFace blockFace) voidapplyPhysics(org.bukkit.Material oldType, org.bukkit.Material newType, byte oldData, byte newData) Notify this block and its surrounding blocks that this block has changed type and data.booleanbooleanbreakNaturally(float yield) Break the block naturally, randomly dropping only some of the drops.booleanbreakNaturally(float yield, Collection<org.bukkit.inventory.ItemStack> drops) Breaks this block and drops items.booleanbreakNaturally(@NotNull org.bukkit.inventory.ItemStack tool, boolean triggerEffect) booleanbreakNaturally(org.bukkit.inventory.ItemStack tool) voidcount(int timeout) Increments the count of recent state changes.boolean@NotNull org.bukkit.block.BiomegetBiome()@NotNull org.bukkit.block.data.BlockDataintintgetBlockPower(org.bukkit.block.BlockFace face) @NotNull org.bukkit.util.BoundingBox@NotNull GlowChunkgetChunk()intReturns the number of recent state changes, as defined bycount(int).bytegetData()@org.jetbrains.annotations.NotNull floatgetDestroySpeed(@NotNull org.bukkit.inventory.ItemStack tool) @org.jetbrains.annotations.NotNull floatgetDestroySpeed(@NotNull org.bukkit.inventory.ItemStack itemStack, boolean considerEnchants) Collection<org.bukkit.inventory.ItemStack>getDrops()@NotNull Collection<org.bukkit.inventory.ItemStack>getDrops(@NotNull org.bukkit.inventory.ItemStack tool, @Nullable org.bukkit.entity.Entity entity) Collection<org.bukkit.inventory.ItemStack>getDrops(org.bukkit.inventory.ItemStack tool) org.bukkit.block.BlockFacegetFace(@NotNull org.bukkit.block.Block block) doubleintgetId()bytebytebyte@NotNull org.bukkit.Locationorg.bukkit.LocationgetLocation(org.bukkit.Location loc) List<org.bukkit.metadata.MetadataValue>getMetadata(String metadataKey) @NotNull org.bukkit.block.PistonMoveReaction@NotNull GlowBlockgetRelative(int modX, int modY, int modZ) @NotNull GlowBlockgetRelative(org.bukkit.block.BlockFace face) @NotNull GlowBlockgetRelative(org.bukkit.block.BlockFace face, int distance) @NotNull com.destroystokyo.paper.block.BlockSoundGroup@NotNull GlowBlockStategetState()@NotNull GlowBlockStategetState(boolean useSnapshot) double@NotNull String@NotNull org.bukkit.MaterialgetType()getWorld()intgetX()intgetY()intgetZ()inthashCode()booleanhasMetadata(String metadataKey) booleanisBlockFaceIndirectlyPowered(org.bukkit.block.BlockFace face) booleanisBlockFacePowered(org.bukkit.block.BlockFace face) booleanbooleanbooleanbooleanGet block material's burn ability.booleanisEmpty()booleanGet block material's flammable ability.booleanisLiquid()booleanbooleanisPreferredTool(@NotNull org.bukkit.inventory.ItemStack itemStack) booleanbooleanisSolid()booleanisValidTool(@NotNull org.bukkit.inventory.ItemStack itemStack) @Nullable org.bukkit.util.RayTraceResultrayTrace(@NotNull org.bukkit.Location start, @NotNull org.bukkit.util.Vector direction, double maxDistance, @NotNull org.bukkit.FluidCollisionMode fluidCollisionMode) voidremoveMetadata(@NotNull String metadataKey, @NotNull org.bukkit.plugin.Plugin owningPlugin) voidsetBiome(@NotNull org.bukkit.block.Biome bio) voidsetBlockData(@NotNull org.bukkit.block.data.BlockData data) voidsetBlockData(@NotNull org.bukkit.block.data.BlockData data, boolean applyPhysics) voidsetData(byte data) voidsetData(byte data, boolean applyPhysics) voidsetMetadata(String metadataKey, org.bukkit.metadata.MetadataValue newMetadataValue) voidsetType(org.bukkit.Material type) voidsetType(org.bukkit.Material type, boolean applyPhysics) Set the Material type of a block and optionally apply physics.voidsetType(org.bukkit.Material type, byte data, boolean applyPhysics) Set the Material type of a block with data and optionally apply physics.booleansetTypeId(int type) Deprecated.booleansetTypeId(int type, boolean applyPhysics) Deprecated.booleansetTypeIdAndData(int type, byte data, boolean applyPhysics) Deprecated.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bukkit.block.Block
getBlockKey 
- 
Constructor Details
- 
GlowBlock
Creates an object to refer to a block.- Parameters:
 chunk- the chunkx- the X coordinatey- the Y coordinatez- the Z coordinate
 
 - 
 - 
Method Details
- 
getChunk
- Specified by:
 getChunkin interfaceorg.bukkit.block.Block
 - 
getLocation
@NotNull public @NotNull org.bukkit.Location getLocation()- Specified by:
 getLocationin interfaceorg.bukkit.block.Block
 - 
getLocation
public org.bukkit.Location getLocation(org.bukkit.Location loc) - Specified by:
 getLocationin interfaceorg.bukkit.block.Block
 - 
getBlockEntity
 - 
getState
- Specified by:
 getStatein interfaceorg.bukkit.block.Block
 - 
getState
- Specified by:
 getStatein interfaceorg.bukkit.block.Block
 - 
getBiome
@NotNull public @NotNull org.bukkit.block.Biome getBiome()- Specified by:
 getBiomein interfaceorg.bukkit.block.Block
 - 
setBiome
public void setBiome(@NotNull @NotNull org.bukkit.block.Biome bio) - Specified by:
 setBiomein interfaceorg.bukkit.block.Block
 - 
getTemperature
public double getTemperature()- Specified by:
 getTemperaturein interfaceorg.bukkit.block.Block
 - 
getHumidity
public double getHumidity()- Specified by:
 getHumidityin interfaceorg.bukkit.block.Block
 - 
getFace
public org.bukkit.block.BlockFace getFace(@NotNull @NotNull org.bukkit.block.Block block) - Specified by:
 getFacein interfaceorg.bukkit.block.Block
 - 
getRelative
- Specified by:
 getRelativein interfaceorg.bukkit.block.Block
 - 
getRelative
- Specified by:
 getRelativein interfaceorg.bukkit.block.Block
 - 
getRelative
- Specified by:
 getRelativein interfaceorg.bukkit.block.Block
 - 
getType
@NotNull public @NotNull org.bukkit.Material getType()- Specified by:
 getTypein interfaceorg.bukkit.block.Block
 - 
getId
public int getId() - 
setType
public void setType(org.bukkit.Material type) - Specified by:
 setTypein interfaceorg.bukkit.block.Block
 - 
setType
public void setType(org.bukkit.Material type, boolean applyPhysics) Set the Material type of a block and optionally apply physics.- Specified by:
 setTypein interfaceorg.bukkit.block.Block
 - 
setType
public void setType(org.bukkit.Material type, byte data, boolean applyPhysics) Set the Material type of a block with data and optionally apply physics.- Parameters:
 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 physics
 - 
setTypeId
Deprecated. - 
setTypeId
Deprecated. - 
setTypeIdAndData
Deprecated. - 
isEmpty
public boolean isEmpty()- Specified by:
 isEmptyin interfaceorg.bukkit.block.Block
 - 
isLiquid
public boolean isLiquid()- Specified by:
 isLiquidin interfaceorg.bukkit.block.Block
 - 
isBuildable
public boolean isBuildable()- Specified by:
 isBuildablein interfaceorg.bukkit.block.Block
 - 
isFlammable
public boolean isFlammable()Get block material's flammable ability. (ability to have fire spread to it)- Returns:
 - if this block is flammable
 
 - 
isBurnable
public boolean isBurnable()Get block material's burn ability. (ability to have fire consume it)- Specified by:
 isBurnablein interfaceorg.bukkit.block.Block- Returns:
 - if this block is burnable
 
 - 
isReplaceable
public boolean isReplaceable()- Specified by:
 isReplaceablein interfaceorg.bukkit.block.Block
 - 
isSolid
public boolean isSolid()- Specified by:
 isSolidin interfaceorg.bukkit.block.Block
 - 
getMaterialValues
 - 
getData
public byte getData()- Specified by:
 getDatain interfaceorg.bukkit.block.Block
 - 
setData
public void setData(byte data)  - 
setData
public void setData(byte data, boolean applyPhysics)  - 
setBlockData
public void setBlockData(@NotNull @NotNull org.bukkit.block.data.BlockData data, boolean applyPhysics) - Specified by:
 setBlockDatain interfaceorg.bukkit.block.Block
 - 
setBlockData
public void setBlockData(@NotNull @NotNull org.bukkit.block.data.BlockData data) - Specified by:
 setBlockDatain interfaceorg.bukkit.block.Block
 - 
getBlockData
@NotNull public @NotNull org.bukkit.block.data.BlockData getBlockData()- Specified by:
 getBlockDatain interfaceorg.bukkit.block.Block
 - 
getLightLevel
public byte getLightLevel()- Specified by:
 getLightLevelin interfaceorg.bukkit.block.Block
 - 
getLightFromSky
public byte getLightFromSky()- Specified by:
 getLightFromSkyin interfaceorg.bukkit.block.Block
 - 
getLightFromBlocks
public byte getLightFromBlocks()- Specified by:
 getLightFromBlocksin interfaceorg.bukkit.block.Block
 - 
isValidTool
public boolean isValidTool(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack) - Specified by:
 isValidToolin interfaceorg.bukkit.block.Block
 - 
isBlockPowered
public boolean isBlockPowered()- Specified by:
 isBlockPoweredin interfaceorg.bukkit.block.Block
 - 
isBlockIndirectlyPowered
public boolean isBlockIndirectlyPowered()- Specified by:
 isBlockIndirectlyPoweredin interfaceorg.bukkit.block.Block
 - 
isBlockFacePowered
public boolean isBlockFacePowered(org.bukkit.block.BlockFace face) - Specified by:
 isBlockFacePoweredin interfaceorg.bukkit.block.Block
 - 
isBlockFaceIndirectlyPowered
public boolean isBlockFaceIndirectlyPowered(org.bukkit.block.BlockFace face) - Specified by:
 isBlockFaceIndirectlyPoweredin interfaceorg.bukkit.block.Block
 - 
getBlockPower
public int getBlockPower(org.bukkit.block.BlockFace face) - Specified by:
 getBlockPowerin interfaceorg.bukkit.block.Block
 - 
getBlockPower
public int getBlockPower()- Specified by:
 getBlockPowerin interfaceorg.bukkit.block.Block
 - 
getPistonMoveReaction
@NotNull public @NotNull org.bukkit.block.PistonMoveReaction getPistonMoveReaction()- Specified by:
 getPistonMoveReactionin interfaceorg.bukkit.block.Block
 - 
toString
 - 
breakNaturally
public boolean breakNaturally(float yield) Break the block naturally, randomly dropping only some of the drops.- Parameters:
 yield- The approximate portion of the drops to actually drop.- Returns:
 - true if the block was destroyed
 
 - 
breakNaturally
Breaks this block and drops items.- Parameters:
 yield- the probability to drop each itemdrops- the items to potentially drop- Returns:
 - true if broken; false if this block is already air
 
 - 
breakNaturally
public boolean breakNaturally()- Specified by:
 breakNaturallyin interfaceorg.bukkit.block.Block
 - 
breakNaturally
public boolean breakNaturally(org.bukkit.inventory.ItemStack tool) - Specified by:
 breakNaturallyin interfaceorg.bukkit.block.Block
 - 
breakNaturally
public boolean breakNaturally(@NotNull @NotNull org.bukkit.inventory.ItemStack tool, boolean triggerEffect) - Specified by:
 breakNaturallyin interfaceorg.bukkit.block.Block
 - 
applyBoneMeal
public boolean applyBoneMeal(@NotNull @NotNull org.bukkit.block.BlockFace blockFace) - Specified by:
 applyBoneMealin interfaceorg.bukkit.block.Block
 - 
getDrops
- Specified by:
 getDropsin interfaceorg.bukkit.block.Block
 - 
getDrops
- Specified by:
 getDropsin interfaceorg.bukkit.block.Block
 - 
getDrops
@NotNull public @NotNull Collection<org.bukkit.inventory.ItemStack> getDrops(@NotNull @NotNull org.bukkit.inventory.ItemStack tool, @Nullable @Nullable org.bukkit.entity.Entity entity) - Specified by:
 getDropsin interfaceorg.bukkit.block.Block
 - 
isPreferredTool
public boolean isPreferredTool(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack) - Specified by:
 isPreferredToolin interfaceorg.bukkit.block.Block
 - 
isPassable
public boolean isPassable()- Specified by:
 isPassablein interfaceorg.bukkit.block.Block
 - 
rayTrace
@Nullable public @Nullable org.bukkit.util.RayTraceResult rayTrace(@NotNull @NotNull org.bukkit.Location start, @NotNull @NotNull org.bukkit.util.Vector direction, double maxDistance, @NotNull @NotNull org.bukkit.FluidCollisionMode fluidCollisionMode) - Specified by:
 rayTracein interfaceorg.bukkit.block.Block
 - 
getBoundingBox
@NotNull public @NotNull org.bukkit.util.BoundingBox getBoundingBox()- Specified by:
 getBoundingBoxin interfaceorg.bukkit.block.Block
 - 
getSoundGroup
@NotNull public @NotNull com.destroystokyo.paper.block.BlockSoundGroup getSoundGroup()- Specified by:
 getSoundGroupin interfaceorg.bukkit.block.Block
 - 
getTranslationKey
- Specified by:
 getTranslationKeyin interfaceorg.bukkit.block.Block
 - 
getDestroySpeed
@NotNull public @org.jetbrains.annotations.NotNull float getDestroySpeed(@NotNull @NotNull org.bukkit.inventory.ItemStack tool) - Specified by:
 getDestroySpeedin interfaceorg.bukkit.block.Block
 - 
getDestroySpeed
@NotNull public @org.jetbrains.annotations.NotNull float getDestroySpeed(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack, boolean considerEnchants) - Specified by:
 getDestroySpeedin interfaceorg.bukkit.block.Block
 - 
setMetadata
- Specified by:
 setMetadatain interfaceorg.bukkit.metadata.Metadatable
 - 
getMetadata
- Specified by:
 getMetadatain interfaceorg.bukkit.metadata.Metadatable
 - 
hasMetadata
- Specified by:
 hasMetadatain interfaceorg.bukkit.metadata.Metadatable
 - 
removeMetadata
public void removeMetadata(@NotNull @NotNull String metadataKey, @NotNull @NotNull org.bukkit.plugin.Plugin owningPlugin) - Specified by:
 removeMetadatain interfaceorg.bukkit.metadata.Metadatable
 - 
applyPhysics
public void applyPhysics(org.bukkit.Material oldType, org.bukkit.Material newType, byte oldData, byte newData) Notify this block and its surrounding blocks that this block has changed type and data.- Parameters:
 oldType- the old block typenewType- the new block typeoldData- the old datanewData- the new data
 - 
count
public void count(int timeout) Increments the count of recent state changes. Used to implement redstone-torch burnout.- Parameters:
 timeout- the number of game ticks before this state change is no longer considered recent
 - 
getCounter
public int getCounter()Returns the number of recent state changes, as defined bycount(int). Used to implement redstone-torch burnout.- Returns:
 - the number of recent state changes
 
 - 
hashCode
public int hashCode() - 
equals
 - 
getX
public int getX()- Specified by:
 getXin interfaceorg.bukkit.block.Block
 - 
getY
public int getY()- Specified by:
 getYin interfaceorg.bukkit.block.Block
 - 
getZ
public int getZ()- Specified by:
 getZin interfaceorg.bukkit.block.Block
 - 
getWorld
- Specified by:
 getWorldin interfaceorg.bukkit.block.Block
 
 -