Class SAxeStrippableEvent

java.lang.Object
net.neoforged.bus.api.Event
net.lcc.sollib.event.SAxeStrippableEvent
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent

public class SAxeStrippableEvent extends net.neoforged.bus.api.Event implements net.neoforged.bus.api.ICancellableEvent
SAxeStrippableEvent is fired when determining the stripping result for a Block.

This event is fired from AxeItemMixin.getSolStrippingState(BlockState, CallbackInfoReturnable).

This event is ICancellableEvent to prevent later handlers from changing the value.

This event does not have a result.

This event is fired on the NeoForge.EVENT_BUS.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SAxeStrippableEvent(@NotNull net.minecraft.world.level.block.Block block)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull net.minecraft.world.level.block.Block
    Get the Block under examination.
    @Nullable net.minecraft.world.level.block.Block
    The resulting value of this event, the stripping result for the Block.
    boolean
     
    void
    setStrippingResult(net.minecraft.world.level.block.Block result)
    Set the stripping result for the given Block.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.neoforged.bus.api.ICancellableEvent

    isCanceled, setCanceled
  • Constructor Details

    • SAxeStrippableEvent

      public SAxeStrippableEvent(@NotNull @NotNull net.minecraft.world.level.block.Block block)
  • Method Details

    • getBlock

      @NotNull public @NotNull net.minecraft.world.level.block.Block getBlock()
      Get the Block under examination.
    • setStrippingResult

      public void setStrippingResult(net.minecraft.world.level.block.Block result)
      Set the stripping result for the given Block.
    • getStrippingResult

      @Nullable public @Nullable net.minecraft.world.level.block.Block getStrippingResult()
      The resulting value of this event, the stripping result for the Block.
    • hasStrippingResult

      public boolean hasStrippingResult()