- 459
- 13
- 35
Доброго времени суток.
Почему-то не производиться бинд клавиши.
Вот клаcc:
И тем самым почему-то не открывается моё гуи:
Почему-то не производиться бинд клавиши.
Вот клаcc:
Java:
public class RegKey extends RegKey1 {
@Override
public void preInit() {
super.preInit();
}
@Override
public void init() {
super.init();
}
@Override
public void postInit() {
super.postInit();
}
@Override
public void initializationAndRegisterHandlers() {
super.initializationAndRegisterHandlers();
}
public static final KeyBinding tutorialKey = new KeyBinding("key.tutorial", Keyboard.KEY_G, "key.categories.gameplay");
@Override
public void keys() {
ClientRegistry.registerKeyBinding(tutorialKey);
}
}
И тем самым почему-то не открывается моё гуи:
Java:
public class WhenKeyIsPressed {
@SubscribeEvent
public void onKeyInput(KeyInputEvent event)
{
if (Minecraft.getMinecraft().inGameHasFocus) {
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
if (player == null) {
return;
}
if (RegKey.tutorialKey.getIsKeyPressed()) {
player.openGui(GuiTutorial.instance, 12, player.worldObj,
(int) player.posX, (int) player.posY, (int) player.posZ);
}
}
}
}