I have years of experience programming, even have a degree in computer science, but the whole gradle thing is quite new to me.
My objective is to create a "moon-like" gravity. Slow falling, bigger jumps, etc.
I have never done anything with forge prior to this, so I did lots of reading of the documentation and have a decent general understanding of things.
I am able to do things such as,
@SubscribeEvent
public void onJump(LivingEvent.LivingJumpEvent event) {
if(event.getEntity() instanceof Player) {
Player player = (Player) event.getEntity();
player.setHealth(player.getHealth() - 1);
}
}
Reading the docs I see a player#setMotion
I would like to do this - which should be possible based on docs
player.setMotion(player.getMotion().x, player.getMotion().y * MOON_GRAVITY_FACTOR, player.getMotion().z);
but this method, and some other classes and methods do not appear to exist.
At first I thought it was a version related issue, but that was proven untrue when I went back all the way to 1.17.1 and the issues persisted.
This project is on 1.20.2 and the only thing I did in the project was changing the mod id and versions. Nothing to do with mappings or anything of the sort.
Is there changes that I am unaware of?
or is there an issue with my project setup?
It is currently a default project straight from the website.
I really am entirely confused, I am sure it is something simple. I tried my hardest to find the answer prior to asking.