public abstract class BlockFluidBase extends Block implements IFluidBlock
Block.EnumOffsetType, Block.SoundType| Modifier and Type | Field and Description |
|---|---|
protected static java.util.Map<Block,java.lang.Boolean> |
defaultDisplacements |
protected Fluid |
definedFluid
This 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 IUnlistedProperty<java.lang.Float>[] |
FLUID_RENDER_PROPS |
protected java.lang.String |
fluidName |
static PropertyInteger |
LEVEL |
static PropertyFloat[] |
LEVEL_CORNERS |
protected int |
maxScaledLight |
protected int |
quantaPerBlock |
protected float |
quantaPerBlockFloat |
protected EnumWorldBlockLayer |
renderLayer |
protected int |
temperature |
protected int |
tickRate |
BLOCK_STATE_IDS, blockHardness, blockMaterial, blockParticleGravity, blockRegistry, blockResistance, blockState, capturedDrops, captureDrops, delegate, enableStats, field_181083_K, fullBlock, harvesters, isBlockContainer, lightOpacity, lightValue, maxX, maxY, maxZ, minX, minY, minZ, needsRandomTick, RANDOM, SLIME_SOUND, slipperiness, soundTypeAnvil, soundTypeCloth, soundTypeGlass, soundTypeGrass, soundTypeGravel, soundTypeLadder, soundTypeMetal, soundTypePiston, soundTypeSand, soundTypeSnow, soundTypeStone, soundTypeWood, stepSound, translucent, useNeighborBrightness| Constructor and Description |
|---|
BlockFluidBase(Fluid fluid,
Material material) |
| 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 BlockState |
createBlockState() |
boolean |
displaceIfPossible(World world,
BlockPos pos)
Attempt to displace the block at (pos), return true if it was displaced.
|
EnumWorldBlockLayer |
getBlockLayer() |
AxisAlignedBB |
getCollisionBoundingBox(World world,
BlockPos pos,
IBlockState state) |
static int |
getDensity(IBlockAccess world,
BlockPos pos) |
IBlockState |
getExtendedState(IBlockState oldState,
IBlockAccess worldIn,
BlockPos pos)
Can return IExtendedBlockState
|
float |
getFilledPercentage(World world,
BlockPos pos)
Returns the amount of a single block is filled.
|
static double |
getFlowDirection(IBlockAccess world,
BlockPos pos) |
Vec3 |
getFlowVector(IBlockAccess world,
BlockPos pos) |
Fluid |
getFluid()
Returns the Fluid associated with this Block.
|
float |
getFluidHeightAverage(float... flow) |
float |
getFluidHeightForRender(IBlockAccess world,
BlockPos pos) |
Item |
getItemDropped(IBlockState state,
java.util.Random rand,
int fortune)
Get the Item that this Block should drop when harvested.
|
int |
getLightValue(IBlockAccess world,
BlockPos pos)
Get a light value for the block at the specified coordinates, normal ranges are between 0 and 15
|
abstract int |
getMaxRenderHeightMeta() |
int |
getMetaFromState(IBlockState state)
Convert the BlockState into the correct metadata value
|
int |
getMixedBrightnessForBlock(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) |
static int |
getTemperature(IBlockAccess world,
BlockPos pos) |
boolean |
isFullCube() |
boolean |
isOpaqueCube()
Used to determine ambient occlusion and culling when rebuilding chunks for render
|
boolean |
isPassable(IBlockAccess world,
BlockPos pos) |
Vec3 |
modifyAcceleration(World world,
BlockPos pos,
Entity entity,
Vec3 vec) |
void |
onBlockAdded(World world,
BlockPos pos,
IBlockState state) |
void |
onNeighborBlockChange(World world,
BlockPos pos,
IBlockState state,
Block neighborBlock)
Called when a neighboring block changes.
|
int |
quantityDropped(java.util.Random par1Random)
Returns the quantity of items to drop on block destruction.
|
boolean |
requiresUpdates() |
BlockFluidBase |
setDensity(int density) |
BlockFluidBase |
setMaxScaledLight(int maxScaledLight) |
BlockFluidBase |
setQuantaPerBlock(int quantaPerBlock) |
BlockFluidBase |
setRenderLayer(EnumWorldBlockLayer renderLayer) |
BlockFluidBase |
setTemperature(int temperature) |
BlockFluidBase |
setTickRate(int tickRate) |
boolean |
shouldSideBeRendered(IBlockAccess world,
BlockPos pos,
EnumFacing side) |
int |
tickRate(World world)
How many world ticks before ticking
|
addCollisionBoxesToList, addDestroyEffects, addHitEffects, addLandingEffects, beginLeavesDecay, breakBlock, canBeReplacedByLeaves, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockAt, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInLayer, canReplace, canSilkHarvest, canSilkHarvest, canSustainLeaves, canSustainPlant, captureDrops, collisionRayTrace, colorMultiplier, colorMultiplier, createStackedBlock, createTileEntity, damageDropped, disableStats, doesSideBlockRendering, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, fillWithRain, func_181623_g, getActualState, getAmbientOcclusionLightValue, getBedDirection, getBedSpawnPosition, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockById, getBlockColor, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockState, getComparatorInputOverride, getCreativeTabToDisplayOn, getDamageValue, getDefaultState, getDrops, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIdFromBlock, getItem, getLightOpacity, getLightOpacity, getLightValue, getLocalizedName, getMapColor, getMaterial, getMobilityFlag, getOffsetType, getPickBlock, getPickBlock, getPlayerRelativeBlockHardness, getRegistryName, getRenderColor, getRenderType, getSelectedBoundingBox, getStateById, getStateForEntityRender, getStateFromMeta, getStateId, getStrongPower, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, getWeakPower, harvestBlock, hasComparatorInputOverride, hasTileEntity, hasTileEntity, isAABBInsideMaterial, isAir, isAssociatedBlock, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBlockSolid, isBurning, isCollidable, isEntityInsideMaterial, isEqualTo, isFertile, isFireSource, isFlammable, isFlowerPot, isFoliage, isFullBlock, isLadder, isLeaves, isNormalCube, isNormalCube, isReplaceable, isReplaceableOreGen, isSideSolid, isToolEffective, isTranslucent, isVisuallyOpaque, isWood, onBlockActivated, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockEventReceived, onBlockExploded, onBlockHarvested, onBlockPlaced, onBlockPlacedBy, onEntityCollidedWithBlock, onEntityCollidedWithBlock, onFallenUpon, onLanded, onNeighborChange, onPlantGrow, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, randomTick, recolorBlock, registerBlocks, removedByPlayer, rotateBlock, setBedOccupied, setBlockBounds, setBlockBoundsBasedOnState, setBlockBoundsForItemRender, setBlockUnbreakable, setCreativeTab, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setRegistryName, setRegistryName, setRegistryName, setResistance, setStepSound, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, spawnAsEntity, toString, updateTickclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanDrain, drainprotected 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 IUnlistedProperty<java.lang.Float>[] FLUID_RENDER_PROPS
protected int quantaPerBlock
protected float quantaPerBlockFloat
protected int density
protected int densityDir
protected int temperature
protected int tickRate
protected EnumWorldBlockLayer renderLayer
protected int maxScaledLight
protected final java.lang.String fluidName
protected final Fluid definedFluid
protected BlockState createBlockState()
createBlockState in class Blockpublic int getMetaFromState(IBlockState state)
getMetaFromState 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(EnumWorldBlockLayer renderLayer)
public BlockFluidBase setMaxScaledLight(int maxScaledLight)
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(IBlockState state, boolean fullHit)
canCollideCheck in class Blockpublic abstract int getMaxRenderHeightMeta()
public void onBlockAdded(World world, BlockPos pos, IBlockState state)
onBlockAdded in class Blockpublic void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock)
onNeighborBlockChange in class Blockpublic boolean requiresUpdates()
requiresUpdates in class Blockpublic boolean isPassable(IBlockAccess world, BlockPos pos)
isPassable in class Blockpublic AxisAlignedBB getCollisionBoundingBox(World world, BlockPos pos, IBlockState state)
getCollisionBoundingBox in class Blockpublic Item getItemDropped(IBlockState state, java.util.Random rand, int fortune)
getItemDropped in class Blockpublic int quantityDropped(java.util.Random par1Random)
quantityDropped in class Blockpublic int tickRate(World world)
public Vec3 modifyAcceleration(World world, BlockPos pos, Entity entity, Vec3 vec)
modifyAcceleration in class Blockpublic int getLightValue(IBlockAccess world, BlockPos pos)
BlockgetLightValue in class Blockworld - The current worldpos - Block position in worldpublic boolean isOpaqueCube()
isOpaqueCube in class Blockpublic boolean isFullCube()
isFullCube in class Blockpublic int getMixedBrightnessForBlock(IBlockAccess world, BlockPos pos)
getMixedBrightnessForBlock in class Blockpublic EnumWorldBlockLayer getBlockLayer()
getBlockLayer in class Blockpublic boolean shouldSideBeRendered(IBlockAccess world, BlockPos pos, EnumFacing side)
shouldSideBeRendered in class Blockpublic IBlockState getExtendedState(IBlockState oldState, IBlockAccess worldIn, BlockPos pos)
BlockgetExtendedState in class Blockpublic static final int getDensity(IBlockAccess world, BlockPos pos)
public static final int getTemperature(IBlockAccess world, BlockPos pos)
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)
public Vec3 getFlowVector(IBlockAccess world, BlockPos pos)
public Fluid getFluid()
IFluidBlockgetFluid in interface IFluidBlockpublic float getFilledPercentage(World world, BlockPos pos)
IFluidBlockgetFilledPercentage in interface IFluidBlock