Class CalibratedSculkSensorBlock

All Implemented Interfaces:
BlockEntityProvider, FluidDrainable, FluidFillable, Waterloggable, ItemConvertible, ToggleableFeature

public class CalibratedSculkSensorBlock extends SculkSensorBlock
Mappings:
Namespace Name
official cxd
intermediary net/minecraft/class_8236
named net/minecraft/block/CalibratedSculkSensorBlock
  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<CalibratedSculkSensorBlock> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Lcxd;a:Lcom/mojang/serialization/MapCodec;
      intermediary field_46296 Lnet/minecraft/class_8236;field_46296:Lcom/mojang/serialization/MapCodec;
      named CODEC Lnet/minecraft/block/CalibratedSculkSensorBlock;CODEC:Lcom/mojang/serialization/MapCodec;
    • FACING

      public static final DirectionProperty FACING
      Mappings:
      Namespace Name Mixin selector
      official b Lcxd;b:Ldkb;
      intermediary field_43235 Lnet/minecraft/class_8236;field_43235:Lnet/minecraft/class_2753;
      named FACING Lnet/minecraft/block/CalibratedSculkSensorBlock;FACING:Lnet/minecraft/state/property/DirectionProperty;
  • Constructor Details

    • CalibratedSculkSensorBlock

      public CalibratedSculkSensorBlock(AbstractBlock.Settings settings)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lddi;<init>(Ldjg$d;)V
      intermediary <init> Lnet/minecraft/class_5703;<init>(Lnet/minecraft/class_4970$class_2251;)V
      named <init> Lnet/minecraft/block/SculkSensorBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
  • Method Details

    • getCodec

      public com.mojang.serialization.MapCodec<CalibratedSculkSensorBlock> getCodec()
      Overrides:
      getCodec in class SculkSensorBlock
      Mappings:
      Namespace Name Mixin selector
      official a Ldjg;a()Lcom/mojang/serialization/MapCodec;
      intermediary method_53969 Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;
      named getCodec Lnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;
    • createBlockEntity

      @Nullable public @Nullable 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);
       }
       
      Specified by:
      createBlockEntity in interface BlockEntityProvider
      Overrides:
      createBlockEntity in class SculkSensorBlock
      Returns:
      a new block entity instance
      Mappings:
      Namespace Name Mixin selector
      official a Lczi;a(Lhx;Ldjh;)Ldgv;
      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;
    • 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;
       }
       
      Specified by:
      getTicker in interface BlockEntityProvider
      Overrides:
      getTicker in class SculkSensorBlock
      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
      official a Lczi;a(Lctp;Ldjh;Ldgx;)Ldgw;
      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;
      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;
    • getPlacementState

      @Nullable public @Nullable BlockState getPlacementState(ItemPlacementContext ctx)
      Overrides:
      getPlacementState in class SculkSensorBlock
      Mappings:
      Namespace Name Mixin selector
      official a Lcwq;a(Lcph;)Ldjh;
      intermediary method_9605 Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;
      named getPlacementState Lnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
    • getWeakRedstonePower

      public int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)
      Returns the weak redstone power emitted from the block.

      When overriding this, make sure to also override AbstractBlock.emitsRedstonePower(net.minecraft.block.BlockState) to return true.

      Weak redstone power is a power that cannot power a redstone wire when a solid block is in between. For example, RedstoneBlock and TargetBlock emits weak redstone power only. LeverBlock and ButtonBlock emits both weak and strong redstone power depending on the direction.

      Overrides:
      getWeakRedstonePower in class SculkSensorBlock
      Returns:
      the weak redstone power emitted from the block
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Ldjg;a(Ldjh;Lcsv;Lhx;Lic;)I
      intermediary method_9524 Lnet/minecraft/class_4970;method_9524(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)I
      named getWeakRedstonePower Lnet/minecraft/block/AbstractBlock;getWeakRedstonePower(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)I
    • appendProperties

      protected void appendProperties(StateManager.Builder<Block,BlockState> builder)
      Appends block state properties to this block. To use this, override and call StateManager.Builder.add(net.minecraft.state.property.Property<?>[]) inside the method. See Properties for the list of pre-defined properties.
      Overrides:
      appendProperties in class SculkSensorBlock
      Mappings:
      Namespace Name Mixin selector
      official a Lcwq;a(Ldji$a;)V
      intermediary method_9515 Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)V
      named appendProperties Lnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
    • rotate

      public BlockState rotate(BlockState state, BlockRotation rotation)
      Returns state rotated by rotation.

      By default, this returns the provided block state.

      Overrides:
      rotate in class AbstractBlock
      Returns:
      state rotated by rotation
      Mappings:
      Namespace Name Mixin selector
      official a Ldjg;a(Ldjh;Lddc;)Ldjh;
      intermediary method_9598 Lnet/minecraft/class_4970;method_9598(Lnet/minecraft/class_2680;Lnet/minecraft/class_2470;)Lnet/minecraft/class_2680;
      named rotate Lnet/minecraft/block/AbstractBlock;rotate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;
    • mirror

      public BlockState mirror(BlockState state, BlockMirror mirror)
      Returns state mirrored by mirror.

      By default, this returns the provided block state.

      Overrides:
      mirror in class AbstractBlock
      Returns:
      state mirrored by mirror
      Mappings:
      Namespace Name Mixin selector
      official a Ldjg;a(Ldjh;Ldbm;)Ldjh;
      intermediary method_9569 Lnet/minecraft/class_4970;method_9569(Lnet/minecraft/class_2680;Lnet/minecraft/class_2415;)Lnet/minecraft/class_2680;
      named mirror Lnet/minecraft/block/AbstractBlock;mirror(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockMirror;)Lnet/minecraft/block/BlockState;
    • getCooldownTime

      public int getCooldownTime()
      Overrides:
      getCooldownTime in class SculkSensorBlock
      Mappings:
      Namespace Name Mixin selector
      official c Lddi;c()I
      intermediary method_51166 Lnet/minecraft/class_5703;method_51166()I
      named getCooldownTime Lnet/minecraft/block/SculkSensorBlock;getCooldownTime()I