Class CalibratedSculkSensorBlock

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

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

    • FACING

      public static final DirectionProperty FACING
      Mappings:
      Namespace Name Mixin selector
      official a Lcps;a:Ldcn;
      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> Lcvy;<init>(Ldbs$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

    • 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 Lcru;a(Lgu;Ldbt;)Lczf;
      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.checkType(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 Lcru;a(Lcmf;Ldbt;Lczh;)Lczg;
      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 Lcpg;a(Lcia;)Ldbt;
      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 Ldbs;a(Ldbt;Lcll;Lgu;Lha;)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 Lcpg;a(Ldbu$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 Ldbs;a(Ldbt;Lcvr;)Ldbt;
      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 Ldbs;a(Ldbt;Lcua;)Ldbt;
      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 b Lcvy;b()I
      intermediary method_51166 Lnet/minecraft/class_5703;method_51166()I
      named getCooldownTime Lnet/minecraft/block/SculkSensorBlock;getCooldownTime()I