Rewrote Camera Movement to be FPS consistent

In the future, CameraEntity.MAX_SPEED (and derived variables) can be modified to change the Camera Movement Speed and Acceleration.
This commit is contained in:
CrushedPixel
2015-06-03 02:30:40 +02:00
parent acdce121ba
commit 0cca67a552
5 changed files with 125 additions and 101 deletions

View File

@@ -10,6 +10,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ReportedException;
import net.minecraftforge.client.event.MouseEvent;
import org.lwjgl.LWJGLException;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
@@ -18,7 +19,8 @@ import java.lang.reflect.InvocationTargetException;
public class MinecraftTicker {
public static void runMouseKeyboardTick(Minecraft mc) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, IOException {
public static void runMouseKeyboardTick(Minecraft mc) throws IllegalAccessException, IllegalArgumentException,
InvocationTargetException, IOException, LWJGLException {
ReplayMod.mouseInputHandler.mouseEvent(new MouseEvent());
if(mc.thePlayer == null) return;
try {
@@ -201,6 +203,7 @@ public class MinecraftTicker {
}
}
}
net.minecraftforge.fml.common.FMLCommonHandler.instance().fireKeyInput();
}