Jump to content

Litematica Mod (1.21.1, 1.21) – New Modern Schematic Mod


Recommended Posts

~

you need to detect all the entities in front of the player

then trace a line betwen the player eye position and where the ray trace vector hits

Vec3 vi = pe.getEyePosition();
Vec3 vo = pe.getLookAngle();//is a delta  
float dist = 6.0F;
Vec3 vh;
vh = new Vec3( (vi.x + (vo.x * dist) ), (vi.y + (vo.y * dist) ), (vi.z + (vo.z * dist) ) );

and check from the entites detected whitch one hitbox touch the line and then gets the closer to the player that one is the one you are looking at 
the code you need is inside the arrow entity you have to extract from it and make your thing 

 

 

Link to comment
Share on other sites

  • Topcloud changed the title to Litematica Mod (1.21.1, 1.21) – New Modern Schematic Mod

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.