I wanted to know if anyone else experienced this problem. This one portion of code in my game relies on a system.out.println statement to work. without it, it won't function properly
while(isladder){
t = Map.tiles[(int) (Player.x + 15 + ScrollManager.xoffset) / 32][(int) ((Player.y ) + ScrollManager.yoffset) / 32];
if(t.row == 3 && t.col == 5){
ScrollManager.dy = -.5;
System.out.println(t.row);
}else{
ScrollManager.nogravity = false;
}
}
This is in a thread that starts when someone hits the up key. It is a ladder for a 2d minecraft game I'm making. without the system.out.println code, the player will keep floating up in the air. with it, the player will stop at the top of the ladder like normal
(update) I fixed this just by adding a Thread.sleep(1) so that it runs smoother