Package net.minecraft.block
Class AbstractFluidBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.AbstractFluidBlock
- Direct Known Subclasses:
FlowingFluidBlock,FluidBlock
public abstract class AbstractFluidBlock extends Block
- Mappings:
Namespace Name official ahvintermediary net/minecraft/class_243named net/minecraft/block/AbstractFluidBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType, Block.Sound -
Field Summary
Fields Modifier and Type Field Description static IntPropertyLEVELFields inherited from class net.minecraft.block.Block
ANVIL, BLOCK_STATES, blockEntity, boundingBoxMaxX, boundingBoxMaxY, boundingBoxMaxZ, boundingBoxMinX, boundingBoxMinY, boundingBoxMinZ, CLOTH, fullBlock, GLASS, GRASS, GRAVEL, LADDER, lightLevel, material, materialColor, opacity, ORE, particleGravity, RAIL, randomTicks, REGISTRY, resistance, SAND, SLIME, slipperiness, SNOW, sound, stateManager, stats, STONE, strength, transluscent, useNeighbourLight, WOOD -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFluidBlock(Material material) -
Method Summary
Modifier and Type Method Description protected StateManagerappendProperties()Returns a new state manager with a property array.booleanblocksMovement(WorldView view, BlockPos pos)booleancanCollide(BlockState state, boolean bl)Returns whether entities can collide with the blockintgetBlockColor(WorldView view, BlockPos pos, int id)Returns the current block's colorintgetBlockType()intgetBrightness(WorldView worldView, BlockPos pos)BoxgetCollisionBox(World world, BlockPos pos, BlockState state)Returns a box by adding the block's current location and the block's corresponding value in its Bounding BoxintgetData(BlockState state)Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not workstatic doublegetDirection(WorldView world, BlockPos pos, Material material)intgetDropCount(Random rand)Returns the amount of items the block should drop on breaking without bonus rolls.ItemgetDropItem(BlockState blockState, Random random, int state)Returns the item that must be dropped when the block is brokenstatic FlowingFluidBlockgetFlowingFluidByMaterial(Material material)protected intgetFlowReduction(WorldView world, BlockPos pos)static FluidBlockgetFluidByMaterial(Material material)protected intgetFluidLevel(WorldView world, BlockPos pos)protected Vec3dgetFluidVec(WorldView world, BlockPos pos)static floatgetHeightPercent(int height)RenderLayergetRenderLayerType()Returns the appropriate RenderLayer for a block.intgetTickRate(World world)Returns the block's tick rate.booleanhasCollision(WorldView worldView, BlockPos pos, Direction direction)booleanhasTransperancy()booleanisSideInvisible(WorldView view, BlockPos pos, Direction facing)Returns whether the current block has connected sides, i.e its side faces are invisible when covered by other blocks.voidneighborUpdate(World world, BlockPos pos, BlockState state, Block block)Runs when its adjacent blocks are updated.voidonCreation(World world, BlockPos pos, BlockState state)Runs when the block is placed (by a player or enderman).Vec3donEntityCollision(World world, BlockPos pos, Entity entity, Vec3d velocity)protected voidplayExtinguishEffects(World world, BlockPos pos)voidrandomDisplayTick(World world, BlockPos pos, BlockState state, Random rand)Runs every random display Tick.booleanrenderAsNormalBlock()Returns whether the block can be rendered as a normal blockbooleanshouldDisableCullingSides(WorldView world, BlockPos pos)BlockStatestateFromData(int data)Returns a blockstate of the current block from it's idbooleanupdate(World world, BlockPos pos, BlockState state)Methods inherited from class net.minecraft.block.Block
appendCollisionBoxes, appendItemStacks, areBlocksEqual, calcBlockBreakingData, canBePlacedAdjacent, canBePlacedAtPos, canBeReplaced, canMobSpawnInside, createStackFromBlock, disableStats, dropAsItem, dropExperience, emitsRedstonePower, get, getAmbientOcclusionLightLevel, getBlastResistance, getBlendColor, getBlockFromItem, getBlockState, getBonusDrops, getByBlockState, getById, getColor, getColor, getComparatorOutput, getDefaultState, getIdByBlock, getItemGroup, getLightLevel, getMaterial, getMaterialColor, getMaxX, getMaxY, getMaxZ, getMeta, getMeta, getMinX, getMinY, getMinZ, getOffsetType, getOpacity, getPickItem, getPistonInteractionType, getSelectionBox, getStateFromData, getStateFromRawId, getStateManager, getStrength, getStrongRedstonePower, getTranslatedName, getTranslationKey, getWeakRedstonePower, harvest, hasBlockEntity, hasCollision, hasComparatorOutput, hasStats, isEqualTo, isFire, isFlowerPot, isFullBlock, isFullCube, isLeafBlock, isNormalBlock, isReplaceable, isTransluscent, method_655, method_696, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onBreakByPlayer, onBreaking, onDestroyedByExplosion, onEntityCollision, onEvent, onLandedUpon, onPlaced, onSteppedOn, onUpdateTick, onUse, rainTick, randomDropAsItem, requiresSilkTouch, scheduledTick, setBlockItemBounds, setBoundingBox, setBoundingBox, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setSound, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, ticksRandomly, toString, usesNeighbourLight
-
Field Details
-
LEVEL
- Mappings:
Namespace Name Mixin selector official bLahv;b:Lamn;intermediary field_1031Lnet/minecraft/class_243;field_1031:Lnet/minecraft/class_391;named LEVELLnet/minecraft/block/AbstractFluidBlock;LEVEL:Lnet/minecraft/state/property/IntProperty;
-
-
Constructor Details
-
AbstractFluidBlock
- Parameters:
material- The block's material- Mappings:
Namespace Name Mixin selector official <init>Lafh;<init>(Larm;)Vintermediary <init>Lnet/minecraft/class_160;<init>(Lnet/minecraft/class_591;)Vnamed <init>Lnet/minecraft/block/Block;<init>(Lnet/minecraft/block/Material;)V
-
-
Method Details
-
blocksMovement
- Overrides:
blocksMovementin classBlock- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladq;Lcj;)Zintermediary method_692Lnet/minecraft/class_160;method_692(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Znamed blocksMovementLnet/minecraft/block/Block;blocksMovement(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
-
getBlockColor
Returns the current block's color- Overrides:
getBlockColorin classBlock- Parameters:
view- WorldView instancepos- The block's positionid- Id- Returns:
- Block color
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;I)Iintermediary method_666Lnet/minecraft/class_160;method_666(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;I)Inamed getBlockColorLnet/minecraft/block/Block;getBlockColor(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;I)I
-
getHeightPercent
public static float getHeightPercent(int height)- Mappings:
Namespace Name Mixin selector official bLahv;b(I)Fintermediary method_904Lnet/minecraft/class_243;method_904(I)Fnamed getHeightPercentLnet/minecraft/block/AbstractFluidBlock;getHeightPercent(I)F
-
getFluidLevel
- Mappings:
Namespace Name Mixin selector official eLahv;e(Ladq;Lcj;)Iintermediary method_908Lnet/minecraft/class_243;method_908(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Inamed getFluidLevelLnet/minecraft/block/AbstractFluidBlock;getFluidLevel(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)I
-
getFlowReduction
- Mappings:
Namespace Name Mixin selector official fLahv;f(Ladq;Lcj;)Iintermediary method_909Lnet/minecraft/class_243;method_909(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Inamed getFlowReductionLnet/minecraft/block/AbstractFluidBlock;getFlowReduction(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)I
-
renderAsNormalBlock
public boolean renderAsNormalBlock()Returns whether the block can be rendered as a normal block- Overrides:
renderAsNormalBlockin classBlock- Returns:
- Whether the block can be rendered as a normal block
- Mappings:
Namespace Name Mixin selector official dLafh;d()Zintermediary method_709Lnet/minecraft/class_160;method_709()Znamed renderAsNormalBlockLnet/minecraft/block/Block;renderAsNormalBlock()Z
-
hasTransperancy
public boolean hasTransperancy()- Overrides:
hasTransperancyin classBlock- Mappings:
Namespace Name Mixin selector official cLafh;c()Zintermediary method_699Lnet/minecraft/class_160;method_699()Znamed hasTransperancyLnet/minecraft/block/Block;hasTransperancy()Z
-
canCollide
Returns whether entities can collide with the block- Overrides:
canCollidein classBlock- Parameters:
state- The block's BlockState- Returns:
- Whether the block has collision
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lalz;Z)Zintermediary method_675Lnet/minecraft/class_160;method_675(Lnet/minecraft/class_376;Z)Znamed canCollideLnet/minecraft/block/Block;canCollide(Lnet/minecraft/block/BlockState;Z)Z
-
hasCollision
- Overrides:
hasCollisionin classBlock- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladq;Lcj;Lcq;)Zintermediary method_694Lnet/minecraft/class_160;method_694(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;)Znamed hasCollisionLnet/minecraft/block/Block;hasCollision(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
-
isSideInvisible
@Environment(CLIENT) public boolean isSideInvisible(WorldView view, BlockPos pos, Direction facing)Returns whether the current block has connected sides, i.e its side faces are invisible when covered by other blocks. Used by glass to prevent the white dots from appearing everywhere through adjacent glass blocks.- Overrides:
isSideInvisiblein classBlock- Parameters:
view- WorldView instancepos- The current block's positionfacing- The direction the block is facing- Returns:
- Whether the current block has connected sides
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;Lcq;)Zintermediary method_668Lnet/minecraft/class_160;method_668(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;)Znamed isSideInvisibleLnet/minecraft/block/Block;isSideInvisible(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
-
shouldDisableCullingSides
- Mappings:
Namespace Name Mixin selector official gLahv;g(Ladq;Lcj;)Zintermediary method_910Lnet/minecraft/class_243;method_910(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Znamed shouldDisableCullingSidesLnet/minecraft/block/AbstractFluidBlock;shouldDisableCullingSides(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
-
getCollisionBox
Returns a box by adding the block's current location and the block's corresponding value in its Bounding Box- Overrides:
getCollisionBoxin classBlock- Parameters:
world- The world that the block has been placedpos- The block's positionstate- The block's BlockState- Returns:
- The Collision box
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;)Laug;intermediary method_645Lnet/minecraft/class_160;method_645(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Lnet/minecraft/class_646;named getCollisionBoxLnet/minecraft/block/Block;getCollisionBox(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/util/math/Box;
-
getBlockType
public int getBlockType()- Overrides:
getBlockTypein classBlock- Mappings:
Namespace Name Mixin selector official bLafh;b()Iintermediary method_684Lnet/minecraft/class_160;method_684()Inamed getBlockTypeLnet/minecraft/block/Block;getBlockType()I
-
getDropItem
Returns the item that must be dropped when the block is broken- Overrides:
getDropItemin classBlock- Parameters:
blockState- The block's BlockStaterandom- Random objectstate- State- Returns:
- The Item that drops after the block breaks
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lalz;Ljava/util/Random;I)Lzw;intermediary method_674Lnet/minecraft/class_160;method_674(Lnet/minecraft/class_376;Ljava/util/Random;I)Lnet/minecraft/class_2054;named getDropItemLnet/minecraft/block/Block;getDropItem(Lnet/minecraft/block/BlockState;Ljava/util/Random;I)Lnet/minecraft/item/Item;
-
getDropCount
Returns the amount of items the block should drop on breaking without bonus rolls.- Overrides:
getDropCountin classBlock- Parameters:
rand- Random object- Returns:
- Amount of items to be dropped
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ljava/util/Random;)Iintermediary method_677Lnet/minecraft/class_160;method_677(Ljava/util/Random;)Inamed getDropCountLnet/minecraft/block/Block;getDropCount(Ljava/util/Random;)I
-
getFluidVec
- Mappings:
Namespace Name Mixin selector official hLahv;h(Ladq;Lcj;)Laui;intermediary method_911Lnet/minecraft/class_243;method_911(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Lnet/minecraft/class_649;named getFluidVecLnet/minecraft/block/AbstractFluidBlock;getFluidVec(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Vec3d;
-
onEntityCollision
- Overrides:
onEntityCollisionin classBlock- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lpk;Laui;)Laui;intermediary method_660Lnet/minecraft/class_160;method_660(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1745;Lnet/minecraft/class_649;)Lnet/minecraft/class_649;named onEntityCollisionLnet/minecraft/block/Block;onEntityCollision(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Vec3d;
-
getTickRate
Returns the block's tick rate. Default is 10.- Overrides:
getTickRatein classBlock- Parameters:
world- The world that the block is placed in- Returns:
- Tick rate
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;)Iintermediary method_642Lnet/minecraft/class_160;method_642(Lnet/minecraft/class_99;)Inamed getTickRateLnet/minecraft/block/Block;getTickRate(Lnet/minecraft/world/World;)I
-
getBrightness
- Overrides:
getBrightnessin classBlock- Mappings:
Namespace Name Mixin selector official cLafh;c(Ladq;Lcj;)Iintermediary method_705Lnet/minecraft/class_160;method_705(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Inamed getBrightnessLnet/minecraft/block/Block;getBrightness(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)I
-
getRenderLayerType
Returns the appropriate RenderLayer for a block. Only called on the client.- Overrides:
getRenderLayerTypein classBlock- Returns:
- The block's RenderLayer
- Mappings:
Namespace Name Mixin selector official mLafh;m()Ladf;intermediary method_731Lnet/minecraft/class_160;method_731()Lnet/minecraft/class_91;named getRenderLayerTypeLnet/minecraft/block/Block;getRenderLayerType()Lnet/minecraft/client/render/RenderLayer;
-
randomDisplayTick
@Environment(CLIENT) public void randomDisplayTick(World world, BlockPos pos, BlockState state, Random rand)Runs every random display Tick. Useful for displaying particles around a block, like Redstone Ore.- Overrides:
randomDisplayTickin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStaterand- Random object- Mappings:
Namespace Name Mixin selector official cLafh;c(Ladm;Lcj;Lalz;Ljava/util/Random;)Vintermediary method_704Lnet/minecraft/class_160;method_704(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Ljava/util/Random;)Vnamed randomDisplayTickLnet/minecraft/block/Block;randomDisplayTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
-
getDirection
@Environment(CLIENT) public static double getDirection(WorldView world, BlockPos pos, Material material)- Mappings:
Namespace Name Mixin selector official aLahv;a(Ladq;Lcj;Larm;)Dintermediary method_902Lnet/minecraft/class_243;method_902(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_591;)Dnamed getDirectionLnet/minecraft/block/AbstractFluidBlock;getDirection(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/Material;)D
-
onCreation
Runs when the block is placed (by a player or enderman).- Overrides:
onCreationin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockState- Mappings:
Namespace Name Mixin selector official cLafh;c(Ladm;Lcj;Lalz;)Vintermediary method_703Lnet/minecraft/class_160;method_703(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Vnamed onCreationLnet/minecraft/block/Block;onCreation(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
neighborUpdate
Runs when its adjacent blocks are updated. It will also run when the block is placed or removed as Air is being updated.- Overrides:
neighborUpdatein classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateblock- The adjacent Block that updated the current block- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lafh;)Vintermediary method_648Lnet/minecraft/class_160;method_648(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_160;)Vnamed neighborUpdateLnet/minecraft/block/Block;neighborUpdate(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/Block;)V
-
update
- Mappings:
Namespace Name Mixin selector official eLahv;e(Ladm;Lcj;Lalz;)Zintermediary method_907Lnet/minecraft/class_243;method_907(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Znamed updateLnet/minecraft/block/AbstractFluidBlock;update(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z
-
playExtinguishEffects
- Mappings:
Namespace Name Mixin selector official eLahv;e(Ladm;Lcj;)Vintermediary method_906Lnet/minecraft/class_243;method_906(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Vnamed playExtinguishEffectsLnet/minecraft/block/AbstractFluidBlock;playExtinguishEffects(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
-
stateFromData
Returns a blockstate of the current block from it's id- Overrides:
stateFromDatain classBlock- Parameters:
data- The Blockstate's associated data value- Returns:
- The Default state
- Mappings:
Namespace Name Mixin selector official aLafh;a(I)Lalz;intermediary method_637Lnet/minecraft/class_160;method_637(I)Lnet/minecraft/class_376;named stateFromDataLnet/minecraft/block/Block;stateFromData(I)Lnet/minecraft/block/BlockState;
-
getData
Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not work- Overrides:
getDatain classBlock- Parameters:
state- The Blockstate- Returns:
- Zero
- Mappings:
Namespace Name Mixin selector official cLafh;c(Lalz;)Iintermediary method_706Lnet/minecraft/class_160;method_706(Lnet/minecraft/class_376;)Inamed getDataLnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
-
appendProperties
Returns a new state manager with a property array.- Overrides:
appendPropertiesin classBlock- Returns:
- New state manager
- Mappings:
Namespace Name Mixin selector official eLafh;e()Lama;intermediary method_714Lnet/minecraft/class_160;method_714()Lnet/minecraft/class_378;named appendPropertiesLnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
-
getFlowingFluidByMaterial
- Mappings:
Namespace Name Mixin selector official aLahv;a(Larm;)Lagl;intermediary method_903Lnet/minecraft/class_243;method_903(Lnet/minecraft/class_591;)Lnet/minecraft/class_200;named getFlowingFluidByMaterialLnet/minecraft/block/AbstractFluidBlock;getFlowingFluidByMaterial(Lnet/minecraft/block/Material;)Lnet/minecraft/block/FlowingFluidBlock;
-
getFluidByMaterial
- Mappings:
Namespace Name Mixin selector official bLahv;b(Larm;)Lajw;intermediary method_905Lnet/minecraft/class_243;method_905(Lnet/minecraft/class_591;)Lnet/minecraft/class_313;named getFluidByMaterialLnet/minecraft/block/AbstractFluidBlock;getFluidByMaterial(Lnet/minecraft/block/Material;)Lnet/minecraft/block/FluidBlock;
-