Jump to content

[1.12.2] Detecting obstacle in entity path


fcelon

Recommended Posts

Hello,

I would like to improve creepers a little by giving them ability to blow up obstacles in their path. I siplmy want them t blow up if there are some blocks in the way preventing them from reaching the player. However, I don't know how to detect that.

Thanks for any help.

Link to comment
Share on other sites

It would be kind of tricky because path finding works around the blocks, so in a sense there is never a block in the path. Now if you mean to blow things up in a straight line to the target player, that is possible. Just ray trace along the vector between the creeper and the target and blow things up along the way. However I have made a similar entity in the past and it is really over powered and not as much fun as it sounds. But go ahead and try it.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.

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.