gbl / AntiGhost

Mod that requests the server to send surrounding blocks to you, to get rid of ghost blocks
MIT License
28 stars 16 forks source link

Rebindable key #35

Closed Hadoukanen closed 1 year ago

Hadoukanen commented 1 year ago

Would be nice if you could make it so you can rebind to another key. Please with sugar on top :-)

Xiarno commented 1 year ago

Yes please. It's annoying for it to be G and not being able to rebind it.

contra1337 commented 1 year ago

why would you even hard code this as a key that cant be changed lol. has been requested several times on the curseforge page as well

Xiarno commented 1 year ago

why would you even hard code this as a key that cant be changed lol. has been requested several times on the curseforge page as well

Exactly, this is just dumb.

gbl commented 1 year ago

The code to rebind the key was there, until Forge changed the API - basically saying "you don't need to call the function to add the key to the rebindables list any more, defining the key is sufficient". That was a lie, and there was no documentation at all about how change the code. At this point I'm just sufficiently fed up with Forge to not care.

Xiarno commented 1 year ago

The code to rebind the key was there, until Forge changed the API - basically saying "you don't need to call the function to add the key to the rebindables list any more, defining the key is sufficient". That was a lie, and there was no documentation at all about how change the code. At this point I'm just sufficiently fed up with Forge to not care.

Oh well that explains it ;-;

contra1337 commented 1 year ago

Will you accept PRs to add this functionality for at least some of the recent versions?

gbl commented 1 year ago

A PR, or even an example how to do this correctly now. Which I wasn't able to find when I made the 1.19 version. Make sure to check out the forge_1_19 branch, and look at the last commit (777d98a from 2022-07-30). This is where Forge changed the keyboard handling and where I removed the registerKeyBinding call that Forge removed. I'd need an example of how to do this correctly with new versions of Forge.

contra1337 commented 1 year ago

I have a fix ready, will create a PR shortly and link it

contra1337 commented 1 year ago

also fyi this was already addressed as part of one of the other open PRs that combines the forge and fabric versions, they did it through the other method i mentioned in the PR

gbl commented 1 year ago

Merged your patch and published as version antighost-1.19.1-forge42.0.1-1.1.3.jar on both CurseForge and Modrinth. Thank you for the effort!

And I didn't accept that PR because it was honestly way too much of a change - I haven't played Minecraft since 1.16, and while I'm keeping the mods alive for the moment, I didn't want to add new things and library dependencies that might be difficult to handle on future updates.

contra1337 commented 1 year ago

yep makes sense, I had just seen it when i was checking if my PR showed up. Thanks for the merge!