Class SpongeBlock

java.lang.Object
net.minecraft.block.Block
net.minecraft.block.SpongeBlock

public class SpongeBlock
extends Block
Mappings:
Namespace Name
official ajr
intermediary net/minecraft/class_306
named net/minecraft/block/SpongeBlock
  • Field Details

    • WET

      public static final BooleanProperty WET
      Mappings:
      Namespace Name Mixin selector
      official a Lajr;a:Lamk;
      intermediary field_1192 Lnet/minecraft/class_306;field_1192:Lnet/minecraft/class_388;
      named WET Lnet/minecraft/block/SpongeBlock;WET:Lnet/minecraft/state/property/BooleanProperty;
  • Constructor Details

    • SpongeBlock

      protected SpongeBlock()
  • Method Details

    • getTranslatedName

      public String getTranslatedName()
      Translates and returns the translation key
      Overrides:
      getTranslatedName in class Block
      Returns:
      Translated name
      Mappings:
      Namespace Name Mixin selector
      official f Lafh;f()Ljava/lang/String;
      intermediary method_716 Lnet/minecraft/class_160;method_716()Ljava/lang/String;
      named getTranslatedName Lnet/minecraft/block/Block;getTranslatedName()Ljava/lang/String;
    • getMeta

      public int getMeta​(BlockState state)
      Returns the metadata value for a certain BlockState
      Overrides:
      getMeta in class Block
      Parameters:
      state - The BlockState
      Returns:
      Metadata value
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lalz;)I
      intermediary method_672 Lnet/minecraft/class_160;method_672(Lnet/minecraft/class_376;)I
      named getMeta Lnet/minecraft/block/Block;getMeta(Lnet/minecraft/block/BlockState;)I
    • 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
    • method_1004

      protected void method_1004​(World world, BlockPos blockPos, BlockState blockState)
      Mappings:
      Namespace Name Mixin selector
      official e Lajr;e(Ladm;Lcj;Lalz;)V
      intermediary method_1004 Lnet/minecraft/class_306;method_1004(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)V
      named method_1004 Lnet/minecraft/block/SpongeBlock;method_1004(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • absorbWater

      private boolean absorbWater​(World world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official e Lajr;e(Ladm;Lcj;)Z
      intermediary method_1003 Lnet/minecraft/class_306;method_1003(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Z
      named absorbWater Lnet/minecraft/block/SpongeBlock;absorbWater(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
    • appendItemStacks

      @Environment(CLIENT) public void appendItemStacks​(Item item, ItemGroup group, List<ItemStack> stacks)
      Appends ItemStacks to an itemgroup. Only called on the client.
      Overrides:
      appendItemStacks in class Block
      Parameters:
      item - The Item that must be added
      group - The ItemGroup that the item must be added to
      stacks - The list of currently added ItemStacks to the ItemGroup
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lzw;Lyz;Ljava/util/List;)V
      intermediary method_682 Lnet/minecraft/class_160;method_682(Lnet/minecraft/class_2054;Lnet/minecraft/class_2029;Ljava/util/List;)V
      named appendItemStacks Lnet/minecraft/block/Block;appendItemStacks(Lnet/minecraft/item/Item;Lnet/minecraft/item/ItemGroup;Ljava/util/List;)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;
    • 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