Jump to content

Recommended Posts

Posted

I'm trying to make a block that when the player is near it, they get a potion effect. Adding it when an entity collides with the block works, but I have yet to find a way to change the entity collision size of the block. I tried using

public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
    {
        float f = 0.525F;
        return AxisAlignedBB.getAABBPool().getAABB((double)par2 - f, (double)par3 - f, (double)par4 - f, (double)(par2 + f), (double)((float)(par3 + f)), (double)(par4 + f));
    }

But to no avail, that just kinda derped it and made it render huge but keep it's hitbox...

 

Any ideas on how to do this? Also i'm trying to avoid custom AABB's because i'm not familiar with how they work or how to use them other then that they select everything inside them somehow...

Creator of Metroid Cubed! Power Suits, Beams, Hypermode and more!

width=174 height=100http://i.imgur.com/ghgWmA3.jpg[/img]

Posted

Hi

 

I'd suggest using a TileEntity instead of messing with the Block.  Whenever I've tried changing block boundingboxes larger in the past it's been an awful headache.

 

Then in the updateEntity method on the server, check for nearby players and apply potion effects.

TileEntityBeacon does exactly that, check it out.

 

-TGG

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.