View Issue Details

IDProjectCategoryView StatusLast Update
0000527Industrial-Craft²crossmod-compatibility / submodules / APIpublic2013-08-22 11:36
ReporterAGKzAssigned ToPlayer 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000527: Experimental API keyboard.keys error
DescriptionHello,

So I was in the middle of doing a video when I stumbled across this bug. Its not a crash or anything, but rather annoying and breaks a part of the API.

Errors pasted in additional information

Basically, the ic2.api.keyboard.Keys class is calling methods in the core IC2 that do not exist at that place.

The error says it is looking for the method in the KeyboardClient class, though the real methods are located in the Keyboard class.

Just a little bug
Steps To ReproduceAttempt to call any method in the ic2.api.keyboard.keys. In my case:

public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player)
    {
        if(Keys.isBoostKeyPressed(player)) {
            player.addChatMessage("Hello booster");
        }
        
        if(Keys.isAltKeyPressed(player)) {
            player.addChatMessage("Hello alter");
        }
        
        if(Keys.isForwardKeyPressed(player)) {
            player.addChatMessage("Hello forworder");
        }
        
        if(Keys.isJumpKeyPressed(player)) {
            player.addChatMessage("Hello jumper");
        }
        if(Keys.isSneakKeyPressed(player)) {
            player.addChatMessage("Hello sneaker");
        }
        
        return itemstack;
    }
Additional Information[INFO] [STDERR] java.lang.NoSuchMethodException: ic2.core.util.KeyboardClient.isModeSwitchKeyDown(net.minecraft.client.entity.EntityClientPlayerMP)
2013-08-20 09:54:43 [INFO] [STDERR] at java.lang.Class.getMethod(Class.java:1632)
2013-08-20 09:54:43 [INFO] [STDERR] at ic2.api.util.ReflectionHelper.callMethod(ReflectionHelper.java:27)
2013-08-20 09:54:43 [INFO] [STDERR] at ic2.api.keyboard.Keys.getKeyPressed(Keys.java:39)
2013-08-20 09:54:43 [INFO] [STDERR] at ic2.api.keyboard.Keys.isSneakKeyPressed(Keys.java:35)
2013-08-20 09:54:43 [INFO] [STDERR] at tutorial.generic.dummyItem.onItemRightClick(dummyItem.java:38)
2013-08-20 09:54:43 [INFO] [STDERR] at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:176)
2013-08-20 09:54:43 [INFO] [STDERR] at net.minecraft.client.multiplayer.PlayerControllerMP.sendUseItem(PlayerControllerMP.java:428)
2013-08-20 09:54:43 [INFO] [STDERR] at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1405)
2013-08-20 09:54:43 [INFO] [STDERR] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1854)
2013-08-20 09:54:43 [INFO] [STDERR] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:898)
2013-08-20 09:54:43 [INFO] [STDERR] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
2013-08-20 09:54:43 [INFO] [STDERR] at net.minecraft.client.main.Main.main(Main.java:93)
2013-08-20 09:54:43 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-08-20 09:54:43 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2013-08-20 09:54:43 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2013-08-20 09:54:43 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
2013-08-20 09:54:43 [INFO] [STDERR] at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
2013-08-20 09:54:43 [INFO] [STDERR] at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
TagsNo tags attached.
Minecraft Version

Activities

Player

2013-08-22 11:36

administrator   ~0001225

Should be fixed now, the new package for Keys is ic2.api.util

Issue History

Date Modified Username Field Change
2013-08-20 15:07 AGKz New Issue
2013-08-22 11:36 Player Note Added: 0001225
2013-08-22 11:36 Player Status new => resolved
2013-08-22 11:36 Player Resolution open => fixed
2013-08-22 11:36 Player Assigned To => Player