Package net.lcc.sollib.event
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 -
Method Summary
Modifier and TypeMethodDescription@NotNull net.minecraft.world.level.block.BlockgetBlock()Get the Block under examination.@Nullable net.minecraft.world.level.block.BlockThe resulting value of this event, the stripping result for the Block.booleanvoidsetStrippingResult(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, waitMethods 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()
-