Class WorldModifyingBlock

All Implemented Interfaces:
ItemConvertible, ToggleableFeature
Direct Known Subclasses:
PickaxeBlock, PlaceBlock

public abstract class WorldModifyingBlock extends Block
Mappings:
Namespace Name
official cwe
intermediary net/minecraft/class_8427
named net/minecraft/block/WorldModifyingBlock
  • Field Details

    • FACING

      public static final DirectionProperty FACING
      Mappings:
      Namespace Name Mixin selector
      official a Lcwe;a:Ldhc;
      intermediary field_44230 Lnet/minecraft/class_8427;field_44230:Lnet/minecraft/class_2753;
      named FACING Lnet/minecraft/block/WorldModifyingBlock;FACING:Lnet/minecraft/state/property/DirectionProperty;
    • TRIGGERED

      public static final BooleanProperty TRIGGERED
      Mappings:
      Namespace Name Mixin selector
      official b Lcwe;b:Ldgz;
      intermediary field_44231 Lnet/minecraft/class_8427;field_44231:Lnet/minecraft/class_2746;
      named TRIGGERED Lnet/minecraft/block/WorldModifyingBlock;TRIGGERED:Lnet/minecraft/state/property/BooleanProperty;
    • TICK_DELAY

      private static final int TICK_DELAY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official c Lcwe;c:I
      intermediary field_44232 Lnet/minecraft/class_8427;field_44232:I
      named TICK_DELAY Lnet/minecraft/block/WorldModifyingBlock;TICK_DELAY:I
  • Constructor Details

    • WorldModifyingBlock

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

    • neighborUpdate

      public void neighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify)
      Called when a neighboring block is updated. This method should be overridden to perform an action with a side effect, most notably an activation of a redstone component. This can also be used to perform an action changing block states of other blocks, such as SpongeBlock which absorbs water.

      To replace the state of the block itself, override AbstractBlock.getStateForNeighborUpdate(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, net.minecraft.block.BlockState, net.minecraft.world.WorldAccess, net.minecraft.util.math.BlockPos, net.minecraft.util.math.BlockPos) instead.

      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:
      neighborUpdate in class AbstractBlock
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Ldgg;a(Ldgh;Lcql;Lgt;Lctm;Lgt;Z)V
      intermediary method_9612 Lnet/minecraft/class_4970;method_9612(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;Lnet/minecraft/class_2338;Z)V
      named neighborUpdate Lnet/minecraft/block/AbstractBlock;neighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/Block;Lnet/minecraft/util/math/BlockPos;Z)V
    • getPlacementState

      public BlockState getPlacementState(ItemPlacementContext ctx)
      Overrides:
      getPlacementState in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Lctm;a(Lcmc;)Ldgh;
      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;
    • getRenderType

      public 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)
      Mappings:
      Namespace Name Mixin selector
      official b_ Ldgg;b_(Ldgh;)Lczx;
      intermediary method_9604 Lnet/minecraft/class_4970;method_9604(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2464;
      named getRenderType Lnet/minecraft/block/AbstractBlock;getRenderType(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockRenderType;
    • 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 Ldgg;a(Ldgh;Ldae;)Ldgh;
      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 Ldgg;a(Ldgh;Lcyk;)Ldgh;
      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;
    • 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 Block
      Mappings:
      Namespace Name Mixin selector
      official a Lctm;a(Ldgi$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
    • getTickPriority

      protected abstract TickPriority getTickPriority()
      Mappings:
      Namespace Name Mixin selector
      official b Lcwe;b()Lejx;
      intermediary method_50863 Lnet/minecraft/class_8427;method_50863()Lnet/minecraft/class_1953;
      named getTickPriority Lnet/minecraft/block/WorldModifyingBlock;getTickPriority()Lnet/minecraft/world/tick/TickPriority;