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(NukkitPlayerSession session,
Block block,
ItemStack withItem) |
boolean |
onPlace(NukkitPlayerSession session,
Block against,
ItemStack withItem) |
boolean |
onUse(Block block,
NukkitPlayerSession 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(NukkitPlayerSession session, Block block, ItemStack withItem)
onBreak in interface BlockBehaviorpublic boolean onPlace(NukkitPlayerSession session, Block against, ItemStack withItem)
onPlace in interface BlockBehaviorpublic boolean onUse(Block block, NukkitPlayerSession player)
onUse in interface BlockBehaviorCopyright © 2017–2019 NukkitX. All rights reserved.