use of mods.railcraft.common.items.ItemGoggles.GoggleAura in project Railcraft by Railcraft.
the class AuraKeyHandler method tick.
@SubscribeEvent
public void tick(TickEvent.ClientTickEvent event) {
if (Minecraft.getMinecraft().currentScreen instanceof GuiChat)
return;
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
for (Map.Entry<GoggleAura, KeyBinding> keyBinding : keyBindings.entrySet()) {
if (keyBinding.getValue().isPressed()) {
GoggleAura aura = keyBinding.getKey();
if (isAuraEnabled(aura)) {
activeAuras.remove(aura);
ChatPlugin.sendLocalizedChat(player, "gui.railcraft.aura.disable", "§5" + aura + "§7");
} else {
activeAuras.add(aura);
ChatPlugin.sendLocalizedChat(player, "gui.railcraft.aura.enable", "§5" + aura + "§7");
}
}
}
}
Aggregations