(1.16.5 MCP) ray trace entity

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

soday

Member
Sep 30, 2022
4
0
1
27
so i have a code that ray trace entity but just like 7 blocks away(i cant manage the raytrace distance) and i want to know if there is a better way to do it (if i can manage the detecting distance IS BETTER)

RayTraceResult entityResult = Minecraft.getInstance().objectMouseOver;
if(entityResult.getType() == RayTraceResult.Type.ENTITY) {
Entity lookedEntity = ((EntityRayTraceResult)entityResult).getEntity();
lookedEntity.DOSOMETHINGWITHLOOKEDENTITY;
}
)
How To Enable Ray Tracing in Minecraft
 
upload_2022-11-2_1-31-9.png
 
Status
Not open for further replies.