public class SimpleBlockBehavior extends Object implements BlockBehavior
BlockBehavior.Result| Modifier and Type | Field and Description |
|---|---|
static SimpleBlockBehavior |
INSTANCE |
| Constructor and Description |
|---|
SimpleBlockBehavior() |
| Modifier and Type | Method and Description |
|---|---|
Collection<ItemStack> |
getDrops(Player player,
Block block,
ItemStack item) |
boolean |
isCorrectTool(ItemStack item) |
BlockBehavior.Result |
onBreak(PlayerSession session,
Block block,
ItemStack withItem) |
boolean |
onPlace(PlayerSession session,
Block against,
ItemStack withItem) |
boolean |
onUse(Block block,
PlayerSession player) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBoundingBox, getBreakTime, getMiningEfficiency, mayPlaceOn, onEntityCollision, onNeighboringBlockChange, onUpdate, overridePlacementpublic static final SimpleBlockBehavior INSTANCE
public Collection<ItemStack> getDrops(Player player, Block block, @Nullable ItemStack item)
getDrops in interface BlockBehaviorpublic boolean isCorrectTool(@Nullable ItemStack item)
isCorrectTool in interface BlockBehaviorpublic BlockBehavior.Result onBreak(PlayerSession session, Block block, ItemStack withItem)
onBreak in interface BlockBehaviorpublic boolean onPlace(PlayerSession session, Block against, ItemStack withItem)
onPlace in interface BlockBehaviorpublic boolean onUse(Block block, PlayerSession player)
onUse in interface BlockBehaviorCopyright © 2017–2020 NukkitX. All rights reserved.