Beginner Java Modding Problem...
Hello im trying to use Keyboard.isKeyDown to create a way to make it so if the button is pressed something will happen and if I press the button again it will stop. I have the basic concept worked out, and I HAD it working with another thing but for some reason this code won't work (im making mods for a Java game using Java Eclipse EE):
Code:
if(Keyboard.isKeyDown(36) && buttonpress==false){
buttonpress=true;
whattodo=!whattodo;
}
if(!Keyboard.isKeyDown(36)){
buttonpress=false;
}
if(whattodo=false){
moty=0.41999998688697815D;
}
if(whattodo=true){
moty=0.71999998688697815D;
}
whattodo and buttonpress are booleans and moty is a double. moty is the variable for MotionY. Later on in this code I use this (or something like it, its not the exact code) to call it
Code:
Public class Jump(){
MotionY = moty;
}
Im trying to make it so when I press "J" or J = true MotionY is .3 higher (A very noticable difference)