public abstract class BlockBehavior extends Object
| Constructor and Description |
|---|
BlockBehavior() |
| Modifier and Type | Method and Description |
|---|---|
com.nukkitx.math.vector.Vector3f |
addVelocityToEntity(Block block,
com.nukkitx.math.vector.Vector3f vector,
Entity entity) |
boolean |
canBeActivated(Block block) |
boolean |
canBeBrokenWith(Item item) |
boolean |
canBeClimbed() |
boolean |
canBeFlooded() |
boolean |
canBePlaced() |
boolean |
canBePushed() |
boolean |
canBeReplaced(Block block) |
boolean |
canHarvestWithHand() |
boolean |
canPassThrough() |
boolean |
canSilkTouch() |
boolean |
canWaterlogFlowing() |
boolean |
canWaterlogSource() |
BlockBehavior |
clone() |
boolean |
collidesWithBB(Block block,
AxisAlignedBB bb) |
boolean |
collidesWithBB(Block block,
AxisAlignedBB bb,
boolean collisionBB) |
AxisAlignedBB |
getBoundingBox() |
float |
getBreakTime(BlockState state,
Item item,
Player player) |
float |
getBreakTime(Item item)
Deprecated.
This function is lack of Player class and is not accurate enough, use #getBreakTime(Item, Player)
|
int |
getBurnAbility() |
int |
getBurnChance() |
AxisAlignedBB |
getCollisionBoxes(Block block) |
BlockColor |
getColor(Block block) |
int |
getComparatorInputOverride(Block block) |
String |
getDescriptionId(BlockState state) |
int |
getDropExp() |
Item[] |
getDrops(Block block,
Item hand) |
int |
getFilterLevel() |
float |
getFrictionFactor() |
float |
getHardness() |
int |
getLightLevel(Block block) |
float |
getResistance() |
String |
getSaveId() |
int |
getStrongPower(Block block,
Direction side) |
int |
getToolType() |
int |
getWeakPower(Block block,
Direction face) |
boolean |
hasComparatorInputOverride() |
boolean |
hasEntityCollision() |
boolean |
isBreakable(Item item) |
boolean |
isLiquid() |
boolean |
isNormalBlock(Block block) |
boolean |
isPowerSource(Block block) |
boolean |
isSolid() |
boolean |
isTransparent() |
boolean |
onActivate(Block block,
Item item) |
boolean |
onActivate(Block block,
Item item,
Player player) |
boolean |
onBreak(Block block,
Item item) |
boolean |
onBreak(Block block,
Item item,
Player player) |
void |
onEntityCollide(Block block,
Entity entity) |
int |
onUpdate(Block block,
int type) |
boolean |
place(Item item,
Block block,
Block target,
Direction face,
com.nukkitx.math.vector.Vector3f clickPos,
Player player) |
protected boolean |
placeBlock(Block block,
BlockState newState) |
protected boolean |
placeBlock(Block block,
BlockState newState,
boolean update) |
protected boolean |
placeBlock(Block block,
Item item) |
protected boolean |
placeBlock(Block block,
Item item,
boolean update) |
protected boolean |
removeBlock(Block block) |
protected boolean |
removeBlock(Block block,
boolean update) |
int |
tickRate() |
Item |
toItem(Block block) |
public boolean canHarvestWithHand()
public boolean isBreakable(Item item)
public int tickRate()
public int onUpdate(Block block, int type)
public int getBurnChance()
public int getBurnAbility()
public int getToolType()
public int getLightLevel(Block block)
public boolean canBePlaced()
public boolean canBeReplaced(Block block)
public boolean isTransparent()
public boolean isSolid()
public boolean isLiquid()
public int getFilterLevel()
public boolean canBeActivated(Block block)
public boolean hasEntityCollision()
public boolean canPassThrough()
public boolean canBePushed()
public boolean hasComparatorInputOverride()
public int getComparatorInputOverride(Block block)
public boolean canBeClimbed()
public BlockColor getColor(Block block)
public boolean canBeFlooded()
public boolean place(Item item, Block block, Block target, Direction face, com.nukkitx.math.vector.Vector3f clickPos, Player player)
protected boolean placeBlock(Block block, BlockState newState)
protected boolean placeBlock(Block block, BlockState newState, boolean update)
protected final boolean removeBlock(Block block)
protected final boolean removeBlock(Block block, boolean update)
public float getHardness()
public String getDescriptionId(BlockState state)
public float getResistance()
public float getFrictionFactor()
public com.nukkitx.math.vector.Vector3f addVelocityToEntity(Block block, com.nukkitx.math.vector.Vector3f vector, Entity entity)
public float getBreakTime(BlockState state, Item item, Player player)
public boolean canBeBrokenWith(Item item)
@Deprecated public float getBreakTime(Item item)
item - item usedpublic boolean collidesWithBB(Block block, AxisAlignedBB bb)
public boolean collidesWithBB(Block block, AxisAlignedBB bb, boolean collisionBB)
public AxisAlignedBB getBoundingBox()
public AxisAlignedBB getCollisionBoxes(Block block)
public String getSaveId()
public boolean isPowerSource(Block block)
public int getDropExp()
public boolean isNormalBlock(Block block)
public BlockBehavior clone()
public boolean canSilkTouch()
public boolean canWaterlogSource()
public boolean canWaterlogFlowing()
Copyright © 2020. All rights reserved.