Jump to content

Homing missle


Recommended Posts



I am making a mod that has a homing missile and im having trouble with the code, if someone could help me that would be GREAT.


thanks in advance


I'm planning to add homing missiles to my mod ICBM (which is a missile mod). Coding it is fairly simple. Constantly change target to a position and that's all.


On the side note, I don't suggest you to make another mod that adds explosives and stuff. There is already enough competition in this genre of mods.

Link to comment
Share on other sites

double x= (target.boundingBox.minX + (target.boundingBox.maxX - target.boundingBox.minX) / 2D) - posX;

double y = (target.boundingBox.minY + (target.boundingBox.maxY - target.boundingBox.minY) / 2D) - posY;

double z = (target.boundingBox.minZ + (target.boundingBox.maxZ - target.boundingBox.minZ) / 2D) - posZ;


setThrowableHeading(d, d1, d2, 1F, 0.0F);


i figured it out uses notch's code, was very frustrating

Link to comment
Share on other sites

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.

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.

  • Create New...

Important Information

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