Enum Class UseItemOnBlockEvent.UsePhase
java.lang.Object
java.lang.Enum<UseItemOnBlockEvent.UsePhase>
net.neoforged.neoforge.event.entity.player.UseItemOnBlockEvent.UsePhase
- All Implemented Interfaces:
Serializable
,Comparable<UseItemOnBlockEvent.UsePhase>
,Constable
- Enclosing class:
UseItemOnBlockEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionTheItem.useOn(net.minecraft.world.item.context.UseOnContext)
interaction.TheIItemExtension.onItemUseFirst(ItemStack, UseOnContext)
interaction. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic UseItemOnBlockEvent.UsePhase
Returns the enum constant of this class with the specified name.static UseItemOnBlockEvent.UsePhase[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ITEM_BEFORE_BLOCK
TheIItemExtension.onItemUseFirst(ItemStack, UseOnContext)
interaction. This is noop/PASS for most items, but some mods' items have interactions here. -
BLOCK
TheBlockBehaviour.useItemOn(net.minecraft.world.item.ItemStack, net.minecraft.world.level.block.state.BlockState, net.minecraft.world.level.Level, net.minecraft.core.BlockPos, net.minecraft.world.entity.player.Player, net.minecraft.world.InteractionHand, net.minecraft.world.phys.BlockHitResult)
interaction. Skipped if the player is sneaking and holding an item that skips the block while sneaking (most items). -
ITEM_AFTER_BLOCK
TheItem.useOn(net.minecraft.world.item.context.UseOnContext)
interaction.
-
-
Constructor Details
-
UsePhase
private UsePhase()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-