Class DoublePlantBlock

All Implemented Interfaces:
Growable

public class DoublePlantBlock
extends PlantBlock
implements Growable
Mappings:
Namespace Name
official agi
intermediary net/minecraft/class_195
named net/minecraft/block/DoublePlantBlock
  • Field Details

    • VARIANT

      public static final EnumProperty<DoublePlantBlock.DoublePlantType> VARIANT
      Mappings:
      Namespace Name Mixin selector
      official a Lagi;a:Lamm;
      intermediary field_880 Lnet/minecraft/class_195;field_880:Lnet/minecraft/class_390;
      named VARIANT Lnet/minecraft/block/DoublePlantBlock;VARIANT:Lnet/minecraft/state/property/EnumProperty;
    • HALF

      public static final EnumProperty<DoublePlantBlock.HalfType> HALF
      Mappings:
      Namespace Name Mixin selector
      official b Lagi;b:Lamm;
      intermediary field_881 Lnet/minecraft/class_195;field_881:Lnet/minecraft/class_390;
      named HALF Lnet/minecraft/block/DoublePlantBlock;HALF:Lnet/minecraft/state/property/EnumProperty;
    • FACING

      public static final EnumProperty<Direction> FACING
      Mappings:
      Namespace Name Mixin selector
      official N Lagi;N:Lamm;
      intermediary field_879 Lnet/minecraft/class_195;field_879:Lnet/minecraft/class_390;
      named FACING Lnet/minecraft/block/DoublePlantBlock;FACING:Lnet/minecraft/state/property/EnumProperty;
  • Constructor Details

    • DoublePlantBlock

      public DoublePlantBlock()
  • Method Details

    • setBoundingBox

      public void setBoundingBox​(WorldView view, BlockPos pos)
      Overrides:
      setBoundingBox in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladq;Lcj;)V
      intermediary method_665 Lnet/minecraft/class_160;method_665(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)V
      named setBoundingBox Lnet/minecraft/block/Block;setBoundingBox(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)V
    • getVariant

      public DoublePlantBlock.DoublePlantType getVariant​(WorldView worldView, BlockPos blockPos)
      Mappings:
      Namespace Name Mixin selector
      official e Lagi;e(Ladq;Lcj;)Lagi$b;
      intermediary method_828 Lnet/minecraft/class_195;method_828(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Lnet/minecraft/class_195$class_197;
      named getVariant Lnet/minecraft/block/DoublePlantBlock;getVariant(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/DoublePlantBlock$DoublePlantType;
    • canBePlacedAtPos

      public boolean canBePlacedAtPos​(World world, BlockPos pos)
      Returns whether the current block can be placed at a certain BlockPos
      Overrides:
      canBePlacedAtPos in class PlantBlock
      Returns:
      Whether the current block can be placed at a BlockPos
      Mappings:
      Namespace Name Mixin selector
      official d Lafh;d(Ladm;Lcj;)Z
      intermediary method_711 Lnet/minecraft/class_160;method_711(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Z
      named canBePlacedAtPos Lnet/minecraft/block/Block;canBePlacedAtPos(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
    • isReplaceable

      public boolean isReplaceable​(World world, BlockPos pos)
      Overrides:
      isReplaceable in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;)Z
      intermediary method_643 Lnet/minecraft/class_160;method_643(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Z
      named isReplaceable Lnet/minecraft/block/Block;isReplaceable(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
    • method_754

      protected void method_754​(World world, BlockPos blockPos, BlockState blockState)
      Overrides:
      method_754 in class PlantBlock
      Mappings:
      Namespace Name Mixin selector
      official e Lafm;e(Ladm;Lcj;Lalz;)V
      intermediary method_754 Lnet/minecraft/class_167;method_754(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)V
      named method_754 Lnet/minecraft/block/PlantBlock;method_754(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • method_755

      public boolean method_755​(World world, BlockPos blockPos, BlockState blockState)
      Overrides:
      method_755 in class PlantBlock
      Mappings:
      Namespace Name Mixin selector
      official f Lafm;f(Ladm;Lcj;Lalz;)Z
      intermediary method_755 Lnet/minecraft/class_167;method_755(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Z
      named method_755 Lnet/minecraft/block/PlantBlock;method_755(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z
    • 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;
    • 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
    • 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
    • method_826

      public void method_826​(World world, BlockPos blockPos, DoublePlantBlock.DoublePlantType doublePlantType, int int2)
      Mappings:
      Namespace Name Mixin selector
      official a Lagi;a(Ladm;Lcj;Lagi$b;I)V
      intermediary method_826 Lnet/minecraft/class_195;method_826(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_195$class_197;I)V
      named method_826 Lnet/minecraft/block/DoublePlantBlock;method_826(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/DoublePlantBlock$DoublePlantType;I)V
    • onPlaced

      public void onPlaced​(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)
      Runs when the block is placed by an entity
      Overrides:
      onPlaced in class Block
      Parameters:
      world - The world that the block is in
      pos - The block's position
      state - The block's BlockState
      placer - The entity who placed the block
      itemStack - ItemStack instance
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;Lpr;Lzx;)V
      intermediary method_652 Lnet/minecraft/class_160;method_652(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1752;Lnet/minecraft/class_2056;)V
      named onPlaced Lnet/minecraft/block/Block;onPlaced(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)V
    • harvest

      public void harvest​(World world, PlayerEntity player, BlockPos pos, BlockState state, BlockEntity be)
      Runs every time a player begins to break the block.
      Overrides:
      harvest in class Block
      Parameters:
      world - The world that the block is placed in
      player - The player who is mining the block
      pos - The block's position
      state - The block's BlockState
      be - The block entity in the block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lwn;Lcj;Lalz;Lakw;)V
      intermediary method_664 Lnet/minecraft/class_160;method_664(Lnet/minecraft/class_99;Lnet/minecraft/class_1963;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_348;)V
      named harvest Lnet/minecraft/block/Block;harvest(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/BlockEntity;)V
    • onBreakByPlayer

      public void onBreakByPlayer​(World world, BlockPos pos, BlockState state, PlayerEntity player)
      Runs when the block is broken by a player.
      Overrides:
      onBreakByPlayer in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      player - The player who broke the block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;Lwn;)V
      intermediary method_653 Lnet/minecraft/class_160;method_653(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1963;)V
      named onBreakByPlayer Lnet/minecraft/block/Block;onBreakByPlayer(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;)V
    • method_827

      private boolean method_827​(World world, BlockPos blockPos, BlockState blockState, PlayerEntity playerEntity)
      Mappings:
      Namespace Name Mixin selector
      official b Lagi;b(Ladm;Lcj;Lalz;Lwn;)Z
      intermediary method_827 Lnet/minecraft/class_195;method_827(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1963;)Z
      named method_827 Lnet/minecraft/block/DoublePlantBlock;method_827(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;)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
    • getMeta

      public int getMeta​(World world, BlockPos pos)
      Returns metadata from a world and a BlockPos
      Overrides:
      getMeta in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      Returns:
      Metadata
      Mappings:
      Namespace Name Mixin selector
      official j Lafh;j(Ladm;Lcj;)I
      intermediary method_726 Lnet/minecraft/class_160;method_726(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)I
      named getMeta Lnet/minecraft/block/Block;getMeta(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
    • canGrow

      public boolean canGrow​(World world, BlockPos pos, BlockState state, boolean bl)
      Specified by:
      canGrow in interface Growable
      Mappings:
      Namespace Name Mixin selector
      official a Lafj;a(Ladm;Lcj;Lalz;Z)Z
      intermediary method_750 Lnet/minecraft/class_164;method_750(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Z)Z
      named canGrow Lnet/minecraft/block/Growable;canGrow(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)Z
    • canBeFertilized

      public boolean canBeFertilized​(World world, Random random, BlockPos pos, BlockState state)
      Specified by:
      canBeFertilized in interface Growable
      Mappings:
      Namespace Name Mixin selector
      official a Lafj;a(Ladm;Ljava/util/Random;Lcj;Lalz;)Z
      intermediary method_751 Lnet/minecraft/class_164;method_751(Lnet/minecraft/class_99;Ljava/util/Random;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Z
      named canBeFertilized Lnet/minecraft/block/Growable;canBeFertilized(Lnet/minecraft/world/World;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z
    • grow

      public void grow​(World world, Random random, BlockPos pos, BlockState state)
      Specified by:
      grow in interface Growable
      Mappings:
      Namespace Name Mixin selector
      official b Lafj;b(Ladm;Ljava/util/Random;Lcj;Lalz;)V
      intermediary method_752 Lnet/minecraft/class_164;method_752(Lnet/minecraft/class_99;Ljava/util/Random;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)V
      named grow Lnet/minecraft/block/Growable;grow(Lnet/minecraft/world/World;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)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;
    • getBlockState

      public BlockState getBlockState​(BlockState state, WorldView view, BlockPos pos)
      Returns the current block's blockstate at a certain position
      Overrides:
      getBlockState in class Block
      Parameters:
      state - The original blockstate
      view - WorldView instance
      pos - The block's position
      Returns:
      state
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lalz;Ladq;Lcj;)Lalz;
      intermediary method_673 Lnet/minecraft/class_160;method_673(Lnet/minecraft/class_376;Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Lnet/minecraft/class_376;
      named getBlockState Lnet/minecraft/block/Block;getBlockState(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)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;
    • getOffsetType

      @Environment(CLIENT) public Block.OffsetType getOffsetType()
      Returns the block's offset type. Used by grass and flowers.
      Overrides:
      getOffsetType in class Block
      Returns:
      The block's offset type
      Mappings:
      Namespace Name Mixin selector
      official R Lafh;R()Lafh$a;
      intermediary method_632 Lnet/minecraft/class_160;method_632()Lnet/minecraft/class_160$class_161;
      named getOffsetType Lnet/minecraft/block/Block;getOffsetType()Lnet/minecraft/block/Block$OffsetType;