@Environment(value=CLIENT) public class Mouse extends Object
Modifier and Type | Field and Description |
---|---|
private int |
activeButton |
private MinecraftClient |
client |
private int |
controlLeftTicks |
private double |
cursorDeltaX |
private double |
cursorDeltaY |
private boolean |
cursorLocked |
private SmoothUtil |
cursorXSmoother |
private SmoothUtil |
cursorYSmoother |
private double |
eventDeltaWheel |
private int |
field_1796 |
private double |
glfwTime |
private boolean |
hasResolutionChanged |
private double |
lastMouseUpdateTime |
private boolean |
leftButtonClicked |
private boolean |
middleButtonClicked |
private boolean |
rightButtonClicked |
private double |
x |
private double |
y |
Constructor and Description |
---|
Mouse(MinecraftClient client) |
Modifier and Type | Method and Description |
---|---|
double |
getX() |
double |
getY() |
boolean |
isCursorLocked() |
void |
lockCursor() |
private void |
method_29616(long long2,
List<Path> list) |
void |
method_30134() |
private void |
onCursorPos(long window,
double x,
double y) |
private void |
onMouseButton(long window,
int button,
int action,
int mods) |
private void |
onMouseScroll(long window,
double horizontal,
double vertical)
Called when a mouse is used to scroll.
|
void |
onResolutionChanged() |
void |
setup(long long2) |
void |
unlockCursor() |
void |
updateMouse() |
boolean |
wasLeftButtonClicked() |
boolean |
wasRightButtonClicked() |
private final MinecraftClient client
private boolean leftButtonClicked
private boolean middleButtonClicked
private boolean rightButtonClicked
private double x
private double y
private int controlLeftTicks
private int activeButton
private boolean hasResolutionChanged
private int field_1796
private double glfwTime
private final SmoothUtil cursorXSmoother
private final SmoothUtil cursorYSmoother
private double cursorDeltaX
private double cursorDeltaY
private double eventDeltaWheel
private double lastMouseUpdateTime
private boolean cursorLocked
public Mouse(MinecraftClient client)
private void onMouseButton(long window, int button, int action, int mods)
private void onMouseScroll(long window, double horizontal, double vertical)
window
- the window handlehorizontal
- the horizontal scroll distancevertical
- the vertical scroll distancepublic void setup(long long2)
private void onCursorPos(long window, double x, double y)
public void updateMouse()
public boolean wasLeftButtonClicked()
public boolean wasRightButtonClicked()
public double getX()
public double getY()
public void onResolutionChanged()
public boolean isCursorLocked()
public void lockCursor()
public void unlockCursor()
public void method_30134()