Class AbstractBannerBlock

All Implemented Interfaces:
BlockEntityProvider, ItemConvertible, ToggleableFeature
Direct Known Subclasses:
BannerBlock, WallBannerBlock

public abstract class AbstractBannerBlock extends BlockWithEntity
Mappings:
Namespace Name
official crm
intermediary net/minecraft/class_2185
named net/minecraft/block/AbstractBannerBlock
  • Field Details

    • color

      private final DyeColor color
      Mappings:
      Namespace Name Mixin selector
      official a Lcrm;a:Lcht;
      intermediary field_9855 Lnet/minecraft/class_2185;field_9855:Lnet/minecraft/class_1767;
      named color Lnet/minecraft/block/AbstractBannerBlock;color:Lnet/minecraft/util/DyeColor;
  • Constructor Details

    • AbstractBannerBlock

      protected AbstractBannerBlock(DyeColor color, AbstractBlock.Settings settings)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcrm;<init>(Lcht;Ldfi$d;)V
      intermediary <init> Lnet/minecraft/class_2185;<init>(Lnet/minecraft/class_1767;Lnet/minecraft/class_4970$class_2251;)V
      named <init> Lnet/minecraft/block/AbstractBannerBlock;<init>(Lnet/minecraft/util/DyeColor;Lnet/minecraft/block/AbstractBlock$Settings;)V
  • Method Details

    • canMobSpawnInside

      public boolean canMobSpawnInside(BlockState state)
      Overrides:
      canMobSpawnInside in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Lcsv;a(Ldfj;)Z
      intermediary method_9538 Lnet/minecraft/class_2248;method_9538(Lnet/minecraft/class_2680;)Z
      named canMobSpawnInside Lnet/minecraft/block/Block;canMobSpawnInside(Lnet/minecraft/block/BlockState;)Z
    • createBlockEntity

      public BlockEntity createBlockEntity(BlockPos pos, BlockState state)
      Returns a new block entity instance.

      For example:

      
       @Override
       public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
         return new MyBlockEntity(pos, state);
       }
       
      Returns:
      a new block entity instance
      Mappings:
      Namespace Name Mixin selector
      official a Lcvj;a(Lgw;Ldfj;)Ldcv;
      intermediary method_10123 Lnet/minecraft/class_2343;method_10123(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_2586;
      named createBlockEntity Lnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/entity/BlockEntity;
    • onPlaced

      public void onPlaced(World world, BlockPos pos, BlockState state, @Nullable @Nullable LivingEntity placer, ItemStack itemStack)
      Called when the player placed the block.

      Tall or wide blocks (such as doors or beds) should override this to place the other half of the block. Blocks with block entities can use this to copy the data from the item stack, such as the custom name.

      This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using World.isClient.

      Overrides:
      onPlaced in class Block
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lcsv;a(Lcpv;Lgw;Ldfj;Lbjg;Lcjf;)V
      intermediary method_9567 Lnet/minecraft/class_2248;method_9567(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)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
    • getPickStack

      public ItemStack getPickStack(BlockView world, BlockPos pos, BlockState state)
      Returns the new item stack when using pick block functionality.

      Pick block is available via middle-clicking by default. Blocks without the corresponding BlockItem, such as crops, should override this method to return the correct item stack.

      Overrides:
      getPickStack in class Block
      Returns:
      the new item stack when using pick block functionality
      Mappings:
      Namespace Name Mixin selector
      official a Lcsv;a(Lcpb;Lgw;Ldfj;)Lcjf;
      intermediary method_9574 Lnet/minecraft/class_2248;method_9574(Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_1799;
      named getPickStack Lnet/minecraft/block/Block;getPickStack(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
    • getColor

      public DyeColor getColor()
      Mappings:
      Namespace Name Mixin selector
      official a Lcrm;a()Lcht;
      intermediary method_9303 Lnet/minecraft/class_2185;method_9303()Lnet/minecraft/class_1767;
      named getColor Lnet/minecraft/block/AbstractBannerBlock;getColor()Lnet/minecraft/util/DyeColor;