I'm very new to modding(3 days), so i might ask some dopey questions.
My code looks like this:
if (entityName.equals(playerName)) {
KeyBinding.onTick(minecraft.gameSettings.keyBindJump.getKey());
KeyBinding.onTick(minecraft.gameSettings.keyBindDrop.getKey());
}
When the player got hurt, the player jump and drop the item in hand.
The drop works properly, but the jump doesn't want to activate.
if I do the to string:
System.out.println(minecraft.gameSettings.keyBindDrop.toString());
System.out.println(minecraft.gameSettings.keyBindJump.getKey().toString());
the console seems right to me
net.minecraft.client.settings.KeyBinding@4a4ef86a
key.keyboard.space
Minecraft version 1.15.2
Forge version: forge-1.15.2-31.2.0-mdk