public class BlockContainer extends BlockType
ItemType.Context
ADJACENT, drops, placeSound, SIDES
Constructor and Description |
---|
BlockContainer() |
Modifier and Type | Method and Description |
---|---|
boolean |
blockInteract(GlowPlayer player,
GlowBlock block,
org.bukkit.block.BlockFace face,
org.bukkit.util.Vector clickedLoc)
Called when a player attempts to interact with (right-click) a block of this type already in
the world.
|
protected Collection<org.bukkit.inventory.ItemStack> |
getBlockDrops(GlowBlock block)
Returns the drops for block itself, WITHOUT it's contents.
|
Collection<org.bukkit.inventory.ItemStack> |
getContentDrops(GlowBlock block)
Returns the contents of a container.
|
Collection<org.bukkit.inventory.ItemStack> |
getDrops(GlowBlock block,
org.bukkit.inventory.ItemStack tool)
Get the items that will be dropped by digging the block.
|
Collection<org.bukkit.inventory.ItemStack> |
getMinedDrops(GlowBlock block)
Get the items that would be dropped if the block was successfully mined.
|
protected MaterialMatcher |
getNeededMiningTool(GlowBlock block) |
afterDestroy, afterPlace, blockDestroy, canAbsorb, canOverride, canPlaceAt, canTickRandomly, createBlockEntity, getOppositeBlockFace, getPlaceAs, getPlaceSound, getPulseTickSpeed, isPulseOnce, leftClickBlock, onBlockChanged, onEntityStep, onNearBlockChanged, onRedstoneUpdate, placeBlock, receivePulse, requestPulse, rightClickBlock, setDrops, setPlaceSound, updateBlock, updatePhysics, updatePhysicsAfterEvent, warnMaterialData
getContext, getId, getMaterial, getMaxStackSize, rightClickAir, setId, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toString
public boolean blockInteract(GlowPlayer player, GlowBlock block, org.bukkit.block.BlockFace face, org.bukkit.util.Vector clickedLoc)
BlockType
blockInteract
in class BlockType
player
- the player interactingblock
- the block interacted withface
- the clicked faceclickedLoc
- where in the block the click occurredpublic Collection<org.bukkit.inventory.ItemStack> getDrops(GlowBlock block, org.bukkit.inventory.ItemStack tool)
BlockType
public Collection<org.bukkit.inventory.ItemStack> getMinedDrops(GlowBlock block)
BlockType
getMinedDrops
in class BlockType
block
- The block.public Collection<org.bukkit.inventory.ItemStack> getContentDrops(GlowBlock block)
block
- a container blockprotected Collection<org.bukkit.inventory.ItemStack> getBlockDrops(GlowBlock block)
block
- The block the drops should be calculated forprotected MaterialMatcher getNeededMiningTool(GlowBlock block)
Copyright © 2021. All rights reserved.