public abstract class BlockBehaviorLiquid extends BlockBehaviorTransparent
| Modifier and Type | Field and Description |
|---|---|
int |
adjacentSources |
protected Identifier |
flowingId |
protected com.nukkitx.math.vector.Vector3f |
flowVector |
protected Identifier |
stationaryId |
| Constructor and Description |
|---|
BlockBehaviorLiquid(Identifier flowingId,
Identifier stationaryId) |
| Modifier and Type | Method and Description |
|---|---|
com.nukkitx.math.vector.Vector3f |
addVelocityToEntity(Block block,
com.nukkitx.math.vector.Vector3f vector,
Entity entity) |
boolean |
canBeFlooded() |
boolean |
canBeReplaced(Block block) |
protected boolean |
canFlowInto(Block block) |
boolean |
canHarvestWithHand() |
boolean |
canPassThrough() |
protected void |
checkForHarden(Block block) |
void |
clearCaches() |
protected void |
flowIntoBlock(Block block,
int newFlowDecay) |
AxisAlignedBB |
getBoundingBox() |
Item[] |
getDrops(Block block,
Item hand) |
protected int |
getEffectiveFlowDecay(BlockState state) |
protected int |
getFlowDecay(BlockState state) |
int |
getFlowDecayPerBlock(Block block) |
Identifier |
getFlowingId() |
com.nukkitx.math.vector.Vector3f |
getFlowVector(Block block) |
static float |
getFluidHeightPercent(BlockState state) |
float |
getHardness() |
BlockState |
getLiquidBlock(Block block) |
BlockState |
getLiquidBlock(Level level,
int x,
int y,
int z) |
float |
getMaxY(Block block) |
float |
getResistance() |
protected BlockState |
getState(int decay) |
Identifier |
getStationaryId() |
boolean |
hasEntityCollision() |
boolean |
isBreakable(Item item) |
boolean |
isLiquid() |
boolean |
isSameLiquid(Identifier other) |
boolean |
isSolid() |
protected boolean |
liquidCollide(Block cause,
BlockState result) |
void |
onEntityCollide(Block block,
Entity entity) |
int |
onUpdate(Block block,
int type) |
protected AxisAlignedBB |
recalculateBoundingBox() |
Item |
toItem(Block block) |
protected void |
triggerLavaMixEffects(Level level,
com.nukkitx.math.vector.Vector3f pos) |
boolean |
usesWaterLogging() |
getColor, isTransparentcanBeActivated, canBeBrokenWith, canBeClimbed, canBePlaced, canBePushed, canSilkTouch, canWaterlogFlowing, canWaterlogSource, clone, collidesWithBB, collidesWithBB, getBoundingBox, getBreakTime, getBreakTime, getBurnAbility, getBurnChance, getCollisionBoxes, getComparatorInputOverride, getDescriptionId, getDropExp, getFilterLevel, getFrictionFactor, getLightLevel, getSaveId, getStrongPower, getToolType, getWeakPower, hasComparatorInputOverride, isNormalBlock, isPowerSource, onActivate, onActivate, onBreak, onBreak, place, placeBlock, placeBlock, placeBlock, placeBlock, removeBlock, removeBlock, tickRateprotected final Identifier flowingId
protected final Identifier stationaryId
public int adjacentSources
protected com.nukkitx.math.vector.Vector3f flowVector
public BlockBehaviorLiquid(Identifier flowingId, Identifier stationaryId)
public boolean canBeFlooded()
canBeFlooded in class BlockBehaviorprotected AxisAlignedBB recalculateBoundingBox()
public Item[] getDrops(Block block, Item hand)
getDrops in class BlockBehaviorpublic boolean hasEntityCollision()
hasEntityCollision in class BlockBehaviorpublic boolean isBreakable(Item item)
isBreakable in class BlockBehaviorpublic boolean canBeReplaced(Block block)
canBeReplaced in class BlockBehaviorpublic boolean isSolid()
isSolid in class BlockBehaviorpublic boolean isLiquid()
isLiquid in class BlockBehaviorpublic boolean canHarvestWithHand()
canHarvestWithHand in class BlockBehaviorpublic AxisAlignedBB getBoundingBox()
getBoundingBox in class BlockBehaviorpublic float getMaxY(Block block)
public static float getFluidHeightPercent(BlockState state)
protected int getFlowDecay(BlockState state)
protected int getEffectiveFlowDecay(BlockState state)
public void clearCaches()
public com.nukkitx.math.vector.Vector3f getFlowVector(Block block)
public com.nukkitx.math.vector.Vector3f addVelocityToEntity(Block block, com.nukkitx.math.vector.Vector3f vector, Entity entity)
addVelocityToEntity in class BlockBehaviorpublic int getFlowDecayPerBlock(Block block)
public int onUpdate(Block block, int type)
onUpdate in class BlockBehaviorprotected void flowIntoBlock(Block block, int newFlowDecay)
public float getHardness()
getHardness in class BlockBehaviorpublic float getResistance()
getResistance in class BlockBehaviorprotected void checkForHarden(Block block)
protected void triggerLavaMixEffects(Level level, com.nukkitx.math.vector.Vector3f pos)
@Nonnull public BlockState getLiquidBlock(Level level, int x, int y, int z)
@Nonnull public BlockState getLiquidBlock(Block block)
public boolean canPassThrough()
canPassThrough in class BlockBehaviorpublic void onEntityCollide(Block block, Entity entity)
onEntityCollide in class BlockBehaviorprotected boolean liquidCollide(Block cause, BlockState result)
protected boolean canFlowInto(Block block)
protected BlockState getState(int decay)
public Item toItem(Block block)
toItem in class BlockBehaviorpublic boolean usesWaterLogging()
public boolean isSameLiquid(Identifier other)
public Identifier getFlowingId()
public Identifier getStationaryId()
Copyright © 2020. All rights reserved.