Jump to content

[1.8.9] Making the player (clientside only) slow down


Recommended Posts

Posted

Hey,

as you can read from the title i want to slow the player down, using my clientside mod.

So far i tried changing the player capability, motionX/motionZ and giving the player slowness. Either i did something wrong when testing or those dont work in this scenario.

 

Thanks in advance.

Posted

How are you attempting to give the player slowness? I have not tested it, but the following code should work:

Minecraft.getMinecraft().thePlayer.addPotionEffect(new PotionEffect(Potion.getPotionById(2), 1));

Of course, instead of Minecraft.getMinecraft().thePlayer, you would use a given reference to an EntityPlayer if possible.

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.