Jump to content

Springboard - addVelocity() doesn't move player


lightblue

Recommended Posts

Hi everyone, first I must say I'm new to modding minecraft and new to Java.

I'm trying to create a new redstone powered block that works like a springboard. It's intended for adventure maps so it's indestructible.

 

My problem is that when the block is activated by the player(right clicking) everything works fine and the player is launched to the air

but when it's activated by redstone every other entity is launched(pigs, mobs, etc..) EXCEPT for the player.

Anyone can tell me what I'm doing wrong?

 

I'm working on minecraft version 1.4.7 if that helps.

 

Here is the block class code: http://paste.minecraftforge.net/view/3677cf49

 

Here is the problematic function:

private void BumpEntities(World world, int x, int y, int z)
{
    	List<Entity> list = world.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(x, y, z, x+1, y+1, z+1));
for(Entity entity : list)
{
	entity.addVelocity(0, Force, 0);
}
}

 

Link to comment
Share on other sites

I actually want any entity to be pushed up, so it's fine if it's not a player.

again, the problem is that the player does not move, I looked in debug the player is found and addVelocity() adds the right amount of motion

to the player entity and yet he does not move..

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.