It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.item.UseOnContext;

Link to getClickLocation

Name: getClickLocation

Return Type: Vec3

ZenScript
Copy
// UseOnContext.getClickLocation() as Vec3

myUseOnContext.getClickLocation();

Name: getClickedFace

Return Type: Direction

ZenScript
Copy
// UseOnContext.getClickedFace() as Direction

myUseOnContext.getClickedFace();

Name: getClickedPos

Return Type: BlockPos

ZenScript
Copy
// UseOnContext.getClickedPos() as BlockPos

myUseOnContext.getClickedPos();

Name: getHand

Return Type: InteractionHand

ZenScript
Copy
// UseOnContext.getHand() as InteractionHand

myUseOnContext.getHand();

Link to getHorizontalDirection

Name: getHorizontalDirection

Return Type: Direction

ZenScript
Copy
// UseOnContext.getHorizontalDirection() as Direction

myUseOnContext.getHorizontalDirection();

Name: getItemInHand

Return Type: ItemStack

ZenScript
Copy
// UseOnContext.getItemInHand() as ItemStack

myUseOnContext.getItemInHand();

Name: getLevel

Return Type: Level

ZenScript
Copy
// UseOnContext.getLevel() as Level

myUseOnContext.getLevel();

Name: getPlayer

Return Type: Player?

ZenScript
Copy
// UseOnContext.getPlayer() as Player?

myUseOnContext.getPlayer();

Name: getRotation

Return Type: float

ZenScript
Copy
// UseOnContext.getRotation() as float

myUseOnContext.getRotation();

Name: isInside

Return Type: boolean

ZenScript
Copy
// UseOnContext.isInside() as boolean

myUseOnContext.isInside();

Link to isSecondaryUseActive

Name: isSecondaryUseActive

Return Type: boolean

ZenScript
Copy
// UseOnContext.isSecondaryUseActive() as boolean

myUseOnContext.isSecondaryUseActive();
名称类型可获得可设置
名称
clickLocation
类型
Vec3
可获得
true
可设置
false
名称
clickedFace
类型
Direction
可获得
true
可设置
false
名称
clickedPos
类型
BlockPos
可获得
true
可设置
false
名称
hand
类型
InteractionHand
可获得
true
可设置
false
名称
horizontalDirection
类型
Direction
可获得
true
可设置
false
名称
isInside
类型
布尔值
可获得
true
可设置
false
名称
isSecondaryUseActive
类型
布尔值
可获得
true
可设置
false
名称
itemInHand
类型
物品应用
可获得
true
可设置
false
名称
level
类型
Level
可获得
true
可设置
false
名称
player
类型
Player?
可获得
true
可设置
false
名称
rotation
类型
float
可获得
true
可设置
false