Package com.petrolpark.core.world.block
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 MethodsModifier and TypeMethodDescriptionstatic voidonLeftClickBlock(net.neoforged.neoforge.event.entity.player.PlayerInteractEvent.LeftClickBlock event) static net.minecraft.world.InteractionResultremoveItemFromInventory(net.minecraft.world.item.context.BlockPlaceContext context, net.minecraft.world.InteractionResult result) This should be called in theplacemethod 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 theplacemethod 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)
-