mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 11:05:40 +00:00
Clean up null issues, add more annotations (#3590)
This commit is contained in:
1 parent
43efa3cfc4
commit
c545b8ecd4
130 files changed
+629
-262
No files matched your search
@@ -22,6 +22,7 @@ package net.minecraftforge.client.settings;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraft.util.IntHashMap;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.EnumMap;
|
||||
@@ -38,6 +39,7 @@ public class KeyBindingMap
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public KeyBinding lookupActive(int keyCode)
|
||||
{
|
||||
KeyModifier activeModifier = KeyModifier.getActiveModifier();
|
||||
@@ -52,6 +54,7 @@ public class KeyBindingMap
|
||||
return getBinding(keyCode, KeyModifier.NONE);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private KeyBinding getBinding(int keyCode, KeyModifier keyModifier)
|
||||
{
|
||||
Collection<KeyBinding> bindings = map.get(keyModifier).lookup(keyCode);
|
||||
|
||||
Reference in new issue
Block a user