the docs are a bit unclear but to register the keymapping, it needs to go through the mod event bus instead of just in the mod class itself. this can be directly registered through an instance of the mod bus, or through a separate class annotated with @ModBusSubscriber. I chose the former to reduce scope of changes. The key is then checked through the ClientTickEvent as suggested
one thing to consider is a timeout or locking mechanism for the keybind activation, instead of allowing it to trigger every tick while held. this is not a newly introduced issue however, it exists when using InputEvent.Key as well
also I did not change the version, not sure how you are managing this presently
the docs are a bit unclear but to register the keymapping, it needs to go through the mod event bus instead of just in the mod class itself. this can be directly registered through an instance of the mod bus, or through a separate class annotated with @ModBusSubscriber. I chose the former to reduce scope of changes. The key is then checked through the ClientTickEvent as suggested
ref: https://docs.minecraftforge.net/en/latest/misc/keymappings/ resolves: https://github.com/gbl/AntiGhost/issues/35
one thing to consider is a timeout or locking mechanism for the keybind activation, instead of allowing it to trigger every tick while held. this is not a newly introduced issue however, it exists when using InputEvent.Key as well
also I did not change the version, not sure how you are managing this presently