public abstract class BlockFluidBase extends Block implements IFluidBlock
| Modifier and Type | Class and Description | 
|---|---|
| private static class  | BlockFluidBase.UnlistedPropertyBool | 
Block.EnumOffsetTypeIForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>| Modifier and Type | Field and Description | 
|---|---|
| protected static java.util.Map<Block,java.lang.Boolean> | defaultDisplacements | 
| protected Fluid | definedFluidThis is the fluid used in the constructor. | 
| protected int | density | 
| protected int | densityDir | 
| protected java.util.Map<Block,java.lang.Boolean> | displacements | 
| static PropertyFloat | FLOW_DIRECTION | 
| static com.google.common.collect.ImmutableList<IUnlistedProperty<?>> | FLUID_RENDER_PROPS | 
| protected java.lang.String | fluidName | 
| static PropertyInteger | LEVEL | 
| static PropertyFloat[] | LEVEL_CORNERS | 
| protected int | maxScaledLight | 
| protected float | quantaFraction | 
| protected int | quantaPerBlock | 
| protected float | quantaPerBlockFloat | 
| protected BlockRenderLayer | renderLayer | 
| static BlockFluidBase.UnlistedPropertyBool[] | SIDE_OVERLAYS | 
| protected int | temperature | 
| protected int | tickRate | 
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| Constructor and Description | 
|---|
| BlockFluidBase(Fluid fluid,
              Material material) | 
| BlockFluidBase(Fluid fluid,
              Material material,
              MapColor mapColor) | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract boolean | canCollideCheck(IBlockState state,
               boolean fullHit) | 
| boolean | canDisplace(IBlockAccess world,
           BlockPos pos)Returns true if the block at (pos) is displaceable. | 
| protected boolean | causesDownwardCurrent(IBlockAccess world,
                     BlockPos pos,
                     EnumFacing face) | 
| protected BlockStateContainer | createBlockState() | 
| boolean | displaceIfPossible(World world,
                  BlockPos pos)Attempt to displace the block at (pos), return true if it was displaced. | 
| BlockFaceShape | getBlockFaceShape(IBlockAccess worldIn,
                 IBlockState state,
                 BlockPos pos,
                 EnumFacing face) | 
| BlockRenderLayer | getBlockLayer() | 
| 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 | getCollisionBoundingBox(IBlockState blockState,
                       IBlockAccess worldIn,
                       BlockPos pos) | 
| int | getDensity() | 
| static int | getDensity(IBlockAccess world,
          BlockPos pos) | 
| (package private) int | getEffectiveQuanta(IBlockAccess world,
                  BlockPos pos) | 
| IBlockState | getExtendedState(IBlockState oldState,
                IBlockAccess world,
                BlockPos pos)Can return IExtendedBlockState | 
| float | getFilledPercentage(IBlockAccess world,
                   BlockPos pos) | 
| float | getFilledPercentage(World world,
                   BlockPos pos)Returns the amount of a single block is filled. | 
| private int | getFlowDecay(IBlockAccess world,
            BlockPos pos) | 
| static double | getFlowDirection(IBlockAccess world,
                BlockPos pos) | 
| Vec3d | getFlowVector(IBlockAccess world,
             BlockPos pos) | 
| Fluid | getFluid()Returns the Fluid associated with this Block. | 
| private static Fluid | getFluid(IBlockState state) | 
| float | getFluidHeightAverage(float... flow) | 
| float | getFluidHeightForRender(IBlockAccess world,
                       BlockPos pos,
                       IBlockState up) | 
| 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) | 
| int | getLightValue(IBlockState state,
             IBlockAccess world,
             BlockPos pos)Get a light value for this block, taking into account the given state and coordinates, normal ranges are between 0 and 15 | 
| abstract int | getMaxRenderHeightMeta() | 
| int | getMetaFromState(IBlockState state) | 
| int | getPackedLightmapCoords(IBlockState state,
                       IBlockAccess world,
                       BlockPos pos) | 
| float | getQuantaPercentage(IBlockAccess world,
                   BlockPos pos) | 
| abstract int | getQuantaValue(IBlockAccess world,
              BlockPos pos) | 
| int | getQuantaValueAbove(IBlockAccess world,
                   BlockPos pos,
                   int aboveThis) | 
| int | getQuantaValueBelow(IBlockAccess world,
                   BlockPos pos,
                   int belowThis) | 
| IBlockState | getStateAtViewpoint(IBlockState state,
                   IBlockAccess world,
                   BlockPos pos,
                   Vec3d viewpoint)Used to determine the state 'viewed' by an entity (see
  ActiveRenderInfo.getBlockStateAtEntityViewpoint(World, Entity, float)). | 
| IBlockState | getStateFromMeta(int meta)Deprecated.  | 
| int | getTemperature() | 
| static int | getTemperature(IBlockAccess world,
              BlockPos pos) | 
| (package private) boolean | hasVerticalFlow(IBlockAccess world,
               BlockPos pos) | 
| private static boolean | isFluid(IBlockState blockstate) | 
| boolean | isFullCube(IBlockState state) | 
| boolean | isOpaqueCube(IBlockState state) | 
| boolean | isPassable(IBlockAccess world,
          BlockPos pos) | 
| private boolean | isWithinFluid(IBlockAccess world,
             BlockPos pos,
             Vec3d vec) | 
| Vec3d | modifyAcceleration(World world,
                  BlockPos pos,
                  Entity entity,
                  Vec3d vec) | 
| void | neighborChanged(IBlockState state,
               World world,
               BlockPos pos,
               Block neighborBlock,
               BlockPos neighbourPos) | 
| void | onBlockAdded(World world,
            BlockPos pos,
            IBlockState state) | 
| int | quantityDropped(java.util.Random par1Random) | 
| boolean | requiresUpdates() | 
| BlockFluidBase | setDensity(int density) | 
| BlockFluidBase | setMaxScaledLight(int maxScaledLight) | 
| BlockFluidBase | setQuantaPerBlock(int quantaPerBlock) | 
| BlockFluidBase | setRenderLayer(BlockRenderLayer renderLayer) | 
| BlockFluidBase | setTemperature(int temperature) | 
| BlockFluidBase | setTickRate(int tickRate) | 
| boolean | shouldSideBeRendered(IBlockState state,
                    IBlockAccess world,
                    BlockPos pos,
                    EnumFacing side) | 
| int | tickRate(World world) | 
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, getBoundingBox, getComparatorInputOverride, getCreativeTabToDisplayOn, getDefaultState, getDrops, getDrops, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIdFromBlock, getItem, getLightOpacity, getLightOpacity, getLightValue, getLocalizedName, getMapColor, getMaterial, getMobilityFlag, getOffset, getOffsetType, getPickBlock, getPlayerRelativeBlockHardness, getRenderType, getSelectedBoundingBox, getSilkTouchDrop, getSlipperiness, getSoundType, getSoundType, 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, randomDisplayTick, randomTick, rayTrace, recolorBlock, registerBlocks, removedByPlayer, rotateBlock, setBedOccupied, setBlockUnbreakable, setCreativeTab, setDefaultSlipperiness, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setResistance, setSoundType, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, spawnAsEntity, toString, updateTick, withMirror, withRotationgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanDrain, drain, placeprotected static final java.util.Map<Block,java.lang.Boolean> defaultDisplacements
protected java.util.Map<Block,java.lang.Boolean> displacements
public static final PropertyInteger LEVEL
public static final PropertyFloat[] LEVEL_CORNERS
public static final PropertyFloat FLOW_DIRECTION
public static final BlockFluidBase.UnlistedPropertyBool[] SIDE_OVERLAYS
public static final com.google.common.collect.ImmutableList<IUnlistedProperty<?>> FLUID_RENDER_PROPS
protected int quantaPerBlock
protected float quantaPerBlockFloat
protected float quantaFraction
protected int density
protected int densityDir
protected int temperature
protected int tickRate
protected BlockRenderLayer renderLayer
protected int maxScaledLight
protected final java.lang.String fluidName
protected final Fluid definedFluid
@Nonnull protected BlockStateContainer createBlockState()
createBlockState in class Blockpublic int getMetaFromState(@Nonnull
                            IBlockState state)
getMetaFromState in class Block@Deprecated @Nonnull public IBlockState getStateFromMeta(int meta)
getStateFromMeta in class Blockpublic BlockFluidBase setQuantaPerBlock(int quantaPerBlock)
public BlockFluidBase setDensity(int density)
public BlockFluidBase setTemperature(int temperature)
public BlockFluidBase setTickRate(int tickRate)
public BlockFluidBase setRenderLayer(BlockRenderLayer renderLayer)
public BlockFluidBase setMaxScaledLight(int maxScaledLight)
public final int getDensity()
public final int getTemperature()
public boolean canDisplace(IBlockAccess world, BlockPos pos)
public boolean displaceIfPossible(World world, BlockPos pos)
public abstract int getQuantaValue(IBlockAccess world, BlockPos pos)
public abstract boolean canCollideCheck(@Nonnull
                                        IBlockState state,
                                        boolean fullHit)
canCollideCheck in class Blockpublic abstract int getMaxRenderHeightMeta()
public void onBlockAdded(@Nonnull
                         World world,
                         @Nonnull
                         BlockPos pos,
                         @Nonnull
                         IBlockState state)
onBlockAdded in class Blockpublic void neighborChanged(@Nonnull
                            IBlockState state,
                            @Nonnull
                            World world,
                            @Nonnull
                            BlockPos pos,
                            @Nonnull
                            Block neighborBlock,
                            @Nonnull
                            BlockPos neighbourPos)
neighborChanged in class Blockpublic boolean requiresUpdates()
requiresUpdates in class Blockpublic boolean isPassable(@Nonnull
                          IBlockAccess world,
                          @Nonnull
                          BlockPos pos)
isPassable in class Block@Nonnull public Item getItemDropped(@Nonnull IBlockState state, @Nonnull java.util.Random rand, int fortune)
getItemDropped in class Blockpublic int quantityDropped(@Nonnull
                           java.util.Random par1Random)
quantityDropped in class Block@Nonnull public Vec3d modifyAcceleration(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull Entity entity, @Nonnull Vec3d vec)
modifyAcceleration in class Blockpublic int getLightValue(@Nonnull
                         IBlockState state,
                         @Nonnull
                         IBlockAccess world,
                         @Nonnull
                         BlockPos pos)
BlockgetLightValue in class Blockstate - Block stateworld - The current worldpos - Block position in worldpublic boolean isOpaqueCube(@Nonnull
                            IBlockState state)
isOpaqueCube in class Blockpublic boolean isFullCube(@Nonnull
                          IBlockState state)
isFullCube in class Blockpublic int getPackedLightmapCoords(@Nonnull
                                   IBlockState state,
                                   @Nonnull
                                   IBlockAccess world,
                                   @Nonnull
                                   BlockPos pos)
getPackedLightmapCoords in class Block@Nonnull public BlockRenderLayer getBlockLayer()
getBlockLayer in class Block@Nonnull public BlockFaceShape getBlockFaceShape(@Nonnull IBlockAccess worldIn, @Nonnull IBlockState state, @Nonnull BlockPos pos, @Nonnull EnumFacing face)
getBlockFaceShape in class Blockpublic boolean shouldSideBeRendered(@Nonnull
                                    IBlockState state,
                                    @Nonnull
                                    IBlockAccess world,
                                    @Nonnull
                                    BlockPos pos,
                                    @Nonnull
                                    EnumFacing side)
shouldSideBeRendered in class Blockprivate static boolean isFluid(@Nonnull
                               IBlockState blockstate)
@Nonnull public IBlockState getExtendedState(@Nonnull IBlockState oldState, @Nonnull IBlockAccess world, @Nonnull BlockPos pos)
BlockgetExtendedState in class Blockpublic static int getDensity(IBlockAccess world, BlockPos pos)
public static int getTemperature(IBlockAccess world, BlockPos pos)
@Nullable private static Fluid getFluid(IBlockState state)
public static double getFlowDirection(IBlockAccess world, BlockPos pos)
public final int getQuantaValueBelow(IBlockAccess world, BlockPos pos, int belowThis)
public final int getQuantaValueAbove(IBlockAccess world, BlockPos pos, int aboveThis)
public final float getQuantaPercentage(IBlockAccess world, BlockPos pos)
public float getFluidHeightAverage(float... flow)
public float getFluidHeightForRender(IBlockAccess world, BlockPos pos, @Nonnull IBlockState up)
public Vec3d getFlowVector(IBlockAccess world, BlockPos pos)
private int getFlowDecay(IBlockAccess world, BlockPos pos)
final int getEffectiveQuanta(IBlockAccess world, BlockPos pos)
final boolean hasVerticalFlow(IBlockAccess world, BlockPos pos)
protected boolean causesDownwardCurrent(IBlockAccess world, BlockPos pos, EnumFacing face)
public Fluid getFluid()
IFluidBlockgetFluid in interface IFluidBlockpublic float getFilledPercentage(World world, BlockPos pos)
IFluidBlockgetFilledPercentage in interface IFluidBlockpublic float getFilledPercentage(IBlockAccess world, BlockPos pos)
public AxisAlignedBB getCollisionBoundingBox(@Nonnull IBlockState blockState, @Nonnull IBlockAccess worldIn, @Nonnull BlockPos pos)
getCollisionBoundingBox 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.public IBlockState getStateAtViewpoint(IBlockState state, IBlockAccess world, BlockPos pos, Vec3d viewpoint)
BlockActiveRenderInfo.getBlockStateAtEntityViewpoint(World, Entity, float)).
 Can be used by fluid blocks to determine if the viewpoint is within the fluid or not.getStateAtViewpoint in class Blockstate - the stateworld - the worldpos - the positionviewpoint - the viewpointprivate boolean isWithinFluid(IBlockAccess world, BlockPos pos, Vec3d vec)
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.