unascribed / BlockRenderer

A mod to render blocks and items. Useful for wikis.
https://www.curseforge.com/minecraft/mc-mods/blockrenderer
MIT License
23 stars 17 forks source link

KeyBinding registered at wrong time - kills dev workspaces #29

Open Tslat opened 3 years ago

Tslat commented 3 years ago

Hi there - just a heads up; You're currently registering your keybinds in the constructor of ClientRenderHandler, as seen here: https://github.com/unascribed/BlockRenderer/blob/914264f1415cf7f1b13f90e82234cceec918e3df/src/main/java/com/unascribed/blockrenderer/ClientRenderHandler.java#L81

This is somewhat ok, but it breaks development environments which contain your mod, and it shouldn't be done there anyway. This happens because some dev runtimes don't actually let Minecraft assign an instance (such as datagen), which causes this line to NPE because it's being called when it shouldn't be.

Can you move this to FMLClientSetupEvent, where it should be?

I'd do a PR but I'm not able to do so currently due to being away from my main dev setup

unascribed commented 3 years ago

You should really be using the fork of this mod.

Will fix this Soon™. Learning the fork exists and how much more advanced it is than this version very quickly killed any interest I had in reviving it. (This is not a bad thing, but I merged the 1.16 port PR with the expectation of starting a serious dev push on this again, but it's basically already been done.)

Tslat commented 3 years ago

Thanks