public abstract class BlockBehaviorLiquid extends BlockBehaviorTransparent
| Modifier and Type | Class and Description |
|---|---|
static class |
BlockBehaviorLiquid.FlowState |
| Modifier and Type | Field and Description |
|---|---|
int |
adjacentSources |
protected org.cloudburstmc.api.block.BlockType |
flowingId |
protected com.nukkitx.math.vector.Vector3f |
flowVector |
protected org.cloudburstmc.api.block.BlockType |
stationaryId |
| Constructor and Description |
|---|
BlockBehaviorLiquid(org.cloudburstmc.api.block.BlockType flowingId,
org.cloudburstmc.api.block.BlockType stationaryId) |
| Modifier and Type | Method and Description |
|---|---|
com.nukkitx.math.vector.Vector3f |
addVelocityToEntity(org.cloudburstmc.api.block.Block block,
com.nukkitx.math.vector.Vector3f vector,
org.cloudburstmc.api.entity.Entity entity) |
protected boolean |
canFlowInto(org.cloudburstmc.api.block.Block block) |
protected void |
checkForHarden(org.cloudburstmc.api.block.Block block) |
void |
clearCaches() |
protected void |
flowIntoBlock(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 int |
getEffectiveFlowDecay(org.cloudburstmc.api.block.BlockState state) |
protected int |
getFlowDecay(org.cloudburstmc.api.block.BlockState state) |
int |
getFlowDecayPerBlock(org.cloudburstmc.api.block.Block block) |
org.cloudburstmc.api.block.BlockType |
getFlowingType() |
com.nukkitx.math.vector.Vector3f |
getFlowVector(org.cloudburstmc.api.block.Block block) |
static float |
getFluidHeightPercent(org.cloudburstmc.api.block.BlockState state) |
float |
getMaxY(org.cloudburstmc.api.block.Block block) |
protected org.cloudburstmc.api.block.BlockState |
getState(int decay,
boolean falling) |
org.cloudburstmc.api.block.BlockType |
getStationaryId() |
boolean |
hasEntityCollision() |
boolean |
isLiquid() |
boolean |
isSameLiquid(org.cloudburstmc.api.block.BlockType other) |
static boolean |
isWater(org.cloudburstmc.api.block.BlockType type) |
protected boolean |
liquidCollide(org.cloudburstmc.api.block.Block cause,
org.cloudburstmc.api.block.BlockState result) |
void |
onEntityCollide(org.cloudburstmc.api.block.Block block,
org.cloudburstmc.api.entity.Entity entity) |
int |
onUpdate(org.cloudburstmc.api.block.Block block,
int type) |
protected org.cloudburstmc.api.util.AxisAlignedBB |
recalculateBoundingBox() |
org.cloudburstmc.api.item.ItemStack |
toItem(org.cloudburstmc.api.block.Block block) |
protected void |
triggerLavaMixEffects(org.cloudburstmc.api.level.Level level,
com.nukkitx.math.vector.Vector3f pos) |
boolean |
usesWaterLogging() |
getColorgetBreakTime, placeBlockcanBeActivated, 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, tickRateprotected final org.cloudburstmc.api.block.BlockType flowingId
protected final org.cloudburstmc.api.block.BlockType stationaryId
public int adjacentSources
protected com.nukkitx.math.vector.Vector3f flowVector
public BlockBehaviorLiquid(org.cloudburstmc.api.block.BlockType flowingId,
org.cloudburstmc.api.block.BlockType stationaryId)
protected org.cloudburstmc.api.util.AxisAlignedBB recalculateBoundingBox()
public org.cloudburstmc.api.item.ItemStack[] getDrops(org.cloudburstmc.api.block.Block block,
org.cloudburstmc.api.item.ItemStack hand)
getDrops in class org.cloudburstmc.api.block.behavior.BlockBehaviorpublic boolean hasEntityCollision()
hasEntityCollision in class org.cloudburstmc.api.block.behavior.BlockBehaviorpublic boolean isLiquid()
isLiquid in class org.cloudburstmc.api.block.behavior.BlockBehaviorpublic float getMaxY(org.cloudburstmc.api.block.Block block)
public static float getFluidHeightPercent(org.cloudburstmc.api.block.BlockState state)
protected int getFlowDecay(org.cloudburstmc.api.block.BlockState state)
protected int getEffectiveFlowDecay(org.cloudburstmc.api.block.BlockState state)
public void clearCaches()
public com.nukkitx.math.vector.Vector3f getFlowVector(org.cloudburstmc.api.block.Block block)
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)
addVelocityToEntity in class org.cloudburstmc.api.block.behavior.BlockBehaviorpublic int getFlowDecayPerBlock(org.cloudburstmc.api.block.Block block)
public int onUpdate(org.cloudburstmc.api.block.Block block,
int type)
onUpdate in class org.cloudburstmc.api.block.behavior.BlockBehaviorprotected void flowIntoBlock(org.cloudburstmc.api.block.Block block,
int newFlowDecay,
boolean falling)
protected void checkForHarden(org.cloudburstmc.api.block.Block block)
protected void triggerLavaMixEffects(org.cloudburstmc.api.level.Level level,
com.nukkitx.math.vector.Vector3f pos)
public void onEntityCollide(org.cloudburstmc.api.block.Block block,
org.cloudburstmc.api.entity.Entity entity)
onEntityCollide in class org.cloudburstmc.api.block.behavior.BlockBehaviorprotected boolean liquidCollide(org.cloudburstmc.api.block.Block cause,
org.cloudburstmc.api.block.BlockState result)
protected boolean canFlowInto(org.cloudburstmc.api.block.Block block)
protected org.cloudburstmc.api.block.BlockState getState(int decay,
boolean falling)
public org.cloudburstmc.api.item.ItemStack toItem(org.cloudburstmc.api.block.Block block)
toItem in class org.cloudburstmc.api.block.behavior.BlockBehaviorpublic boolean usesWaterLogging()
public boolean isSameLiquid(org.cloudburstmc.api.block.BlockType other)
public org.cloudburstmc.api.block.BlockType getFlowingType()
public org.cloudburstmc.api.block.BlockType getStationaryId()
public static boolean isWater(org.cloudburstmc.api.block.BlockType type)
Copyright © 2021. All rights reserved.