Interface IPickUpPutDownBlock

All Known Implementing Classes:
DoughBlock, RedstoneProgrammerBlock

public interface IPickUpPutDownBlock
A Block which can be instantly picked up and will always remove the Item when placed, even in Creative.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static void
    onLeftClickBlock(net.neoforged.neoforge.event.entity.player.PlayerInteractEvent.LeftClickBlock event)
     
    static net.minecraft.world.InteractionResult
    removeItemFromInventory(net.minecraft.world.item.context.BlockPlaceContext context, net.minecraft.world.InteractionResult result)
    This should be called in the place method of the corresponding BlockItem.
  • Method Details

    • removeItemFromInventory

      static net.minecraft.world.InteractionResult removeItemFromInventory(net.minecraft.world.item.context.BlockPlaceContext context, net.minecraft.world.InteractionResult result)
      This should be called in the place method of the corresponding BlockItem.
      Parameters:
      context -
      result - Usually just the super result of placing
    • onLeftClickBlock

      static void onLeftClickBlock(net.neoforged.neoforge.event.entity.player.PlayerInteractEvent.LeftClickBlock event)