Jump to content

[1.7.10]Attracting mobs to a block!


Recommended Posts

Hello, I am making a mod that will have a block that will have a block that certain mobs get attracted to and go near the block. The issue I am facing is that I need to be able to detect if a mob is within range of this block so I can add a task to its ai to come near the block. The issue is that for this to happen I need to know how to use aabb and I have not worked with them much, I know the basic functionality, but I have not worked with them. So I was wondering if there is a tutorial that could help me with aabbs in Minecraft. I have googled this before, but the implementations of aabb seem different than the way it is implemented in Minecraft. (Note I could be stupid and be wrong, but that was my first impression of this) All help is appreciated, Thank You.

Don't be afraid to ask question when modding, there are no stupid question! Unless you don't know java then all your questions are stupid!

Link to comment
Share on other sites

AABB is simply a set of points containing the start and end coordinate in each of the cardinal axes. So, it represents a quadrilateral in Minecraft space.

An Entity maybe inside that box or colliding with that box or outside it completely.

Nothing hard to understand there.

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.