public abstract class BlockLiquid extends Block
Block.EnumOffsetTypeIForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>| Modifier and Type | Field and Description |
|---|---|
static PropertyInteger |
LEVEL |
BLOCK_STATE_IDS, blockHardness, blockMapColor, blockMaterial, blockParticleGravity, blockResistance, blockSoundType, blockState, capturedDrops, captureDrops, enableStats, FULL_BLOCK_AABB, fullBlock, harvesters, hasTileEntity, lightOpacity, lightValue, needsRandomTick, NULL_AABB, RANDOM, REGISTRY, slipperiness, translucent, useNeighborBrightnessdelegate| Modifier | Constructor and Description |
|---|---|
protected |
BlockLiquid(Material materialIn) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCollideCheck(IBlockState state,
boolean hitIfLiquid) |
boolean |
checkForMixing(World worldIn,
BlockPos pos,
IBlockState state) |
protected BlockStateContainer |
createBlockState() |
BlockFaceShape |
getBlockFaceShape(IBlockAccess worldIn,
IBlockState state,
BlockPos pos,
EnumFacing face)
Get the geometry of the queried face at the given position and state.
|
BlockRenderLayer |
getBlockLayer() |
static float |
getBlockLiquidHeight(IBlockState state,
IBlockAccess worldIn,
BlockPos pos) |
float |
getBlockLiquidHeight(World world,
BlockPos pos,
IBlockState state,
Material material)
Called when entities are swimming in the given liquid and returns the relative height (used by
EntityBoat) |
AxisAlignedBB |
getBoundingBox(IBlockState state,
IBlockAccess source,
BlockPos pos) |
AxisAlignedBB |
getCollisionBoundingBox(IBlockState blockState,
IBlockAccess worldIn,
BlockPos pos) |
protected int |
getDepth(IBlockState state) |
protected Vec3d |
getFlow(IBlockAccess worldIn,
BlockPos pos,
IBlockState state) |
static BlockDynamicLiquid |
getFlowingBlock(Material materialIn) |
Vec3d |
getFogColor(World world,
BlockPos pos,
IBlockState state,
Entity entity,
Vec3d originalColor,
float partialTicks)
Use this to change the fog color used when the entity is "inside" a material.
|
Item |
getItemDropped(IBlockState state,
java.util.Random rand,
int fortune)
Get the Item that this Block should drop when harvested.
|
static float |
getLiquidHeight(IBlockState state,
IBlockAccess worldIn,
BlockPos pos) |
static float |
getLiquidHeightPercent(int meta)
Returns the percentage of the liquid block that is air, based on the given flow decay of the liquid
|
int |
getMetaFromState(IBlockState state)
Convert the BlockState into the correct metadata value
|
int |
getPackedLightmapCoords(IBlockState state,
IBlockAccess source,
BlockPos pos) |
protected int |
getRenderedDepth(IBlockState state) |
EnumBlockRenderType |
getRenderType(IBlockState state)
The type of render function called.
|
static float |
getSlopeAngle(IBlockAccess worldIn,
BlockPos pos,
Material materialIn,
IBlockState state) |
IBlockState |
getStateFromMeta(int meta)
Convert the given metadata into a BlockState for this Block
|
static BlockStaticLiquid |
getStaticBlock(Material materialIn) |
boolean |
isFullCube(IBlockState state) |
boolean |
isOpaqueCube(IBlockState state)
Used to determine ambient occlusion and culling when rebuilding chunks for render
|
boolean |
isPassable(IBlockAccess worldIn,
BlockPos pos)
Determines if an entity can path through this block
|
Vec3d |
modifyAcceleration(World worldIn,
BlockPos pos,
Entity entityIn,
Vec3d motion) |
void |
neighborChanged(IBlockState state,
World worldIn,
BlockPos pos,
Block blockIn,
BlockPos fromPos)
Called when a neighboring block was changed and marks that this state should perform any checks during a neighbor
change.
|
void |
onBlockAdded(World worldIn,
BlockPos pos,
IBlockState state)
Called after the block is set in the Chunk data, but before the Tile Entity is set
|
int |
quantityDropped(java.util.Random random)
Returns the quantity of items to drop on block destruction.
|
void |
randomDisplayTick(IBlockState stateIn,
World worldIn,
BlockPos pos,
java.util.Random rand) |
boolean |
shouldRenderSides(IBlockAccess blockAccess,
BlockPos pos) |
boolean |
shouldSideBeRendered(IBlockState blockState,
IBlockAccess blockAccess,
BlockPos pos,
EnumFacing side) |
int |
tickRate(World worldIn)
How many world ticks before ticking
|
protected void |
triggerMixEffects(World worldIn,
BlockPos pos) |
addCollisionBoxToList, addCollisionBoxToList, addDestroyEffects, addHitEffects, addInformation, addLandingEffects, addRunningEffects, beginLeavesDecay, breakBlock, canBeConnectedTo, canBeReplacedByLeaves, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canEntitySpawn, canHarvestBlock, canPlaceBlockAt, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInLayer, canSilkHarvest, canSilkHarvest, canSpawnInBlock, canSustainLeaves, canSustainPlant, captureDrops, causesSuffocation, collisionRayTrace, createTileEntity, damageDropped, disableStats, doesSideBlockChestOpening, doesSideBlockRendering, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, eventReceived, fillWithRain, getActualState, getAiPathNodeType, getAiPathNodeType, getAmbientOcclusionLightValue, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlockById, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockState, getComparatorInputOverride, getCreativeTabToDisplayOn, getDefaultState, getDrops, getDrops, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIdFromBlock, getItem, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMapColor, getMaterial, getMobilityFlag, getOffset, getOffsetType, getPickBlock, getPlayerRelativeBlockHardness, getSelectedBoundingBox, getSilkTouchDrop, getSlipperiness, getSoundType, getSoundType, getStateAtViewpoint, getStateById, getStateForPlacement, getStateForPlacement, getStateId, getStrongPower, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, getWeakPower, harvestBlock, hasComparatorInputOverride, hasCustomBreakingProgress, hasTileEntity, hasTileEntity, isAABBInsideLiquid, isAABBInsideMaterial, isAir, isAssociatedBlock, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBurning, isCollidable, isEntityInsideMaterial, isEqualTo, isExceptBlockForAttachWithPiston, isExceptionBlockForAttaching, isFertile, isFireSource, isFlammable, isFoliage, isFullBlock, isLadder, isLeaves, isNormalCube, isNormalCube, isReplaceable, isReplaceableOreGen, isSideSolid, isStickyBlock, isToolEffective, isTopSolid, isTranslucent, isWood, observedNeighborChange, onBlockActivated, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockExploded, onBlockHarvested, onBlockPlacedBy, onEntityCollidedWithBlock, onEntityWalk, onFallenUpon, onLanded, onNeighborChange, onPlantGrow, quantityDropped, quantityDroppedWithBonus, randomTick, rayTrace, recolorBlock, registerBlocks, removedByPlayer, requiresUpdates, rotateBlock, setBedOccupied, setBlockUnbreakable, setCreativeTab, setDefaultSlipperiness, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setResistance, setSoundType, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, spawnAsEntity, toString, updateTick, withMirror, withRotationgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNamepublic static final PropertyInteger LEVEL
protected BlockLiquid(Material materialIn)
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
getBoundingBox in class Blockpublic AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos)
getCollisionBoundingBox in class Blockpublic boolean isPassable(IBlockAccess worldIn, BlockPos pos)
isPassable in class Blockpublic static float getLiquidHeightPercent(int meta)
protected int getDepth(IBlockState state)
protected int getRenderedDepth(IBlockState state)
public boolean isFullCube(IBlockState state)
isFullCube in class Blockpublic boolean isOpaqueCube(IBlockState state)
isOpaqueCube in class Blockpublic boolean canCollideCheck(IBlockState state, boolean hitIfLiquid)
canCollideCheck in class Blockpublic boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
shouldSideBeRendered in class Blockpublic EnumBlockRenderType getRenderType(IBlockState state)
getRenderType in class Blockpublic Item getItemDropped(IBlockState state, java.util.Random rand, int fortune)
getItemDropped in class Blockpublic int quantityDropped(java.util.Random random)
quantityDropped in class Blockprotected Vec3d getFlow(IBlockAccess worldIn, BlockPos pos, IBlockState state)
public Vec3d modifyAcceleration(World worldIn, BlockPos pos, Entity entityIn, Vec3d motion)
modifyAcceleration in class Blockpublic int tickRate(World worldIn)
public boolean shouldRenderSides(IBlockAccess blockAccess, BlockPos pos)
public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
onBlockAdded in class Blockpublic void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos)
neighborChanged in class Blockpublic int getPackedLightmapCoords(IBlockState state, IBlockAccess source, BlockPos pos)
getPackedLightmapCoords in class Blockpublic boolean checkForMixing(World worldIn, BlockPos pos, IBlockState state)
public BlockRenderLayer getBlockLayer()
getBlockLayer in class Blockpublic void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, java.util.Random rand)
randomDisplayTick in class Blockpublic static float getSlopeAngle(IBlockAccess worldIn, BlockPos pos, Material materialIn, IBlockState state)
public IBlockState getStateFromMeta(int meta)
getStateFromMeta in class Blockpublic int getMetaFromState(IBlockState state)
getMetaFromState in class Blockprotected BlockStateContainer createBlockState()
createBlockState in class Blockpublic static BlockDynamicLiquid getFlowingBlock(Material materialIn)
public static BlockStaticLiquid getStaticBlock(Material materialIn)
public static float getBlockLiquidHeight(IBlockState state, IBlockAccess worldIn, BlockPos pos)
public static float getLiquidHeight(IBlockState state, IBlockAccess worldIn, BlockPos pos)
public float getBlockLiquidHeight(World world, BlockPos pos, IBlockState state, Material material)
BlockEntityBoat)getBlockLiquidHeight in class Blockworld - world that is being tested.pos - block thats being tested.state - state at world/posmaterial - liquid thats being tested.public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face)
Common values are SOLID, which is the default, and UNDEFINED, which represents something that
does not fit the other descriptions and will generally cause other things not to connect to the face.
getBlockFaceShape in class Blockpublic Vec3d getFogColor(World world, BlockPos pos, IBlockState state, Entity entity, Vec3d originalColor, float partialTicks)
BlockgetFogColor in class Blockworld - The world.pos - The position at the entity viewport.state - The state at the entity viewport.entity - the entityoriginalColor - The current fog color, You are not expected to use this, Return as the default if applicable.