Posted September 2, 201510 yr So I made the player able to walk on water (Runs every tick) if(world.getBlockState(player.getPosition().down()).getBlock() == Blocks.water){ if(player.motionY < 0){ player.posY += -player.motionY; player.motionY = 0.09; player.fallDistance = 0; ((EntityPlayerMP)player ).playerNetServerHandler.sendPacket(new S12PacketEntityVelocity(player)); } } But the player is very slow and can't jump. How do I fix this? Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.
September 2, 201510 yr player.onGround = true; "you seem to be THE best modder I've seen imo." ~spynathan ლ(́◉◞౪◟◉‵ლ
September 3, 201510 yr Author Ok the player is now sinking about halfway into the water, but is moving a little faster. Any more solutions? if(world.getBlockState(player.getPosition().down()).getBlock() == Blocks.water){ if(!world.isRemote){ if(player.motionY < 0){ player.onGround = true; player.posY += -player.motionY; player.motionY = 0.09; player.fallDistance = 0; ((EntityPlayerMP)player ).playerNetServerHandler.sendPacket(new S12PacketEntityVelocity(player)); } } } Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.
September 3, 201510 yr Since there is no easy support from minecraft to walk over water, I would suggest to either detect a jump/movement or use keybindings, and apply the correct speed, rotation, velocity, positions to the player. To make it 'smooth' you could use a flying mechanism (e.g. fly at the same level as water). Though think carefully about what should happen if a player hits for example a water fall (a non horizontal waterline) Projects: Discontinued: - N2ConfigAPI - Meachanical Crafting Table Latest: - CollectionUtils Coöperations: - InGameConfigManager
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.