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.
* Update command registration API to reflect vanilla changes
* Allow module versions in impl+mixin packages
* Use v2 module, keeping v1 for server commands at least
* update, address review
Co-authored-by: modmuss50 <modmuss50@gmail.com>
* dim api initial port
* A whole bunch of work
* Checkstyle :)
* Minor tweaks based on feedback
* Update to latest snapshot
* Checkstyle ;)
* Some more dim work
* Re add default placer's, the example mod includes a test dim that currently marks the world as experimental
* license
* Fixup javadoc
hardcoded for Overworld, use Dimension.hasVisibleSky instead.
- World.isDay() and World.isNight() are now un-hardcoded.
Instead of checking for the overworld, they check for a visible sky
like clocks. The check is false for the nether and the end,
so vanilla behaviour stays the same.
* Update versioning to match 1.15 branch
* Fix builtin mods being added as resource packs
* Update fabric-loader to replace deprecated methods
* Add more metadata to the modules (#353)
* Add fabric-api-base as a dep to fabric-networking-v0
* Allow for running fabric-api-base on the server-side environment (#360)
* Set curse version to 1.14.4
Also forces it to build again
* Fix NPE in fluid renderer mixin (#361)
* Fix NPE in fluid renderer mixin
* Ensure state, view, and pos are never null
* Bump fabric-rendering-fluids-v1 version
* Cooler dimension API, #309 (#319)
* pyro API
* Update fabric-dimensions-v1/src/main/java/net/fabricmc/fabric/api/dimension/EntityPlacer.java
clarify portalDir param
Co-Authored-By: Pyrofab <redstoneinfire@gmail.com>
* Update fabric-dimensions-v1/src/main/java/net/fabricmc/fabric/api/dimension/EntityPlacer.java
rename & clarify verticalOffset param
Co-Authored-By: Pyrofab <redstoneinfire@gmail.com>
* Update fabric-dimensions-v1/src/main/java/net/fabricmc/fabric/api/dimension/FabricDimensions.java
Co-Authored-By: Pyrofab <redstoneinfire@gmail.com>
* Update fabric-dimensions-v1/src/main/java/net/fabricmc/fabric/api/dimension/EntityPlacer.java
Co-Authored-By: Pyrofab <redstoneinfire@gmail.com>
* update parameter
* Add fabric-networking and fabric-registry-sync to dependencies
* Refactor FabricDimensionType to use a builder
Also adds a desiredRawId field separate from the actual raw
id fixed internally. The fixedRawId field is now set by
DimensionIdsFixer through reflection.
This change addresses concerns about the ability for any mod
to set a FabricDimensionType's raw id at any time.
* Improve javadoc of FabricDimensions#teleport
* Add an overload for FabricDimensions#teleport
* Update javadoc on DimensionIdsFixer
* Inline clientside packet handling
* Add side assertions to FabricDimensions#teleport
* Nuke minecraft's attempts to overwrite bad level properties
* Add license headers
* Reformat dimension API source code
* Update FabricDimensionType javadoc
* Remove redundant ThreadLocal from FabricDimensionInternals
* Fix crash on dedicated servers
* Fix Illegal Access during remapping
* Fix dimension remap exception propagation
* clarify EntityPlacer docs
* spacing fixes
* api.dimension -> api.dimension.v1
* Increment API patch version
Signifies inclusion of new Dimension API
* Partial fix to FabricDimensionType
* Bump dimension version
* Updates based on feedback