aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMouseHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMouseHelper.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMouseHelper.java23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMouseHelper.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMouseHelper.java
index 4d8df949..a89893b9 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMouseHelper.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMouseHelper.java
@@ -1,6 +1,25 @@
+/*
+ * Copyright (C) 2022 NotEnoughUpdates contributors
+ *
+ * This file is part of NotEnoughUpdates.
+ *
+ * NotEnoughUpdates is free software: you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * NotEnoughUpdates is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with NotEnoughUpdates. If not, see <https://www.gnu.org/licenses/>.
+ */
+
package io.github.moulberry.notenoughupdates.mixins;
-import io.github.moulberry.notenoughupdates.NEUEventListener;
+import io.github.moulberry.notenoughupdates.listener.RenderListener;
import net.minecraft.util.MouseHelper;
import org.lwjgl.input.Mouse;
import org.spongepowered.asm.mixin.Mixin;
@@ -12,7 +31,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public class MixinMouseHelper {
@Inject(method = {"ungrabMouseCursor"}, at = {@At("HEAD")}, cancellable = true)
public void ungrabMouseCursor(final CallbackInfo ci) {
- if (System.currentTimeMillis() - NEUEventListener.lastGuiClosed < 150L) {
+ if (System.currentTimeMillis() - RenderListener.lastGuiClosed < 150L) {
ci.cancel();
Mouse.setGrabbed(false);
}