Class PistonBlock

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

public class PistonBlock
extends Block
Mappings:
Namespace Name
official als
intermediary net/minecraft/class_369
named net/minecraft/block/PistonBlock
  • Field Details

    • DIRECTION

      public static final DirectionProperty DIRECTION
      Mappings:
      Namespace Name Mixin selector
      official a Lals;a:Laml;
      intermediary field_1472 Lnet/minecraft/class_369;field_1472:Lnet/minecraft/class_389;
      named DIRECTION Lnet/minecraft/block/PistonBlock;DIRECTION:Lnet/minecraft/state/property/DirectionProperty;
    • EXTENDED

      public static final BooleanProperty EXTENDED
      Mappings:
      Namespace Name Mixin selector
      official b Lals;b:Lamk;
      intermediary field_1473 Lnet/minecraft/class_369;field_1473:Lnet/minecraft/class_388;
      named EXTENDED Lnet/minecraft/block/PistonBlock;EXTENDED:Lnet/minecraft/state/property/BooleanProperty;
    • isSticky

      private final boolean isSticky
      Mappings:
      Namespace Name Mixin selector
      official N Lals;N:Z
      intermediary field_1471 Lnet/minecraft/class_369;field_1471:Z
      named isSticky Lnet/minecraft/block/PistonBlock;isSticky:Z
  • Constructor Details

    • PistonBlock

      public PistonBlock​(boolean bool)
  • Method Details

    • 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
    • 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
    • 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
    • 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
    • getStateFromData

      public BlockState getStateFromData​(World world, BlockPos pos, Direction dir, float float2, float float3, float float4, int id, LivingEntity entity)
      Returns a BlockState from an id
      Overrides:
      getStateFromData in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      dir - The block's direction
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lcq;FFFILpr;)Lalz;
      intermediary method_656 Lnet/minecraft/class_160;method_656(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;FFFILnet/minecraft/class_1752;)Lnet/minecraft/class_376;
      named getStateFromData Lnet/minecraft/block/Block;getStateFromData(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;FFFILnet/minecraft/entity/LivingEntity;)Lnet/minecraft/block/BlockState;
    • method_1197

      private void method_1197​(World world, BlockPos blockPos, BlockState blockState)
      Mappings:
      Namespace Name Mixin selector
      official e Lals;e(Ladm;Lcj;Lalz;)V
      intermediary method_1197 Lnet/minecraft/class_369;method_1197(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)V
      named method_1197 Lnet/minecraft/block/PistonBlock;method_1197(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • shouldExtend

      private boolean shouldExtend​(World world, BlockPos pos, Direction pistonFace)
      Mappings:
      Namespace Name Mixin selector
      official a Lals;a(Ladm;Lcj;Lcq;)Z
      intermediary method_1192 Lnet/minecraft/class_369;method_1192(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;)Z
      named shouldExtend Lnet/minecraft/block/PistonBlock;shouldExtend(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
    • onEvent

      public boolean onEvent​(World world, BlockPos pos, BlockState state, int id, int meta)
      Runs when an event takes place
      Overrides:
      onEvent in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      id - Id
      meta - Metadata
      Returns:
      Whether the event is successful
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;II)Z
      intermediary method_647 Lnet/minecraft/class_160;method_647(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;II)Z
      named onEvent Lnet/minecraft/block/Block;onEvent(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;II)Z
    • 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
    • setBlockItemBounds

      public void setBlockItemBounds()
      Sets the bounds for the BlockItem
      Overrides:
      setBlockItemBounds in class Block
      Mappings:
      Namespace Name Mixin selector
      official j Lafh;j()V
      intermediary method_725 Lnet/minecraft/class_160;method_725()V
      named setBlockItemBounds Lnet/minecraft/block/Block;setBlockItemBounds()V
    • appendCollisionBoxes

      public void appendCollisionBoxes​(World world, BlockPos pos, BlockState state, Box box, List<Box> list, Entity entity)
      Overrides:
      appendCollisionBoxes in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;Laug;Ljava/util/List;Lpk;)V
      intermediary method_649 Lnet/minecraft/class_160;method_649(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_646;Ljava/util/List;Lnet/minecraft/class_1745;)V
      named appendCollisionBoxes Lnet/minecraft/block/Block;appendCollisionBoxes(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Box;Ljava/util/List;Lnet/minecraft/entity/Entity;)V
    • 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;
    • 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
    • method_1196

      public static Direction method_1196​(int int2)
      Mappings:
      Namespace Name Mixin selector
      official b Lals;b(I)Lcq;
      intermediary method_1196 Lnet/minecraft/class_369;method_1196(I)Lnet/minecraft/class_1383;
      named method_1196 Lnet/minecraft/block/PistonBlock;method_1196(I)Lnet/minecraft/util/math/Direction;
    • method_1194

      public static Direction method_1194​(World world, BlockPos blockPos, LivingEntity livingEntity)
      Mappings:
      Namespace Name Mixin selector
      official a Lals;a(Ladm;Lcj;Lpr;)Lcq;
      intermediary method_1194 Lnet/minecraft/class_369;method_1194(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1752;)Lnet/minecraft/class_1383;
      named method_1194 Lnet/minecraft/block/PistonBlock;method_1194(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/util/math/Direction;
    • method_1195

      public static boolean method_1195​(Block block, World world, BlockPos blockPos, Direction direction, boolean bool)
      Mappings:
      Namespace Name Mixin selector
      official a Lals;a(Lafh;Ladm;Lcj;Lcq;Z)Z
      intermediary method_1195 Lnet/minecraft/class_369;method_1195(Lnet/minecraft/class_160;Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;Z)Z
      named method_1195 Lnet/minecraft/block/PistonBlock;method_1195(Lnet/minecraft/block/Block;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Z)Z
    • move

      private boolean move​(World world, BlockPos pos, Direction dir, boolean retract)
      Mappings:
      Namespace Name Mixin selector
      official a Lals;a(Ladm;Lcj;Lcq;Z)Z
      intermediary method_1193 Lnet/minecraft/class_369;method_1193(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;Z)Z
      named move Lnet/minecraft/block/PistonBlock;move(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Z)Z
    • method_696

      @Environment(CLIENT) public BlockState method_696​(BlockState blockState)
      Overrides:
      method_696 in class Block
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Lalz;)Lalz;
      intermediary method_696 Lnet/minecraft/class_160;method_696(Lnet/minecraft/class_376;)Lnet/minecraft/class_376;
      named method_696 Lnet/minecraft/block/Block;method_696(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
    • 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;