Class FenceGateBlock


public class FenceGateBlock
extends HorizontalFacingBlock
Mappings:
Namespace Name
official agu
intermediary net/minecraft/class_209
named net/minecraft/block/FenceGateBlock
  • Field Details

    • OPEN

      public static final BooleanProperty OPEN
      Mappings:
      Namespace Name Mixin selector
      official a Lagu;a:Lamk;
      intermediary field_909 Lnet/minecraft/class_209;field_909:Lnet/minecraft/class_388;
      named OPEN Lnet/minecraft/block/FenceGateBlock;OPEN:Lnet/minecraft/state/property/BooleanProperty;
    • POWERED

      public static final BooleanProperty POWERED
      Mappings:
      Namespace Name Mixin selector
      official b Lagu;b:Lamk;
      intermediary field_910 Lnet/minecraft/class_209;field_910:Lnet/minecraft/class_388;
      named POWERED Lnet/minecraft/block/FenceGateBlock;POWERED:Lnet/minecraft/state/property/BooleanProperty;
    • IN_WALL

      public static final BooleanProperty IN_WALL
      Mappings:
      Namespace Name Mixin selector
      official N Lagu;N:Lamk;
      intermediary field_908 Lnet/minecraft/class_209;field_908:Lnet/minecraft/class_388;
      named IN_WALL Lnet/minecraft/block/FenceGateBlock;IN_WALL:Lnet/minecraft/state/property/BooleanProperty;
  • Constructor Details

  • Method Details

    • 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;
    • canBePlacedAtPos

      public boolean canBePlacedAtPos​(World world, BlockPos pos)
      Returns whether the current block can be placed at a certain BlockPos
      Overrides:
      canBePlacedAtPos in class Block
      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
    • 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;
    • 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
    • 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
    • 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
    • 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
    • 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;
    • onUse

      public boolean onUse​(World world, BlockPos pos, BlockState state, PlayerEntity player, Direction direction, float float2, float float3, float float4)
      Runs when the block is used, i.e. right clicked in most cases. It is similar to the same method in Item, but this method is called only when the player uses it when the block is placed, not when the player is holding the BlockItem.
      Overrides:
      onUse 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 used the block
      direction - The direction that the block is facing
      Returns:
      Whether the action is succesful
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;Lwn;Lcq;FFF)Z
      intermediary method_654 Lnet/minecraft/class_160;method_654(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1963;Lnet/minecraft/class_1383;FFF)Z
      named onUse Lnet/minecraft/block/Block;onUse(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/Direction;FFF)Z
    • 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
    • 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
    • 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;