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.
This snapshot is possibly one of the most impactful for API we have ever had. This PR is an inital port to support 22w06a, stuff will be missing and broken.
# Removed modules:
- fabric-mining-levels-v0 - Previously deprecated
- fabric-object-builders-v0 - Previously deprecated
- fabric-tag-extensions-v0
- fabric-tool-attribute-api-v1
# Modules with API breaking changes:
- fabric-biome-api-v1
- fabric-content-registries-v0
- fabric-data-generation-api-v1
- fabric-mining-level-api-v1
- fabric-object-builder-api-v1
- fabric-resource-conditions-api-v1
- fabric-structure-api-v1
# Impactful API changes:
### fabric-object-builder-api-v1
- Removed - FabricBlockSettings.breakByHand
- Removed - FabricBlockSettings.breakByTool - Previously deprecated
# Notable changes
- fabric-registry-sync-v0 moves vanilla's new registry freezing to a later point in time, allowing mods to add to the registry during init.
# Known issues:
- ServerBugfixMixin used to fix https://bugs.mojang.com/browse/MC-195468 has not yet been ported.
* Oxidizable Blocks registry
* Allow waxable blocks to be registered outside of OxidizableFamilies
* Refactor
Separated OxidizableBlocksRegistry and WaxableBlocksRegistry
Separated OxidizableFamily and WaxableBlockPair
Added null check to WaxableBlockPair
Added several methods
* whoops lol
* Apply suggestions from code review
Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
* Update ContentRegistryTest.java
* Refactor again lol
Now uses mixins to change the vanilla ImmutableBiMaps to HashBiMaps and adds to them instead of keeping separate maps and having methods of their own. Much cleaner!
* gutted everything lol
removed all the charm and character- uh, i mean, superfluous stuff and reduced the api to the bare basics
oh and also one-way methods which is neat i guess if you're into that sort of thing
* 🦀one way methods are gone🦀
all my homies hate one way methods
maps are linked again
* re-merged oxidizable and waxable registry classes
* Update ContentRegistryTest.java
* implement suggestions by @Juuxel
* Oxidization -> Oxidation
as per https://github.com/FabricMC/yarn/pull/2837
* Improve Dynamics
Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
* Add flattening, stripping and tilling registries
* Where'd the spaces come from?
* Clarify docs
* Better overloads for TillableBlockRegistry.register
* Mutablise AxeItem.STRIPPED_BLOCKS if needed
* Remove simplest TillableBlockRegistry.register overload because the default predicate is for farmland
* Add test mod
* Update fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/TillableBlockRegistry.java
Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
* Add custom value denoting module lifecycles.
* Make the module validation work.
My hand has been forced - we must use buildSrc since JsonSlurper is not available in main buildscript.
* Apply task to each project and dont cross projects
* A horrible hack
* Wait what
* It works now.
* Not needed
* Drop unneeded maven repo, cache map lookup
(cherry picked from commit daa38b3d82)
* Cache the fuel time map in the fuel registry
* Use a faster map for the fuel times
* Rebuild the fuel times map on the client side too
* Use more compatible mixins
* Replace a function overwrite by a TAIL inject
* Mixin formatting
* Indentation
* Make cache thread-safe, switch to boxed collection (IHM) since most
uses yield boxed results, refactor cache clearing
* fix import formatting
Co-authored-by: Player <player@player.to>
Mostly replaced instances of > with its correct html representation ">"
Changed or removed some bad @link entries, mostly stuff due to overseen code changes
Could not find the referenced class VertexEditor at all, removed these references out of the docs
Some errors still exists due to referenced objects not in the classpath at the time the javadoc is build
Proposal do some gradle magic