A common source of crashes on modded Minecraft servers comes from modders accidently calling client only code from the client, this PR is another large step towards elimitating that.
This PR has been months in the making and years in the planning, requiring major changes to Loom & Loader. In recent Minecraft versions Mojang has made it easier than ever to cleanly split the jar, going against the status-quo of merging the client and server into one jar.
From the start we have designed Fabric to have a very clear split between client and common (client & server) code. Fabric has always encoraged keeping client only code seprate from the server, this can be seen at a fundamental level with the entrypoints in Loader. Fabric API's have all been designed with this mind.
This PR provides a compile safety net around Fabric API using client only code on the server. Even though there are almost 400 changed files, minimal changes beyond moving the files were required to achieve this in Fabric API, thanks to the effort of all contributors in the past.
These changes should not affect modders or players in anyway, a single "universal" jar is still produced. Im happy to awnswer any questions.
* Edited Clone of #244
- Fixed checkstyle issues
- Migrated to fabric-keybindings-v1
- Removed sticky keybindings from #244 as it sounds useless and you can just around it by simply adding that functionality yourself, I might add it back if someone can tell me the advantages of sticky keys except bloat
- Added a test mod
- Added FabricKeyBinding#getBoundKeyOf for getting vanilla bound keys with ease
- Renamed `registered` to `automaticallyRegister` as that is more of a better name
- Added a couple Objects.requireNonNull validations
* Add back StickyFabricKeyBinding as it is in vanilla, did not notice.
* Remove extra "key."
* Bump to 1.0.0
* build().register()
* Remove `register()`
Signed-off-by: shedaniel <daniel@shedaniel.me>
* Fix test
Signed-off-by: shedaniel <daniel@shedaniel.me>
* Rename module
Signed-off-by: shedaniel <daniel@shedaniel.me>
* Fix checkstyle violation
Signed-off-by: shedaniel <daniel@shedaniel.me>
* major refactor
Signed-off-by: shedaniel <daniel@shedaniel.me>
* revert some stuff
Signed-off-by: shedaniel <daniel@shedaniel.me>
* fix build
Signed-off-by: shedaniel <daniel@shedaniel.me>
* major stuff
Signed-off-by: shedaniel <daniel@shedaniel.me>
* fix license, of course
Signed-off-by: shedaniel <daniel@shedaniel.me>
* Add resource loader v0
Signed-off-by: shedaniel <daniel@shedaniel.me>
* Let's not break the api.
Signed-off-by: shedaniel <daniel@shedaniel.me>
* Rename to buildAndRegister
Signed-off-by: shedaniel <daniel@shedaniel.me>
* resolve reviews
Signed-off-by: shedaniel <daniel@shedaniel.me>
* Use GLFW
Signed-off-by: shedaniel <daniel@shedaniel.me>
* Dump the builder entirely
Signed-off-by: shedaniel <daniel@shedaniel.me>
* Rename to Key Binding
Signed-off-by: shedaniel <daniel@shedaniel.me>