Package net.minecraft.block
Class AbstractFluidBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.AbstractFluidBlock
- Direct Known Subclasses:
FlowingFluidBlock,FluidBlock
- Mappings:
Namespace Name official ahvintermediary net/minecraft/class_153named net/minecraft/block/AbstractFluidBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType, Block.Sound -
Field Summary
FieldsFields inherited from class net.minecraft.block.Block
ANVIL, blastResistance, BLOCK_STATES, blockEntity, boundingBoxMaxX, boundingBoxMaxY, boundingBoxMaxZ, boundingBoxMinX, boundingBoxMinY, boundingBoxMinZ, CLOTH, fullBlock, GLASS, GRASS, GRAVEL, hardness, LADDER, lightLevel, material, materialColor, opacity, ORE, particleGravity, RAIL, randomTicks, REGISTRY, SAND, SLIME, slipperiness, SNOW, sound, stateManager, stats, STONE, transluscent, useNeighbourLight, WOOD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StateManagerReturns a new state manager with a property array.booleanblocksMovement(BlockView view, BlockPos pos) booleancanCollide(BlockState state, boolean bl) Returns whether entities can collide with the blockintgetBlockColor(BlockView view, BlockPos pos, int id) Returns the current block's colorintintgetBrightness(BlockView blockView, BlockPos pos) getCollisionBox(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(BlockView world, BlockPos pos, Material material) intgetDropCount(Random rand) Returns the amount of items the block should drop on breaking without bonus rolls.getDropItem(BlockState blockState, Random random, int state) Returns the item that must be dropped when the block is brokenstatic FlowingFluidBlockgetFlowingFluidByMaterial(Material material) protected intgetFlowReduction(BlockView world, BlockPos pos) static FluidBlockgetFluidByMaterial(Material material) protected intgetFluidLevel(BlockView world, BlockPos pos) protected Vec3dgetFluidVec(BlockView world, BlockPos pos) static floatgetHeightPercent(int height) Returns the appropriate RenderLayer for a block.intgetTickRate(World world) Returns the block's tick rate.booleanhasCollision(BlockView blockView, BlockPos pos, Direction direction) booleanbooleanisSideInvisible(BlockView 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).onEntityCollision(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.booleanReturns whether the block can be rendered as a normal blockbooleanshouldDisableCullingSides(BlockView world, BlockPos pos) stateFromData(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_414, method_8666, 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_9523Lnet/minecraft/class_153;field_9523:Lnet/minecraft/class_2246;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_197;<init>(Lnet/minecraft/class_63;)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_8663Lnet/minecraft/class_197;method_8663(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Znamed blocksMovementLnet/minecraft/block/Block;blocksMovement(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Z
-
getBlockColor
Returns the current block's color- Overrides:
getBlockColorin classBlock- Parameters:
view- BlockView instancepos- The block's positionid- Id- Returns:
- Block color
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;I)Iintermediary method_438Lnet/minecraft/class_197;method_438(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;I)Inamed getBlockColorLnet/minecraft/block/Block;getBlockColor(Lnet/minecraft/world/BlockView;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_330Lnet/minecraft/class_153;method_330(I)Fnamed getHeightPercentLnet/minecraft/block/AbstractFluidBlock;getHeightPercent(I)F
-
getFluidLevel
- Mappings:
Namespace Name Mixin selector official eLahv;e(Ladq;Lcj;)Iintermediary method_8820Lnet/minecraft/class_153;method_8820(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Inamed getFluidLevelLnet/minecraft/block/AbstractFluidBlock;getFluidLevel(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)I
-
getFlowReduction
- Mappings:
Namespace Name Mixin selector official fLahv;f(Ladq;Lcj;)Iintermediary method_8821Lnet/minecraft/class_153;method_8821(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Inamed getFlowReductionLnet/minecraft/block/AbstractFluidBlock;getFlowReduction(Lnet/minecraft/world/BlockView;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_441Lnet/minecraft/class_197;method_441()Znamed renderAsNormalBlockLnet/minecraft/block/Block;renderAsNormalBlock()Z
-
hasTransperancy
public boolean hasTransperancy()- Overrides:
hasTransperancyin classBlock- Mappings:
Namespace Name Mixin selector official cLafh;c()Zintermediary method_449Lnet/minecraft/class_197;method_449()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_400Lnet/minecraft/class_197;method_400(Lnet/minecraft/class_2232;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_8665Lnet/minecraft/class_197;method_8665(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_1354;)Znamed hasCollisionLnet/minecraft/block/Block;hasCollision(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
-
isSideInvisible
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- BlockView 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_8654Lnet/minecraft/class_197;method_8654(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_1354;)Znamed isSideInvisibleLnet/minecraft/block/Block;isSideInvisible(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
-
shouldDisableCullingSides
- Mappings:
Namespace Name Mixin selector official gLahv;g(Ladq;Lcj;)Zintermediary method_8822Lnet/minecraft/class_153;method_8822(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Znamed shouldDisableCullingSidesLnet/minecraft/block/AbstractFluidBlock;shouldDisableCullingSides(Lnet/minecraft/world/BlockView;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_8640Lnet/minecraft/class_197;method_8640(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Lnet/minecraft/class_231;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_429Lnet/minecraft/class_197;method_429()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_398Lnet/minecraft/class_197;method_398(Lnet/minecraft/class_2232;Ljava/util/Random;I)Lnet/minecraft/class_1069;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_403Lnet/minecraft/class_197;method_403(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_8823Lnet/minecraft/class_153;method_8823(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Lnet/minecraft/class_236;named getFluidVecLnet/minecraft/block/AbstractFluidBlock;getFluidVec(Lnet/minecraft/world/BlockView;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_8648Lnet/minecraft/class_197;method_8648(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_864;Lnet/minecraft/class_236;)Lnet/minecraft/class_236;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_4789Lnet/minecraft/class_197;method_4789(Lnet/minecraft/class_1150;)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_8670Lnet/minecraft/class_197;method_8670(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Inamed getBrightnessLnet/minecraft/block/Block;getBrightness(Lnet/minecraft/world/BlockView;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_8687Lnet/minecraft/class_197;method_8687()Lnet/minecraft/class_2165;named getRenderLayerTypeLnet/minecraft/block/Block;getRenderLayerType()Lnet/minecraft/client/render/BlockRenderLayer;
-
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_8669Lnet/minecraft/class_197;method_8669(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;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(BlockView world, BlockPos pos, Material material) - Mappings:
Namespace Name Mixin selector official aLahv;a(Ladq;Lcj;Larm;)Dintermediary method_8815Lnet/minecraft/class_153;method_8815(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_63;)Dnamed getDirectionLnet/minecraft/block/AbstractFluidBlock;getDirection(Lnet/minecraft/world/BlockView;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_8668Lnet/minecraft/class_197;method_8668(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)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_8641Lnet/minecraft/class_197;method_8641(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_197;)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_8819Lnet/minecraft/class_153;method_8819(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)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_8818Lnet/minecraft/class_153;method_8818(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)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_8635Lnet/minecraft/class_197;method_8635(I)Lnet/minecraft/class_2232;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_8671Lnet/minecraft/class_197;method_8671(Lnet/minecraft/class_2232;)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_8676Lnet/minecraft/class_197;method_8676()Lnet/minecraft/class_2233;named appendPropertiesLnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
-
getFlowingFluidByMaterial
- Mappings:
Namespace Name Mixin selector official aLahv;a(Larm;)Lagl;intermediary method_8816Lnet/minecraft/class_153;method_8816(Lnet/minecraft/class_63;)Lnet/minecraft/class_154;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_8817Lnet/minecraft/class_153;method_8817(Lnet/minecraft/class_63;)Lnet/minecraft/class_155;named getFluidByMaterialLnet/minecraft/block/AbstractFluidBlock;getFluidByMaterial(Lnet/minecraft/block/Material;)Lnet/minecraft/block/FluidBlock;
-