Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • help with player ascend speed
The update for 1.13 is being worked on - please be patient. (Updated 02/19/19)
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 1
Streamy

help with player ascend speed

Started by Streamy, July 2, 2018

4 posts in this topic

Streamy    0

Streamy

Streamy    0

  • Tree Puncher
  • Streamy
  • Members
  • 0
  • 2 posts
  • Report post
Posted July 2, 2018

So I've just started working with mods and I'm relatively new to Java so I would like to keep the "LEARN JAVA" comments to minimal, This is more of a question than a support thread but 

I'm trying to run a command that makes a player ascend at a slow speed 100 blocks upwards. I must admit i'm still learning and I may look like an idiot to some of you but when i use player.motionY It sends me upwards only a few blocks (Based on the value)

I want to know how i would make a player ascend on the Y axis slowly at a constant rate and stop after ascending 100 blocks. 

Thanks anyone who can help!

Share this post


Link to post
Share on other sites

aw_wolfe    13

aw_wolfe

aw_wolfe    13

  • Stone Miner
  • aw_wolfe
  • Members
  • 13
  • 90 posts
  • Report post
Posted July 2, 2018

one simple way, not sure if works with what you are trying to do, but if you add a levitation potion effect, this should accomplish the slow rise, just set the duration to make the player rise higher.

 

Otherwise, I think you'd have to catch the event PlayerTickEvent and check to see if effect wanted, deal with storing the initial block pos, and storing whether effect is on/off --- should do with capabilities

Share this post


Link to post
Share on other sites

Streamy    0

Streamy

Streamy    0

  • Tree Puncher
  • Streamy
  • Members
  • 0
  • 2 posts
  • Report post
Posted July 2, 2018
11 minutes ago, aw_wolfe said:

one simple way, not sure if works with what you are trying to do, but if you add a levitation potion effect, this should accomplish the slow rise, just set the duration to make the player rise higher.

 

Otherwise, I think you'd have to catch the event PlayerTickEvent and check to see if effect wanted, deal with storing the initial block pos, and storing whether effect is on/off --- should do with capabilities

Sorry, I don't think I was clear in what i wanted to do. I was hoping to set the player in fly and have the player ascend upward. I am able to set the player into fly and have them ascend using player.motionY but they either ascend slowly and not for long or they go the proper distance but ascend much too fast. I just wanted to know if there was a way to have a player ascend while flying at a constant rate.

Share this post


Link to post
Share on other sites

aw_wolfe    13

aw_wolfe

aw_wolfe    13

  • Stone Miner
  • aw_wolfe
  • Members
  • 13
  • 90 posts
  • Report post
Posted July 2, 2018

if you are setting the position, you could try and set the velocity and add to the y value. Think you also need call velocitychanged to cause an update to the client.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 1
Go To Topic Listing Modder Support

  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • LordTSI
      cant make modded server

      By LordTSI · Posted 27 minutes ago

      java version "1.8.0_201"
      Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
      Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode) i got it from the forge website
    • LexManos
      No Values in ForgeRegistries.ENTITIES 1.13.2

      By LexManos · Posted 29 minutes ago

      Yes, it worked in the version of Forge from before you posted. Please be sure you're on the latest version before posting.
    • LexManos
      MinecraftForge JSON API 404 Not Found

      By LexManos · Posted 30 minutes ago

      Many systems exist, the fat json file has long been the wrong way to get this information. You should make your usecase better known. If it's actually good then we can advise you how to do it now.

      But yes, Don't auto-download Forge. Don't use the giant json file.
    • IceMetalPunk
      1.13.2 - No Console Output?

      By IceMetalPunk · Posted 1 hour ago

      Hm... the latest version won't build at all. I've gotten everything setup for Eclipse, and the project imported into Eclipse, but there are no configurations. When I try to run the Gradle "build" task, it fails, because it's looking in my JRE folder instead of my JDK folder. My JAVA_HOME environment variables are set to point to the JDK directory... is there somewhere else I need to change a path definition?
    • Choonster
      [1.12.2] Remapping IBlockState -> IBlockState

      By Choonster · Posted 1 hour ago

      I have a DataFixer designed to flatten blocks in preparation for 1.13 here (the flattening definitions are initialised here). You should be able to use it to achieve this remapping.   If you decide to use it, make sure you understand how it works first.
  • Topics

    • LordTSI
      2
      cant make modded server

      By LordTSI
      Started 5 hours ago

    • MrMarnic
      7
      No Values in ForgeRegistries.ENTITIES 1.13.2

      By MrMarnic
      Started Wednesday at 09:21 PM

    • BloomCake
      3
      MinecraftForge JSON API 404 Not Found

      By BloomCake
      Started 2 hours ago

    • IceMetalPunk
      4
      1.13.2 - No Console Output?

      By IceMetalPunk
      Started 1 hour ago

    • SaltyBrownie18
      1
      [1.12.2] Remapping IBlockState -> IBlockState

      By SaltyBrownie18
      Started 10 hours ago

  • Who's Online (See full list)

    • DavidM
    • zbigg007
    • jaf04
    • gengsa
    • PulseBeat_02
    • Tyler0421
    • Choonster
    • IceMetalPunk
    • crackedEgg
    • wally123
    • tokuhausu
    • ItHurtsLikeHell
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • help with player ascend speed
  • Theme
  • Contact Us

Copyright © 2017 ForgeDevelopment LLC Powered by Invision Community