unbind keys by default (#90)

* unbind all keys by default

* show "EnderIO - Tools" instead of "Tools" in the controls menu

* check if keybind is pressed first
This commit is contained in:
Alexdoru authored and GitHub committed 2023-01-27 20:21:27 +01:00
1 parent e03011cd40
commit d9b99f6888
13 files changed
+39 -44

No files matched your search

@@ -55,22 +55,22 @@ public class KeyTracker {
public KeyTracker() {
glideKey = new KeyBinding(
EnderIO.lang.localize("keybind.glidertoggle"),
Keyboard.KEY_G,
Keyboard.KEY_NONE,
EnderIO.lang.localize("category.darksteelarmor"));
ClientRegistry.registerKeyBinding(glideKey);
soundDetectorKey = new KeyBinding(
EnderIO.lang.localize("keybind.soundlocator"),
Keyboard.KEY_L,
Keyboard.KEY_NONE,
EnderIO.lang.localize("category.darksteelarmor"));
ClientRegistry.registerKeyBinding(soundDetectorKey);
nightVisionKey = new KeyBinding(
EnderIO.lang.localize("keybind.nightvision"),
Keyboard.KEY_P,
Keyboard.KEY_NONE,
EnderIO.lang.localize("category.darksteelarmor"));
ClientRegistry.registerKeyBinding(nightVisionKey);
gogglesKey = new KeyBinding(
EnderIO.lang.localize("keybind.gogglesofrevealing"),
Keyboard.KEY_R,
Keyboard.KEY_NONE,
EnderIO.lang.localize("category.darksteelarmor"));
ClientRegistry.registerKeyBinding(gogglesKey);
@@ -94,12 +94,12 @@ public class KeyTracker {
yetaWrenchMode = new KeyBinding(
EnderIO.lang.localize("keybind.yetawrenchmode"),
Keyboard.KEY_Y,
Keyboard.KEY_NONE,
EnderIO.lang.localize("category.tools"));
ClientRegistry.registerKeyBinding(yetaWrenchMode);
magnetKey = new KeyBinding(
EnderIO.lang.localize("keybind.magnet"), Keyboard.CHAR_NONE, EnderIO.lang.localize("category.tools"));
EnderIO.lang.localize("keybind.magnet"), Keyboard.KEY_NONE, EnderIO.lang.localize("category.tools"));
ClientRegistry.registerKeyBinding(magnetKey);
}
@@ -155,38 +155,38 @@ public class KeyTracker {
}
private void handleJump() {
if (!JumpUpgrade.isEquipped(Minecraft.getMinecraft().thePlayer)) {
return;
}
if (jumpKey.isPressed()) {
if (!JumpUpgrade.isEquipped(Minecraft.getMinecraft().thePlayer)) {
return;
}
toggleDarkSteelController(Type.JUMP, "darksteel.upgrade.jump");
}
}
private void handleSpeed() {
if (!SpeedUpgrade.isEquipped(Minecraft.getMinecraft().thePlayer)) {
return;
}
if (speedKey.isPressed()) {
if (!SpeedUpgrade.isEquipped(Minecraft.getMinecraft().thePlayer)) {
return;
}
toggleDarkSteelController(Type.SPEED, "darksteel.upgrade.speed");
}
}
private void handleStepAssist() {
if (!JumpUpgrade.isEquipped(Minecraft.getMinecraft().thePlayer)) {
return;
}
if (stepAssistKey.isPressed()) {
if (!JumpUpgrade.isEquipped(Minecraft.getMinecraft().thePlayer)) {
return;
}
toggleDarkSteelController(Type.STEP_ASSIST, "darksteel.upgrade.stepAssist");
}
}
private void handleGoggles() {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
if (!GogglesOfRevealingUpgrade.isUpgradeEquipped(player)) {
return;
}
if (gogglesKey.isPressed()) {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
if (!GogglesOfRevealingUpgrade.isUpgradeEquipped(player)) {
return;
}
boolean isActive = !DarkSteelItems.itemDarkSteelHelmet.isGogglesUgradeActive();
sendEnabledChatMessage("darksteel.upgrade.gogglesOfRevealing", isActive);
DarkSteelItems.itemDarkSteelHelmet.setGogglesUgradeActive(isActive);
@@ -235,20 +235,18 @@ public class KeyTracker {
}
private void handleGlide() {
if (!DarkSteelController.instance.isGliderUpgradeEquipped(Minecraft.getMinecraft().thePlayer)) {
return;
}
if (glideKey.isPressed()) {
if (glideKey.isPressed()
&& DarkSteelController.instance.isGliderUpgradeEquipped(Minecraft.getMinecraft().thePlayer)) {
toggleDarkSteelController(Type.GLIDE, "darksteel.upgrade.glider");
}
}
private void handleNightVision() {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
if (!DarkSteelController.instance.isNightVisionUpgradeOrEnchEquipped(player)) {
return;
}
if (nightVisionKey.isPressed()) {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
if (!DarkSteelController.instance.isNightVisionUpgradeOrEnchEquipped(player)) {
return;
}
boolean isActive = !DarkSteelController.instance.isNightVisionActive();
if (isActive) {
player.worldObj.playSound(
@@ -276,10 +274,7 @@ public class KeyTracker {
public boolean isSoundDetectorUpgradeEquipped(EntityClientPlayerMP player) {
ItemStack helmet = player.getEquipmentInSlot(4);
SoundDetectorUpgrade upgrade = SoundDetectorUpgrade.loadFromItem(helmet);
if (upgrade == null) {
return false;
}
return true;
return upgrade != null;
}
public KeyBinding getYetaWrenchMode() {
@@ -1216,7 +1216,7 @@ enderio.weatherObelisk.fuelTank=Barometric Flux Tank
enchantment.enderio.soulBound=Soulbound
description.enchantment.enderio.soulBound=Prevents item from being lost on death
enderio.category.darksteelarmor=Dark Steel Armor
enderio.category.tools=Tools
enderio.category.tools=EnderIO - Tools
enderio.keybind.glidertoggle=Glider Toggle
enderio.keybind.gogglesofrevealing=Goggles of Revealing
enderio.keybind.nightvision=Night Vision
@@ -1107,7 +1107,7 @@ enderio.config.spawner.tooltip=Mir sind die geistreichen Tooltips ausgegangen
#Keybinds/Waila/NEI/Tooltips
enderio.category.darksteelarmor=Dunkelstahlrüstung
enderio.category.tools=Werkzeuge
enderio.category.tools=EnderIO - Werkzeuge
enderio.keybind.glidertoggle=Gleiterschaltung
enderio.keybind.gogglesofrevealing=Brille der Enthüllung
enderio.keybind.nightvision=Nachtsicht
@@ -1375,7 +1375,7 @@ enderio.config.spawner.tooltip=I ran out of witty tooltips.
#Keybinds/Waila/NEI/Tooltips
enderio.category.darksteelarmor=Dark Steel Armor
enderio.category.tools=Tools
enderio.category.tools=EnderIO - Tools
enderio.keybind.glidertoggle=Glider Toggle
enderio.keybind.gogglesofrevealing=Goggles of Revealing
enderio.keybind.nightvision=Night Vision
@@ -976,7 +976,7 @@ enderio.config.spawner.tooltip=Me he quedado sin descripciones ingeniosas.
#Keybinds/Waila/NEI/Tooltips
enderio.category.darksteelarmor=Armadura de Acero Oscuro
enderio.category.tools=Herramientas
enderio.category.tools=EnderIO - Herramientas
enderio.keybind.glidertoggle=Activar/Desactivar Planeador
enderio.keybind.gogglesofrevealing=Gafas de Revelación
enderio.keybind.nightvision=Visión Nocturna
@@ -978,7 +978,7 @@ enderio.config.spawner.tooltip=Me he quedado sin descripciones ingeniosas.
#Keybinds/Waila/NEI/Tooltips
enderio.category.darksteelarmor=Armadura de Acero Oscuro
enderio.category.tools=Herramientas
enderio.category.tools=EnderIO - Herramientas
enderio.keybind.glidertoggle=Activar/Desactivar Planeador
enderio.keybind.gogglesofrevealing=Gafas de Revelación
enderio.keybind.nightvision=Visión Nocturna
@@ -976,7 +976,7 @@ enderio.config.spawner.tooltip=Me he quedado sin descripciones ingeniosas.
#Keybinds/Waila/NEI/Tooltips
enderio.category.darksteelarmor=Armadura de Acero Oscuro
enderio.category.tools=Herramientas
enderio.category.tools=EnderIO - Herramientas
enderio.keybind.glidertoggle=Activar/Desactivar Planeador
enderio.keybind.gogglesofrevealing=Gafas de Revelación
enderio.keybind.nightvision=Visión Nocturna
@@ -976,7 +976,7 @@ enderio.config.spawner.tooltip=Me he quedado sin descripciones ingeniosas.
#Keybinds/Waila/NEI/Tooltips
enderio.category.darksteelarmor=Armadura de Acero Oscuro
enderio.category.tools=Herramientas
enderio.category.tools=EnderIO - Herramientas
enderio.keybind.glidertoggle=Activar/Desactivar Planeador
enderio.keybind.gogglesofrevealing=Gafas de Revelación
enderio.keybind.nightvision=Visión Nocturna
@@ -976,7 +976,7 @@ enderio.config.spawner.tooltip=Me he quedado sin descripciones ingeniosas.
#Keybinds/Waila/NEI/Tooltips
enderio.category.darksteelarmor=Armadura de Acero Oscuro
enderio.category.tools=Herramientas
enderio.category.tools=EnderIO - Herramientas
enderio.keybind.glidertoggle=Activar/Desactivar Planeador
enderio.keybind.gogglesofrevealing=Gafas de Revelación
enderio.keybind.nightvision=Visión Nocturna
@@ -993,7 +993,7 @@ enderio.config.spawner.tooltip=Je suis a cours d'infobulles marrantes.
#Keybinds/Waila/NEI/Tooltips
enderio.category.darksteelarmor=Armure d'Acier Sombre
enderio.category.tools=Outils
enderio.category.tools=EnderIO - Outils
enderio.keybind.glidertoggle=Mode Planeur
enderio.keybind.gogglesofrevealing=Lunettes de Révélation
enderio.keybind.nightvision=Vision Nocturne
@@ -1289,7 +1289,7 @@ enderio.config.spawner.tooltip=У меня закончились остроум
#Keybinds/Waila/NEI/Tooltips
enderio.category.darksteelarmor=Броня из тёмной стали
enderio.category.tools=Инструменты
enderio.category.tools=EnderIO - Инструменты
enderio.keybind.glidertoggle=Переключить планер
enderio.keybind.gogglesofrevealing=Очки откровения
enderio.keybind.nightvision=Ночное зрение
@@ -1369,7 +1369,7 @@ enderio.config.spawner.tooltip=我已经想不出什么有趣的提示文本了.
#Keybinds/Waila/NEI/Tooltips
enderio.category.darksteelarmor=玄铁护甲
enderio.category.tools=工具
enderio.category.tools=EnderIO - 工具
enderio.keybind.glidertoggle=滑翔开关
enderio.keybind.gogglesofrevealing=揭示护目镜
enderio.keybind.nightvision=夜视
@@ -1391,4 +1391,4 @@ enderio.tooltip.oredict=矿物辞典:
enderio.tooltip.meta=Meta:
enderio.tooltip.uid=UID:
enderio.tooltip.anvilupgrades=铁砧升级:
enderio.waila.config.hiddenfacades=隐形栅栏
enderio.waila.config.hiddenfacades=隐形栅栏
@@ -1225,7 +1225,7 @@ enderio.gui.weather.requiredfluid=Required Fluid: %s L
enderio.weatherObelisk.fuelTank=Barometric Flux Tank
description.enchantment.enderio.soulBound=Prevents item from being lost on death
enderio.category.darksteelarmor=Dark Steel Armor
enderio.category.tools=Tools
enderio.category.tools=EnderIO - Tools
enderio.keybind.glidertoggle=Glider Toggle
enderio.keybind.gogglesofrevealing=Goggles of Revealing
enderio.keybind.nightvision=Night Vision