* Allow sound instances to play custom audio streams
Adds a new interface FabricSoundInstance, which is injected into
vanilla's SoundInstance interface.
When loading an audio stream, the SoundSystem now calls
FabricSoundInstance.getAudioStream, allowing mods to provide their
own audio streams.
* Some post-review cleanup
- Manually add the client sources as an interface injection source set,
allowing us to put everything in the src/client dir (<3 modmuss50).
- Apply some formatting changes from apple502j.
* Document the empty sound and its usage in sounds.json
* Fix one remaining @literal -> @code
* Fix checkstyle issues
* Initial skeleton
* Fabric Chat API v1 (experimental)
* Run checkstyle
* Fix checkstyle (testmod)
* Support 1.19-pre1
* Fix spotless
* Fixes
* Remove caching of messages
This is hard to maintain and has several edge cases. Mods should cache themselves when needed.
* Make constructor private
* Add ServerChatEvents
* Update mappings
* Prepare for the rename
* Include chat decorator in exception
* Add support for blocking messages
* Rename to fabric-message-api-v1
* Update to 1.19-pre2
* Use fabric namespace
* Rename ChatDecoratorEvent
* Rename events and add more javadoc
* Rename ServerChatEvents
* Rename ChatDecorator
* Only block bad respawn point death in testmod
* Fix wrong word in javadoc
* Improve javadoc
Co-authored-by: modmuss50 <modmuss50@gmail.com>
- Deprecates all classes and methods that use outdated Yarn names.
- Adds FabricLootTable and FabricLootTableBuilder to replace
the LootSupplier naming variants.
- Deprecates LootEntryTypeRegistry and LootJsonParser
as their functionality is exposed in vanilla now.
- Adds methods to FabricLootPoolBuilder for working
with collections as builder parameters.
- FabricLootPool and FabricLootTable/Supplier now return immutable lists
instead of modifiable fixed-size ones.
Co-authored-by: i509VCB <i509vcb@gmail.com>
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>