net.minecraft.item

public class ItemUsageContext

net.minecraft.world.item.context.UseOnContext
net.minecraft.class_1838
net.minecraft.item.ItemUsageContext

Field summary

Modifier and TypeField
private final PlayerEntity
player
field_8942
player
private final Hand
hand
field_19176
hand
private final BlockHitResult
hitResult
field_17543
hit
private final World
level
field_8945
world
private final ItemStack
itemStack
field_8941
stack

Constructor summary

ModifierConstructor
public (PlayerEntity player, Hand hand, BlockHitResult hit)
protected (World world, PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hit)

Method summary

Modifier and TypeMethod
protected final BlockHitResult
getHitResult()
method_30344()
getHitResult()
public BlockPos
getClickedPos()
method_8037()
getBlockPos()
public Direction
getClickedFace()
method_8038()
getSide()
public Vec3d
getClickLocation()
method_17698()
getHitPos()
public boolean
isInside()
method_17699()
hitsInsideBlock()
public ItemStack
getItemInHand()
method_8041()
getStack()
public PlayerEntity
getPlayer()
method_8036()
getPlayer()
public Hand
getHand()
method_20287()
getHand()
public World
getLevel()
method_8045()
getWorld()
public Direction
getHorizontalDirection()
method_8042()
getHorizontalPlayerFacing()
public boolean
isSecondaryUseActive()
method_8046()
shouldCancelInteraction()
public float
getRotation()
method_8044()
getPlayerYaw()