Jump to content

Walking on water


yanksrock1019

Recommended Posts

Could it be because it's on the server tick side and not client side

Try simply using (please not you will not be able to jump while walking on water due to the nature of setting the Y to 0 :/)

if(world.getBlock(x, y-1, z).getMaterial() == Material.water){
player.motionY = 0.0D;
}

 

Image(there should atleast be one):

 

HkB5Omr.png

 

If I helped please press the Thank You button.

Link to comment
Share on other sites

Thank you so much!  So is there absolutely no way to allow me to jump

 

Not jumping as on land but you can add a check to see if the jump button is pressed and if so temporary disable it while you're pressing the jump keybind just replace player.motionY = 0.0D with this(it will also enable you to get onto land again without any problems(i.e. before you would have to find land at the same height w/o it)):

if(!Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed()){
player.motionY = 0.0D;
}

If I helped please press the Thank You button.

Link to comment
Share on other sites

I have added this else if statement to let you jump out of the water

			if(flag && e.motionY < 0.0D){
			if(!Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed()){
			e.motionY = 0.0D; 
		}else if(Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed()){
			e.motionY = 0.5D;
		}

Been modding for a year now. Not a pro but I know my way around pretty well. As everyone else, I'm learning too.

Link to comment
Share on other sites

However, now whenever I walk on water with the boots minecraft gives me an error that says "Illegal stance."

 

I think that means that you have a position outside of the world or something like that.  What is your code for walking on water look like now?  I suspect you're adjusting the Y position to some value outside the world.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.