Interface EncasableBlock

All Known Implementing Classes:
CogWheelBlock, FluidPipeBlock, ShaftBlock

public interface EncasableBlock
Implement this interface to indicate that this block is encasable.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    playEncaseSound(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
     
    default net.minecraft.world.ItemInteractionResult
    tryEncase(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack heldItem, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult ray)
    This method should be called in the BlockBehaviour.useItemOn(ItemStack, BlockState, Level, BlockPos, Player, InteractionHand, BlockHitResult) method.
  • Method Details

    • tryEncase

      default net.minecraft.world.ItemInteractionResult tryEncase(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack heldItem, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult ray)
      This method should be called in the BlockBehaviour.useItemOn(ItemStack, BlockState, Level, BlockPos, Player, InteractionHand, BlockHitResult) method.
    • playEncaseSound

      default void playEncaseSound(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)