Package net.minecraft.item
Class ItemUseContext
java.lang.Object
net.minecraft.item.ItemUseContext
- Direct Known Subclasses:
BlockItemUseContext
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Hand
private final BlockRayTraceResult
private final ItemStack
private final World
private final PlayerEntity
-
Constructor Summary
ConstructorDescriptionItemUseContext
(PlayerEntity p_i50033_1_, Hand p_i50033_2_, BlockRayTraceResult p_i50033_3_) ItemUseContext
(World p_i50034_1_, PlayerEntity p_i50034_2_, Hand p_i50034_3_, ItemStack p_i50034_4_, BlockRayTraceResult p_i50034_5_) -
Method Summary
Modifier and TypeMethodDescriptiongetHand()
protected final BlockRayTraceResult
getLevel()
float
boolean
isInside()
boolean
-
Field Details
-
player
-
hand
-
hitResult
-
level
-
itemStack
-
-
Constructor Details
-
ItemUseContext
-
ItemUseContext
public ItemUseContext(World p_i50034_1_, @Nullable PlayerEntity p_i50034_2_, Hand p_i50034_3_, ItemStack p_i50034_4_, BlockRayTraceResult p_i50034_5_)
-
-
Method Details
-
getHitResult
-
getClickedPos
-
getClickedFace
-
getClickLocation
-
isInside
public boolean isInside() -
getItemInHand
-
getPlayer
-
getHand
-
getLevel
-
getHorizontalDirection
-
isSecondaryUseActive
public boolean isSecondaryUseActive() -
getRotation
public float getRotation()
-