Class BlockBehaviorLiquid
java.lang.Object
org.cloudburstmc.api.block.behavior.BlockBehavior
org.cloudburstmc.server.block.behavior.BaseBlockBehavior
org.cloudburstmc.server.block.behavior.BlockBehaviorTransparent
org.cloudburstmc.server.block.behavior.BlockBehaviorLiquid
- Direct Known Subclasses:
BlockBehaviorLava,BlockBehaviorWater
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionintprotected org.cloudburstmc.api.block.BlockTypeprotected com.nukkitx.math.vector.Vector3fprotected org.cloudburstmc.api.block.BlockType -
Constructor Summary
ConstructorsConstructorDescriptionBlockBehaviorLiquid(org.cloudburstmc.api.block.BlockType flowingId, org.cloudburstmc.api.block.BlockType stationaryId) -
Method Summary
Modifier and TypeMethodDescriptioncom.nukkitx.math.vector.Vector3faddVelocityToEntity(org.cloudburstmc.api.block.Block block, com.nukkitx.math.vector.Vector3f vector, org.cloudburstmc.api.entity.Entity entity)protected booleancanFlowInto(org.cloudburstmc.api.block.Block block)protected voidcheckForHarden(org.cloudburstmc.api.block.Block block)voidprotected voidflowIntoBlock(org.cloudburstmc.api.block.Block block, int newFlowDecay, boolean falling)org.cloudburstmc.api.item.ItemStack[]getDrops(org.cloudburstmc.api.block.Block block, org.cloudburstmc.api.item.ItemStack hand)protected intgetEffectiveFlowDecay(org.cloudburstmc.api.block.BlockState state)protected intgetFlowDecay(org.cloudburstmc.api.block.BlockState state)intgetFlowDecayPerBlock(org.cloudburstmc.api.block.Block block)org.cloudburstmc.api.block.BlockTypecom.nukkitx.math.vector.Vector3fgetFlowVector(org.cloudburstmc.api.block.Block block)static floatgetFluidHeightPercent(org.cloudburstmc.api.block.BlockState state)floatgetMaxY(org.cloudburstmc.api.block.Block block)protected org.cloudburstmc.api.block.BlockStategetState(int decay, boolean falling)org.cloudburstmc.api.block.BlockTypebooleanbooleanisLiquid()booleanisSameLiquid(org.cloudburstmc.api.block.BlockType other)static booleanisWater(org.cloudburstmc.api.block.BlockType type)protected booleanliquidCollide(org.cloudburstmc.api.block.Block cause, org.cloudburstmc.api.block.BlockState result)voidonEntityCollide(org.cloudburstmc.api.block.Block block, org.cloudburstmc.api.entity.Entity entity)intonUpdate(org.cloudburstmc.api.block.Block block, int type)protected org.cloudburstmc.api.util.AxisAlignedBBorg.cloudburstmc.api.item.ItemStacktoItem(org.cloudburstmc.api.block.Block block)protected voidtriggerLavaMixEffects(org.cloudburstmc.api.level.Level level, com.nukkitx.math.vector.Vector3f pos)booleanMethods inherited from class org.cloudburstmc.server.block.behavior.BlockBehaviorTransparent
getColorMethods inherited from class org.cloudburstmc.server.block.behavior.BaseBlockBehavior
getBreakTime, placeBlockMethods inherited from class org.cloudburstmc.api.block.behavior.BlockBehavior
canBeActivated, canBeBrokenWith, canBeClimbed, canBeFlooded, canBePlaced, canBePushed, canBeReplaced, canHarvestWithHand, canPassThrough, canSilkTouch, canWaterlogFlowing, canWaterlogSource, checkTool, clone, collidesWithBB, collidesWithBB, getBoundingBox, getBoundingBox, getBoundingBox, getBurnAbility, getBurnChance, getCollisionBoxes, getCollisionBoxes, getComparatorInputOverride, getDescriptionId, getDropExp, getFilterLevel, getFrictionFactor, getHardness, getLightLevel, getMinimalTier, getResistance, getSaveId, getStrongPower, getToolType, getWeakPower, hasComparatorInputOverride, isBreakable, isNormalBlock, isPowerSource, isSolid, isTransparent, onActivate, onActivate, onBreak, onBreak, place, placeBlock, placeBlock, placeBlock, removeBlock, removeBlock, tickRate
-
Field Details
-
flowingId
protected final org.cloudburstmc.api.block.BlockType flowingId -
stationaryId
protected final org.cloudburstmc.api.block.BlockType stationaryId -
adjacentSources
public int adjacentSources -
flowVector
protected com.nukkitx.math.vector.Vector3f flowVector
-
-
Constructor Details
-
BlockBehaviorLiquid
public BlockBehaviorLiquid(org.cloudburstmc.api.block.BlockType flowingId, org.cloudburstmc.api.block.BlockType stationaryId)
-
-
Method Details
-
recalculateBoundingBox
protected org.cloudburstmc.api.util.AxisAlignedBB recalculateBoundingBox() -
getDrops
public org.cloudburstmc.api.item.ItemStack[] getDrops(org.cloudburstmc.api.block.Block block, org.cloudburstmc.api.item.ItemStack hand)- Overrides:
getDropsin classorg.cloudburstmc.api.block.behavior.BlockBehavior
-
hasEntityCollision
public boolean hasEntityCollision()- Overrides:
hasEntityCollisionin classorg.cloudburstmc.api.block.behavior.BlockBehavior
-
isLiquid
public boolean isLiquid()- Overrides:
isLiquidin classorg.cloudburstmc.api.block.behavior.BlockBehavior
-
getMaxY
public float getMaxY(org.cloudburstmc.api.block.Block block) -
getFluidHeightPercent
public static float getFluidHeightPercent(org.cloudburstmc.api.block.BlockState state) -
getFlowDecay
protected int getFlowDecay(org.cloudburstmc.api.block.BlockState state) -
getEffectiveFlowDecay
protected int getEffectiveFlowDecay(org.cloudburstmc.api.block.BlockState state) -
clearCaches
public void clearCaches() -
getFlowVector
public com.nukkitx.math.vector.Vector3f getFlowVector(org.cloudburstmc.api.block.Block block) -
addVelocityToEntity
public com.nukkitx.math.vector.Vector3f addVelocityToEntity(org.cloudburstmc.api.block.Block block, com.nukkitx.math.vector.Vector3f vector, org.cloudburstmc.api.entity.Entity entity)- Overrides:
addVelocityToEntityin classorg.cloudburstmc.api.block.behavior.BlockBehavior
-
getFlowDecayPerBlock
public int getFlowDecayPerBlock(org.cloudburstmc.api.block.Block block) -
onUpdate
public int onUpdate(org.cloudburstmc.api.block.Block block, int type)- Overrides:
onUpdatein classorg.cloudburstmc.api.block.behavior.BlockBehavior
-
flowIntoBlock
protected void flowIntoBlock(org.cloudburstmc.api.block.Block block, int newFlowDecay, boolean falling) -
checkForHarden
protected void checkForHarden(org.cloudburstmc.api.block.Block block) -
triggerLavaMixEffects
protected void triggerLavaMixEffects(org.cloudburstmc.api.level.Level level, com.nukkitx.math.vector.Vector3f pos) -
onEntityCollide
public void onEntityCollide(org.cloudburstmc.api.block.Block block, org.cloudburstmc.api.entity.Entity entity)- Overrides:
onEntityCollidein classorg.cloudburstmc.api.block.behavior.BlockBehavior
-
liquidCollide
protected boolean liquidCollide(org.cloudburstmc.api.block.Block cause, org.cloudburstmc.api.block.BlockState result) -
canFlowInto
protected boolean canFlowInto(org.cloudburstmc.api.block.Block block) -
getState
protected org.cloudburstmc.api.block.BlockState getState(int decay, boolean falling) -
toItem
public org.cloudburstmc.api.item.ItemStack toItem(org.cloudburstmc.api.block.Block block)- Overrides:
toItemin classorg.cloudburstmc.api.block.behavior.BlockBehavior
-
usesWaterLogging
public boolean usesWaterLogging() -
isSameLiquid
public boolean isSameLiquid(org.cloudburstmc.api.block.BlockType other) -
getFlowingType
public org.cloudburstmc.api.block.BlockType getFlowingType() -
getStationaryId
public org.cloudburstmc.api.block.BlockType getStationaryId() -
isWater
public static boolean isWater(org.cloudburstmc.api.block.BlockType type)
-