Package net.minecraft.client
Class Mouse
java.lang.Object
net.minecraft.client.Mouse
@Environment(CLIENT) public class Mouse extends Object
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description Mouse(MinecraftClient client)
-
Method Summary
Modifier and Type Method 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()
-
Field Details
-
client
-
leftButtonClicked
private boolean leftButtonClicked -
middleButtonClicked
private boolean middleButtonClicked -
rightButtonClicked
private boolean rightButtonClicked -
x
private double x -
y
private double y -
controlLeftTicks
private int controlLeftTicks -
activeButton
private int activeButton -
hasResolutionChanged
private boolean hasResolutionChanged -
field_1796
private int field_1796 -
glfwTime
private double glfwTime -
cursorXSmoother
-
cursorYSmoother
-
cursorDeltaX
private double cursorDeltaX -
cursorDeltaY
private double cursorDeltaY -
eventDeltaWheel
private double eventDeltaWheel -
lastMouseUpdateTime
private double lastMouseUpdateTime -
cursorLocked
private boolean cursorLocked
-
-
Constructor Details
-
Mouse
-
-
Method Details
-
onMouseButton
private void onMouseButton(long window, int button, int action, int mods) -
onMouseScroll
private void onMouseScroll(long window, double horizontal, double vertical)Called when a mouse is used to scroll.- Parameters:
window
- the window handlehorizontal
- the horizontal scroll distancevertical
- the vertical scroll distance
-
method_29616
-
setup
public void setup(long long2) -
onCursorPos
private void onCursorPos(long window, double x, double y) -
updateMouse
public void updateMouse() -
wasLeftButtonClicked
public boolean wasLeftButtonClicked() -
wasRightButtonClicked
public boolean wasRightButtonClicked() -
getX
public double getX() -
getY
public double getY() -
onResolutionChanged
public void onResolutionChanged() -
isCursorLocked
public boolean isCursorLocked() -
lockCursor
public void lockCursor() -
unlockCursor
public void unlockCursor() -
method_30134
public void method_30134()
-