Class AbstractBannerBlock

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

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

    • color

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

    • AbstractBannerBlock

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

    • getCodec

      protected abstract com.mojang.serialization.MapCodec<? extends AbstractBannerBlock> getCodec()
      Specified by:
      getCodec in class BlockWithEntity
      Mappings:
      Namespace Name Mixin selector
      named getCodec Lnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;
      intermediary method_53969 Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;
      official a Ldxt;a()Lcom/mojang/serialization/MapCodec;
    • canMobSpawnInside

      public boolean canMobSpawnInside(BlockState state)
      Overrides:
      canMobSpawnInside in class Block
      Mappings:
      Namespace Name Mixin selector
      named canMobSpawnInside Lnet/minecraft/block/Block;canMobSpawnInside(Lnet/minecraft/block/BlockState;)Z
      intermediary method_9538 Lnet/minecraft/class_2248;method_9538(Lnet/minecraft/class_2680;)Z
      official a Ldkl;a(Ldxu;)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
      Implementation Note:
      While this is marked as nullable, in practice this should never return null. PistonExtensionBlock is the only block in vanilla that returns null inside the implementation.
      Mappings:
      Namespace Name Mixin selector
      named createBlockEntity Lnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/entity/BlockEntity;
      intermediary method_10123 Lnet/minecraft/class_2343;method_10123(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_2586;
      official a Ldnf;a(Ljh;Ldxu;)Lduw;
    • getPickStack

      public ItemStack getPickStack(WorldView 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
      named getPickStack Lnet/minecraft/block/Block;getPickStack(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
      intermediary method_9574 Lnet/minecraft/class_2248;method_9574(Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_1799;
      official a Ldkl;a(Ldhk;Ljh;Ldxu;)Lcxo;
    • getColor

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