IRayTraceResult
Link to iraytraceresult
When a player is looking or clicking at something, they fire a ray that goes until it hits what it needs to hit, or misses.
The result of such a hit is an IRayTraceResult object.
导入类
Link to 导入类
It might be required to import the class to avoid errors.
import crafttweaker.world.IRayTraceResult
ZenGetters
Link to zengetters
All you can do is retrieve information from these objects, here's which:
Be careful though, since all getters that do not return a bool can return null
!
name(名称) | 类型 |
---|---|
name(名称) isMiss | 类型 bool |
name(名称) isBlock | 类型 bool |
name(名称) blockPos | 类型 IBlockPos |
name(名称) sideHit | 类型 IFacing |
Deprecated ZenGetters
Link to deprecated-zengetters
These getters won't actually return anything useful because there isn't a reliable way to raytrace blocks and entities.
name(名称) | 类型 | return value |
---|---|---|
name(名称) isEntity | 类型 bool | return value always false |
name(名称) entity | 类型 IEntity | return value always null |