Hello, I need help with making a key bind that when you press "n" it turns the brightness up a lot to easily see in the darkest cave and also put up a transparent green screen like night vision goggles. I am using ModLoader.
public class mod_Nightvision extends BaseMod
{
private KeyBinding NewKeybind = new KeyBinding("Toggle Night Vision", Keyboard.KEY_KEY_N);
public mod_Nightvision
{ ModLoader.registerKey(this, this.Whatever, false);
ModLoader.addLocalization("Toggle Night Vision", "Toggle Night Vision");
}
public void keyboardEvent(KeyBinding keybinding)
{
if(keybinding == this.Whatever){
//Do Something.
}
}
public void load()
{
}
public String getVersion()
{
return "1.2.5";
}
}
And to open a NightVision overlay look for in this topic:
http://www.minecraftforum.net/topic/538183-help-rendering-a-new-overlay-modloader/
Thank you so much for finally replying! But what is the "Whatever" there for?
public class mod_Nightvision extends BaseMod
{
private KeyBinding NewKeybind = new KeyBinding("Toggle Night Vision", Keyboard.KEY_KEY_N);
public mod_Nightvision
{ ModLoader.registerKey(this, this.Whatever, false);
ModLoader.addLocalization("Toggle Night Vision", "Toggle Night Vision");
}
public void keyboardEvent(KeyBinding keybinding)
{
if(keybinding == this.Whatever){
//Do Something.
}
}
public void load()
{
}
public String getVersion()
{
return "1.2.5";
}
}
EDIT How do I show it as code?
The error is that in "public mod_Nightvision" it goes a () like this
Sorry.
Thanks, that's one error fixed.
for:
And that should work. Sorry for the problems.
Awesome! Thanks so much! But there is still one error left,
Dafuq did I just posted before xd
Didn't work. Do I need to put
or
?
I have eclipse and it says one of those can fix it, but which one?
NVM, I fixed it, but the link you sent me for night vision overlay doesn't help at all.