# Breaking changes
- `VillagerPlantableRegistry` replaced with `ItemTags.VILLAGER_PLANTABLE_SEEDS`
- `FabricItemGroup.builder()` no longer takes an `Identifier`
- `FabricItemGroup.build()` no longer registers the ItemGroup, this now needs to go in the vanilla registry.
- `ItemGroupEvents.modifyEntriesEvent` now takes a `RegistryKey<ItemGroup>` in place of an `Identifier`
- `FabricLanguageProvider` now takes a `RegistryKey<ItemGroup>` in place of an `ItemGroup`
- `IdentifiableItemGroup` removed, replaced with vanilla registries.
- `FabricMaterialBuilder` removed, no replacement.
- `HudRenderCallback.onHudRender` now passed a `DrawableHelper` in place of `MatrixStack`
- `ScreenEvents.beforeRender` now passed a `DrawableHelper` in place of `MatrixStack`
- `ScreenEvents.afterRender` now passed a `DrawableHelper` in place of `MatrixStack`
- `Screens.getItemRenderer()` removed. Replace with `MinecraftClient.getItemRenderer()`
`DrawableHelper` is likely to be renamed soon, see: https://github.com/FabricMC/yarn/pull/3548/
* Move duplicated v0/v1 impl packages to v0 subpackages
Fixes#2616. The convention is adopted from the command API (v1)
whose impl classes have the v1 subpackage.
* Separate client code into its own packages everywhere
* Fix code style
* Fix code style, part 2
* Allow v0 in package names
* Allow v0 in package names (fixed)
(cherry picked from commit 9244241639)
* Add AFTER_DEATH and ALLOW_DAMAGE events; generalise ALLOW_DEATH to living entities
* Make class final and constructor private
* player -> entity; clarify where ALLOW_DAMAGE is fired
* Also deprecate the old AllowDeath funcint
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>
Use explicit casts instead of .class.cast in mixins
Reorganize API class, and make it work for any living entity
add LivingEntityFeatureRenderEvents to disable cape rendering
Reorganize/rename hook, and add ALLOW event
Fix missing mixin return & cosmetic adjustements
* Add event for setting bed occupation state
* Add wake up pos event and update tests
* Bump version
Just in case. I have a bad feeling that
this could become a patch version otherwise.
* Add code tags for true/false/null in EntitySleepEvents jd
* Add Dynamic annotations for lambda body mixins
* Update class javadoc to contain the new events
* Un-hardcode FACING property checks from only BedBlocks
* Use a better injection point for EntitySleepEvents.ALLOW_BED
* Fix#1680
* Bump entity events version
* Clarify javadoc
* Let's not forget license headers
* Add a note about the vanilla bug
* Update BedBlockMixin.java
* Add sleeping events
* Fix wake up event triggering on every wakeUp() call
* Make direction modifications stackable
* Simplify by not using Optional in MODIFY_SLEEPING_DIRECTION
* Add two new events
* Let's call it VERIFY_BED
* And it's ALLOW_BED now
* Add the rest of the events
* Clarify docs
* Expand docs, add missing vanillaResult
* WAKE_UP -> STOP_SLEEPING, javadoc
* Make sleepingPos checks more consistent in LivingEntityMixin
* 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)
* Correct ordinal of `afterWorldChanged` mixin to the correct return
Co-authored-by: i509VCB <git@i509.me>
* Handle null entity when unable to be created
* Comply with Checkstyle
* Remove redundant ordinal and only use null return to check valid teleports
Co-authored-by: Player <player@player.to>
Co-authored-by: i509VCB <git@i509.me>
Co-authored-by: Player <player@player.to>
(cherry picked from commit c7d5c83208)