Jump to content

Recommended Posts

Posted

This probably isn't the most efficient way (plz dont yell at me draco/ben/someone):

//Put this in a ticker
if(player.isWet()) {
//Set to your speed
} else {
//Set to default speed
}

Kain

Posted

If you use an attribute modifier, you will have to be sure to remove it once the player is out of the water. A much simpler method is to just multiply the player's current motion by a factor:

float f = whatever value you want, maybe 2.0F;
player.motionX *= f;
player.motionZ *= f;

You can multiply the Y motion as well, but generally x and z are what you want.

Posted

It not work ....

 

 

 

if(player.getCurrentItemOrArmor(1) != null){

ItemStack boots = player.getCurrentItemOrArmor(1);

if(boots.getItem() == Basic.Flippers){

if(player.isInWater()) {

                                  float f = 2.0F;

player.motionX *= f;

player.motionZ *= f;

}

}

}

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.