Added prerequisites for future Camera Tilt feature
This commit is contained in:
@@ -657,7 +657,7 @@ public class GuiReplayOverlay extends Gui {
|
||||
private void addPlaceKeyframe() {
|
||||
Entity cam = mc.getRenderViewEntity();
|
||||
if(cam == null) return;
|
||||
ReplayHandler.addKeyframe(new PositionKeyframe(ReplayHandler.getRealTimelineCursor(), new Position(cam.posX, cam.posY, cam.posZ, cam.rotationPitch, cam.rotationYaw)));
|
||||
ReplayHandler.addKeyframe(new PositionKeyframe(ReplayHandler.getRealTimelineCursor(), new Position(cam.posX, cam.posY, cam.posZ, cam.rotationPitch, cam.rotationYaw, ReplayHandler.getCameraTilt())));
|
||||
}
|
||||
|
||||
private void addTimeKeyframe() {
|
||||
@@ -677,7 +677,7 @@ public class GuiReplayOverlay extends Gui {
|
||||
|
||||
private boolean isClick() {
|
||||
if(Mouse.isButtonDown(0)) {
|
||||
boolean bef = new Boolean(mouseDwn);
|
||||
boolean bef = mouseDwn;
|
||||
mouseDwn = true;
|
||||
return !bef;
|
||||
} else {
|
||||
|
||||
@@ -104,6 +104,14 @@ public class KeyInputHandler {
|
||||
|
||||
public void handleCustomKeybindings(KeyBinding kb, boolean found, int keyCode) {
|
||||
//Custom registered handlers
|
||||
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_ROTATE_CLOCKWISE) && (kb.isKeyDown() || kb.getKeyCode() == keyCode) && !found) {
|
||||
ReplayHandler.addCameraTilt(1);
|
||||
}
|
||||
|
||||
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_ROTATE_COUNTERCLOCKWISE) && (kb.isKeyDown() || kb.getKeyCode() == keyCode) && !found) {
|
||||
ReplayHandler.addCameraTilt(-1);
|
||||
}
|
||||
|
||||
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_THUMBNAIL) && (kb.isPressed() || kb.getKeyCode() == keyCode) && !found) {
|
||||
TickAndRenderListener.requestScreenshot();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user