public interface BlockBehavior extends ItemBehavior
| Modifier and Type | Interface and Description |
|---|---|
static class |
BlockBehavior.Result |
| Modifier and Type | Method and Description |
|---|---|
default BoundingBox |
getBoundingBox(Block block) |
default float |
getBreakTime(Player player,
Block block,
ItemStack item) |
Collection<ItemStack> |
getDrops(Player player,
Block block,
ItemStack item) |
default float |
getMiningEfficiency(ItemStack item) |
boolean |
isCorrectTool(ItemStack item) |
default boolean |
mayPlaceOn(Block block,
Block toPlace) |
BlockBehavior.Result |
onBreak(PlayerSession session,
Block block,
ItemStack withItem) |
default boolean |
onEntityCollision(BaseEntity entity) |
default boolean |
onNeighboringBlockChange(Block block,
Block neighbour) |
boolean |
onPlace(PlayerSession session,
Block against,
ItemStack withItem) |
default boolean |
onUpdate(Block block) |
boolean |
onUse(Block block,
PlayerSession player) |
default Optional<BlockState> |
overridePlacement(com.flowpowered.math.vector.Vector3i against,
BlockFace face,
ItemStack withItem) |
default BoundingBox getBoundingBox(Block block)
default boolean onUpdate(Block block)
default boolean onEntityCollision(BaseEntity entity)
default boolean onNeighboringBlockChange(Block block, Block neighbour)
block - blockneighbour - neighboring blockBlockBehavior.Result onBreak(PlayerSession session, Block block, ItemStack withItem)
boolean onPlace(PlayerSession session, Block against, ItemStack withItem)
boolean onUse(Block block, PlayerSession player)
default Optional<BlockState> overridePlacement(com.flowpowered.math.vector.Vector3i against, BlockFace face, ItemStack withItem)
Copyright © 2017–2019 NukkitX. All rights reserved.