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 ahv
intermediary net/minecraft/class_243
named net/minecraft/block/AbstractFluidBlock
  • Field Details

    • LEVEL

      public static final IntProperty LEVEL
      Mappings:
      Namespace Name Mixin selector
      official b Lahv;b:Lamn;
      intermediary field_1031 Lnet/minecraft/class_243;field_1031:Lnet/minecraft/class_391;
      named LEVEL Lnet/minecraft/block/AbstractFluidBlock;LEVEL:Lnet/minecraft/state/property/IntProperty;
  • Constructor Details

    • AbstractFluidBlock

      protected AbstractFluidBlock​(Material material)
      Parameters:
      material - The block's material
      Mappings:
      Namespace Name Mixin selector
      official <init> Lafh;<init>(Larm;)V
      intermediary <init> Lnet/minecraft/class_160;<init>(Lnet/minecraft/class_591;)V
      named <init> Lnet/minecraft/block/Block;<init>(Lnet/minecraft/block/Material;)V
  • Method Details

    • blocksMovement

      public boolean blocksMovement​(WorldView view, BlockPos pos)
      Overrides:
      blocksMovement in class Block
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Ladq;Lcj;)Z
      intermediary method_692 Lnet/minecraft/class_160;method_692(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Z
      named blocksMovement Lnet/minecraft/block/Block;blocksMovement(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
    • getBlockColor

      @Environment(CLIENT) public int getBlockColor​(WorldView view, BlockPos pos, int id)
      Returns the current block's color
      Overrides:
      getBlockColor in class Block
      Parameters:
      view - WorldView instance
      pos - The block's position
      id - Id
      Returns:
      Block color
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladq;Lcj;I)I
      intermediary method_666 Lnet/minecraft/class_160;method_666(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;I)I
      named getBlockColor Lnet/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 b Lahv;b(I)F
      intermediary method_904 Lnet/minecraft/class_243;method_904(I)F
      named getHeightPercent Lnet/minecraft/block/AbstractFluidBlock;getHeightPercent(I)F
    • getFluidLevel

      protected int getFluidLevel​(WorldView world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official e Lahv;e(Ladq;Lcj;)I
      intermediary method_908 Lnet/minecraft/class_243;method_908(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)I
      named getFluidLevel Lnet/minecraft/block/AbstractFluidBlock;getFluidLevel(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)I
    • getFlowReduction

      protected int getFlowReduction​(WorldView world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official f Lahv;f(Ladq;Lcj;)I
      intermediary method_909 Lnet/minecraft/class_243;method_909(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)I
      named getFlowReduction Lnet/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:
      renderAsNormalBlock in class Block
      Returns:
      Whether the block can be rendered as a normal block
      Mappings:
      Namespace Name Mixin selector
      official d Lafh;d()Z
      intermediary method_709 Lnet/minecraft/class_160;method_709()Z
      named renderAsNormalBlock Lnet/minecraft/block/Block;renderAsNormalBlock()Z
    • hasTransperancy

      public boolean hasTransperancy()
      Overrides:
      hasTransperancy in class Block
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c()Z
      intermediary method_699 Lnet/minecraft/class_160;method_699()Z
      named hasTransperancy Lnet/minecraft/block/Block;hasTransperancy()Z
    • canCollide

      public boolean canCollide​(BlockState state, boolean bl)
      Returns whether entities can collide with the block
      Overrides:
      canCollide in class Block
      Parameters:
      state - The block's BlockState
      Returns:
      Whether the block has collision
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lalz;Z)Z
      intermediary method_675 Lnet/minecraft/class_160;method_675(Lnet/minecraft/class_376;Z)Z
      named canCollide Lnet/minecraft/block/Block;canCollide(Lnet/minecraft/block/BlockState;Z)Z
    • hasCollision

      public boolean hasCollision​(WorldView worldView, BlockPos pos, Direction direction)
      Overrides:
      hasCollision in class Block
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Ladq;Lcj;Lcq;)Z
      intermediary method_694 Lnet/minecraft/class_160;method_694(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;)Z
      named hasCollision Lnet/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:
      isSideInvisible in class Block
      Parameters:
      view - WorldView instance
      pos - The current block's position
      facing - The direction the block is facing
      Returns:
      Whether the current block has connected sides
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladq;Lcj;Lcq;)Z
      intermediary method_668 Lnet/minecraft/class_160;method_668(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;)Z
      named isSideInvisible Lnet/minecraft/block/Block;isSideInvisible(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
    • shouldDisableCullingSides

      @Environment(CLIENT) public boolean shouldDisableCullingSides​(WorldView world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official g Lahv;g(Ladq;Lcj;)Z
      intermediary method_910 Lnet/minecraft/class_243;method_910(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Z
      named shouldDisableCullingSides Lnet/minecraft/block/AbstractFluidBlock;shouldDisableCullingSides(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
    • getCollisionBox

      public Box 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 Box
      Overrides:
      getCollisionBox in class Block
      Parameters:
      world - The world that the block has been placed
      pos - The block's position
      state - The block's BlockState
      Returns:
      The Collision box
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;)Laug;
      intermediary method_645 Lnet/minecraft/class_160;method_645(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Lnet/minecraft/class_646;
      named getCollisionBox Lnet/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:
      getBlockType in class Block
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b()I
      intermediary method_684 Lnet/minecraft/class_160;method_684()I
      named getBlockType Lnet/minecraft/block/Block;getBlockType()I
    • getDropItem

      public Item getDropItem​(BlockState blockState, Random random, int state)
      Returns the item that must be dropped when the block is broken
      Overrides:
      getDropItem in class Block
      Parameters:
      blockState - The block's BlockState
      random - Random object
      state - State
      Returns:
      The Item that drops after the block breaks
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lalz;Ljava/util/Random;I)Lzw;
      intermediary method_674 Lnet/minecraft/class_160;method_674(Lnet/minecraft/class_376;Ljava/util/Random;I)Lnet/minecraft/class_2054;
      named getDropItem Lnet/minecraft/block/Block;getDropItem(Lnet/minecraft/block/BlockState;Ljava/util/Random;I)Lnet/minecraft/item/Item;
    • getDropCount

      public int getDropCount​(Random rand)
      Returns the amount of items the block should drop on breaking without bonus rolls.
      Overrides:
      getDropCount in class Block
      Parameters:
      rand - Random object
      Returns:
      Amount of items to be dropped
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ljava/util/Random;)I
      intermediary method_677 Lnet/minecraft/class_160;method_677(Ljava/util/Random;)I
      named getDropCount Lnet/minecraft/block/Block;getDropCount(Ljava/util/Random;)I
    • getFluidVec

      protected Vec3d getFluidVec​(WorldView world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official h Lahv;h(Ladq;Lcj;)Laui;
      intermediary method_911 Lnet/minecraft/class_243;method_911(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Lnet/minecraft/class_649;
      named getFluidVec Lnet/minecraft/block/AbstractFluidBlock;getFluidVec(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Vec3d;
    • onEntityCollision

      public Vec3d onEntityCollision​(World world, BlockPos pos, Entity entity, Vec3d velocity)
      Overrides:
      onEntityCollision in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lpk;Laui;)Laui;
      intermediary method_660 Lnet/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 onEntityCollision Lnet/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

      public int getTickRate​(World world)
      Returns the block's tick rate. Default is 10.
      Overrides:
      getTickRate in class Block
      Parameters:
      world - The world that the block is placed in
      Returns:
      Tick rate
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;)I
      intermediary method_642 Lnet/minecraft/class_160;method_642(Lnet/minecraft/class_99;)I
      named getTickRate Lnet/minecraft/block/Block;getTickRate(Lnet/minecraft/world/World;)I
    • getBrightness

      @Environment(CLIENT) public int getBrightness​(WorldView worldView, BlockPos pos)
      Overrides:
      getBrightness in class Block
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Ladq;Lcj;)I
      intermediary method_705 Lnet/minecraft/class_160;method_705(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)I
      named getBrightness Lnet/minecraft/block/Block;getBrightness(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)I
    • getRenderLayerType

      @Environment(CLIENT) public RenderLayer getRenderLayerType()
      Returns the appropriate RenderLayer for a block. Only called on the client.
      Overrides:
      getRenderLayerType in class Block
      Returns:
      The block's RenderLayer
      Mappings:
      Namespace Name Mixin selector
      official m Lafh;m()Ladf;
      intermediary method_731 Lnet/minecraft/class_160;method_731()Lnet/minecraft/class_91;
      named getRenderLayerType Lnet/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:
      randomDisplayTick in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      rand - Random object
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Ladm;Lcj;Lalz;Ljava/util/Random;)V
      intermediary method_704 Lnet/minecraft/class_160;method_704(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Ljava/util/Random;)V
      named randomDisplayTick Lnet/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 a Lahv;a(Ladq;Lcj;Larm;)D
      intermediary method_902 Lnet/minecraft/class_243;method_902(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_591;)D
      named getDirection Lnet/minecraft/block/AbstractFluidBlock;getDirection(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/Material;)D
    • onCreation

      public void onCreation​(World world, BlockPos pos, BlockState state)
      Runs when the block is placed (by a player or enderman).
      Overrides:
      onCreation in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Ladm;Lcj;Lalz;)V
      intermediary method_703 Lnet/minecraft/class_160;method_703(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)V
      named onCreation Lnet/minecraft/block/Block;onCreation(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • neighborUpdate

      public void neighborUpdate​(World world, BlockPos pos, BlockState state, Block block)
      Runs when its adjacent blocks are updated. It will also run when the block is placed or removed as Air is being updated.
      Overrides:
      neighborUpdate in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      block - The adjacent Block that updated the current block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;Lafh;)V
      intermediary method_648 Lnet/minecraft/class_160;method_648(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_160;)V
      named neighborUpdate Lnet/minecraft/block/Block;neighborUpdate(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/Block;)V
    • update

      public boolean update​(World world, BlockPos pos, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      official e Lahv;e(Ladm;Lcj;Lalz;)Z
      intermediary method_907 Lnet/minecraft/class_243;method_907(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Z
      named update Lnet/minecraft/block/AbstractFluidBlock;update(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z
    • playExtinguishEffects

      protected void playExtinguishEffects​(World world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official e Lahv;e(Ladm;Lcj;)V
      intermediary method_906 Lnet/minecraft/class_243;method_906(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)V
      named playExtinguishEffects Lnet/minecraft/block/AbstractFluidBlock;playExtinguishEffects(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
    • stateFromData

      public BlockState stateFromData​(int data)
      Returns a blockstate of the current block from it's id
      Overrides:
      stateFromData in class Block
      Parameters:
      data - The Blockstate's associated data value
      Returns:
      The Default state
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(I)Lalz;
      intermediary method_637 Lnet/minecraft/class_160;method_637(I)Lnet/minecraft/class_376;
      named stateFromData Lnet/minecraft/block/Block;stateFromData(I)Lnet/minecraft/block/BlockState;
    • getData

      public int getData​(BlockState state)
      Returns the data value for a blockstate Throws an IllegalArmumentException as this method does not work
      Overrides:
      getData in class Block
      Parameters:
      state - The Blockstate
      Returns:
      Zero
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Lalz;)I
      intermediary method_706 Lnet/minecraft/class_160;method_706(Lnet/minecraft/class_376;)I
      named getData Lnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
    • appendProperties

      protected StateManager appendProperties()
      Returns a new state manager with a property array.
      Overrides:
      appendProperties in class Block
      Returns:
      New state manager
      Mappings:
      Namespace Name Mixin selector
      official e Lafh;e()Lama;
      intermediary method_714 Lnet/minecraft/class_160;method_714()Lnet/minecraft/class_378;
      named appendProperties Lnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
    • getFlowingFluidByMaterial

      public static FlowingFluidBlock getFlowingFluidByMaterial​(Material material)
      Mappings:
      Namespace Name Mixin selector
      official a Lahv;a(Larm;)Lagl;
      intermediary method_903 Lnet/minecraft/class_243;method_903(Lnet/minecraft/class_591;)Lnet/minecraft/class_200;
      named getFlowingFluidByMaterial Lnet/minecraft/block/AbstractFluidBlock;getFlowingFluidByMaterial(Lnet/minecraft/block/Material;)Lnet/minecraft/block/FlowingFluidBlock;
    • getFluidByMaterial

      public static FluidBlock getFluidByMaterial​(Material material)
      Mappings:
      Namespace Name Mixin selector
      official b Lahv;b(Larm;)Lajw;
      intermediary method_905 Lnet/minecraft/class_243;method_905(Lnet/minecraft/class_591;)Lnet/minecraft/class_313;
      named getFluidByMaterial Lnet/minecraft/block/AbstractFluidBlock;getFluidByMaterial(Lnet/minecraft/block/Material;)Lnet/minecraft/block/FluidBlock;