Résolu Key Bug
-
Bonsoir , j’ai mis ca dans mon client proxy et une erreur apparais dans KEY_T
package craftyourliferp.fr.client.custommenu; import java.io.File; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent; import net.java.games.input.Keyboard; import net.minecraft.client.Minecraft; import net.minecraft.client.settings.KeyBinding; import net.minecraft.util.ChatComponentText; import net.minecraftforge.common.MinecraftForge; public class ClientProxy extends TutorialCommon { private static KeyBinding keyBindCRYLRP; public ClientProxy() { FMLCommonHandler.instance().bus().register(this); keyBindCRYLRP = new KeyBinding("modtest.key", Keyboard.KEY_T, "key.categories.gameplay"); ClientRegistry.registerKeyBinding(keyBindCRYLRP); } @SubscribeEvent public void onEvent(KeyInputEvent event) { if(keyBindCRYLRP.isPressed()) { keyTestTyped(); } } private void keyTestTyped() {
-
Salut,
Il faut importer le Keyboard de lwjgl et non de java.games -
@‘robin4002’:
Salut,
Il faut importer le Keyboard de lwjgl et non de java.gamesOk merci ^^