Package net.minecraft

Class class_11064

All Implemented Interfaces:
BlockEntityProvider, ItemConvertible, ToggleableFeature

public class class_11064 extends BlockWithEntity
Mappings:
Namespace Name
named net/minecraft/class_11064
intermediary net/minecraft/class_11064
official dvl
  • Field Details

    • field_58923

      public static final com.mojang.serialization.MapCodec<class_11064> field_58923
      Mappings:
      Namespace Name Mixin selector
      named field_58923 Lnet/minecraft/class_11064;field_58923:Lcom/mojang/serialization/MapCodec;
      intermediary field_58923 Lnet/minecraft/class_11064;field_58923:Lcom/mojang/serialization/MapCodec;
      official a Ldvl;a:Lcom/mojang/serialization/MapCodec;
    • field_58924

      private static final VoxelShape field_58924
      Mappings:
      Namespace Name Mixin selector
      named field_58924 Lnet/minecraft/class_11064;field_58924:Lnet/minecraft/util/shape/VoxelShape;
      intermediary field_58924 Lnet/minecraft/class_11064;field_58924:Lnet/minecraft/class_265;
      official b Ldvl;b:Lfkv;
  • Constructor Details

    • class_11064

      protected class_11064(AbstractBlock.Settings settings)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
      intermediary <init> Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)V
      official <init> Leer;<init>(Leer$d;)V
  • Method Details

    • getCodec

      public com.mojang.serialization.MapCodec<class_11064> 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 Leer;a()Lcom/mojang/serialization/MapCodec;
    • 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.
      invalid reference
      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 Ldta;a(Lix;Lees;)Lebn;
    • getTicker

      @Nullable public <T extends BlockEntity> @Nullable BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type)
      Returns the "ticker" for the block's block entity, or null if the block entity does not need to be ticked.

      Ticker is a functional interface called every tick to tick the block entity on both the client and the server.

      Tickers should validate that the passed type is the one this block expects, and return null if it isn't. This is to prevent crashes in rare cases where a mismatch occurs between the position's block and block entity. BlockWithEntity.validateTicker(net.minecraft.block.entity.BlockEntityType<A>, net.minecraft.block.entity.BlockEntityType<E>, net.minecraft.block.entity.BlockEntityTicker<? super E>) can be used to implement the check.

      Example:

      
       public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type) {
         if (type != YourMod.MY_BLOCK_ENTITY_TYPE) return null;
         // This should be a static method usable as a BlockEntityTicker.
         return YourBlockEntity::tick;
       }
       
      Returns:
      the "ticker" for the block's block entity, or null if the block entity does not need to be ticked
      Mappings:
      Namespace Name Mixin selector
      named getTicker Lnet/minecraft/block/BlockEntityProvider;getTicker(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/BlockEntityType;)Lnet/minecraft/block/entity/BlockEntityTicker;
      intermediary method_31645 Lnet/minecraft/class_2343;method_31645(Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_2591;)Lnet/minecraft/class_5558;
      official a Ldta;a(Ldmy;Lees;Lebp;)Lebo;
    • randomDisplayTick

      public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random)
      Called randomly on the client. Blocks may override this to spawn particles. Unlike AbstractBlock.randomTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random) this is not affected by a game rule.
      Overrides:
      randomDisplayTick in class Block
      Mappings:
      Namespace Name Mixin selector
      named randomDisplayTick Lnet/minecraft/block/Block;randomDisplayTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)V
      intermediary method_9496 Lnet/minecraft/class_2248;method_9496(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)V
      official a Ldqh;a(Lees;Ldmy;Lix;Lbbg;)V
    • onUse

      protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit)
      Overrides:
      onUse in class AbstractBlock
      Mappings:
      Namespace Name Mixin selector
      named onUse Lnet/minecraft/block/AbstractBlock;onUse(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;
      intermediary method_55766 Lnet/minecraft/class_4970;method_55766(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;
      official a Leer;a(Lees;Ldmy;Lix;Lcuf;Lfjx;)Lbwb;
    • getPickStack

      protected ItemStack getPickStack(WorldView world, BlockPos pos, BlockState state, boolean includeData)
      Overrides:
      getPickStack in class AbstractBlock
      Mappings:
      Namespace Name Mixin selector
      named getPickStack Lnet/minecraft/block/AbstractBlock;getPickStack(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)Lnet/minecraft/item/ItemStack;
      intermediary method_9574 Lnet/minecraft/class_4970;method_9574(Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)Lnet/minecraft/class_1799;
      official a Leer;a(Ldnb;Lix;Lees;Z)Ldcs;
    • canBucketPlace

      protected boolean canBucketPlace(BlockState state, Fluid fluid)
      Returns whether a bucket can replace the block with the fluid.

      By default, this checks if the block allows replacing or is not solid. Blocks intended to be unbreakable should override this to implement additional checks.

      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:
      canBucketPlace in class AbstractBlock
      Returns:
      whether a bucket can replace the block with the fluid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named canBucketPlace Lnet/minecraft/block/AbstractBlock;canBucketPlace(Lnet/minecraft/block/BlockState;Lnet/minecraft/fluid/Fluid;)Z
      intermediary method_22358 Lnet/minecraft/class_4970;method_22358(Lnet/minecraft/class_2680;Lnet/minecraft/class_3611;)Z
      official a Leer;a(Lees;Lfbg;)Z
    • getOutlineShape

      protected VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
      Overrides:
      getOutlineShape in class AbstractBlock
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getOutlineShape Lnet/minecraft/block/AbstractBlock;getOutlineShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;
      intermediary method_9530 Lnet/minecraft/class_4970;method_9530(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;
      official a Leer;a(Lees;Ldmc;Lix;Lfkg;)Lfkv;
    • getRenderType

      protected BlockRenderType getRenderType(BlockState state)
      Returns the block's render type (invisible, animated, model).
      Overrides:
      getRenderType in class AbstractBlock
      Returns:
      the block's render type (invisible, animated, model)
      See Also:
      API Note:
      BlockWithEntity overrides this to return BlockRenderType.INVISIBLE; therefore, custom blocks extending that class must override it again to render the block.
      Mappings:
      Namespace Name Mixin selector
      named getRenderType Lnet/minecraft/block/AbstractBlock;getRenderType(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockRenderType;
      intermediary method_9604 Lnet/minecraft/class_4970;method_9604(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2464;
      official a_ Leer;a_(Lees;)Ldwx;
    • method_69711

      public static void method_69711(World world, BlockPos blockPos, RegistryKey<DimensionOptions> registryKey, boolean bool)
      Mappings:
      Namespace Name Mixin selector
      named method_69711 Lnet/minecraft/class_11064;method_69711(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/registry/RegistryKey;Z)V
      intermediary method_69711 Lnet/minecraft/class_11064;method_69711(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_5321;Z)V
      official a Ldvl;a(Ldmy;Lix;Lama;Z)V