1.21.3 update

This commit is contained in:
LexManos committed 2024-10-25 18:04:34 -07:00
1 parent c22589b5b3
commit 086bcb7148
806 files changed
+6314 -10501

No files matched your search

@@ -8,22 +8,19 @@ package net.minecraftforge.client.settings;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.Screen;
public enum KeyConflictContext implements IKeyConflictContext
{
public enum KeyConflictContext implements IKeyConflictContext {
/**
* Universal key bindings are used in every context and will conflict with any other context.
* Key Bindings are universal by default.
*/
UNIVERSAL {
@Override
public boolean isActive()
{
public boolean isActive() {
return true;
}
@Override
public boolean conflicts(IKeyConflictContext other)
{
public boolean conflicts(IKeyConflictContext other) {
return true;
}
},
@@ -32,15 +29,14 @@ public enum KeyConflictContext implements IKeyConflictContext
* Gui key bindings are only used when a {@link Screen} is open.
*/
GUI {
@SuppressWarnings("resource")
@Override
public boolean isActive()
{
public boolean isActive() {
return Minecraft.getInstance().screen != null;
}
@Override
public boolean conflicts(IKeyConflictContext other)
{
public boolean conflicts(IKeyConflictContext other) {
return this == other;
}
},
@@ -50,14 +46,12 @@ public enum KeyConflictContext implements IKeyConflictContext
*/
IN_GAME {
@Override
public boolean isActive()
{
public boolean isActive() {
return !GUI.isActive();
}
@Override
public boolean conflicts(IKeyConflictContext other)
{
public boolean conflicts(IKeyConflictContext other) {
return this == other;
}
}