* Generate package-info files for all impl and mixin packages
* Add javadoc to generated package-infos, use multiline string
* Simplify code
* Remove manual ApiStatus.Internal on impl classes
* Update CONTRIBUTING.md to remove ApiStatus.Internal for impl classes
* Fix Gradle deprecations
* Fix more Gradle deprecations
* Add task metadata
* Support client-main split
* Remove workaround for client packages
* Try to fix Gradle 8 deprecations
* Try to fix Gradle 8 deprecations, part 2
I'm hoping that using the SourceDirectorySet instead of converting it to a
Set<File> (which is pointless?) will carry the build dependencies over.
* Add clean packageInfo task
Co-authored-by: modmuss50 <modmuss50@gmail.com>
(cherry picked from commit 0d0f21023d)
* Fix CLIENT_RESOURCE_PACK_PROVIDER registration
* Mark FabricModResourcePack as always stable
* Fix warnings
* Fix use of deprecated loader API
* Fix yet another ResourcePack closing issue
* Make ResourceManagerHelper NonExtendable
* fix checkstyle
- 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>
* Load mod-provided data packs and DRM entries in CreateWorldScreen
Fixes#2225
* Fix ModifyArg target
* Fix injection failure
* Fix again
* checkstyle
* Fix it once again
* Add data pack load test to biome api testmod
* Also fix this for the dedicated server
* Fix TestServer not loading data packs
* Load dynamic registry in TestServer
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.
* TooltipComponent API (#1695)
* TooltipComponent API
* Add warning
* Fix handling of orphaned registry entries (#1759)
* Fix handling of orphaned registry entries
* Fix handling of orphaned registry entries in RegistrySyncManager
* Transfer API: bugfixes and improvements (#1762)
* Fix SingleVariantItemStorage extraction bug
* Inventory wrappers: reuse the original stack more aggressively
* Add some filtered overloads to StorageUtil methods
* Override PlayerInventoryStorage#insert to call #offer
* Add small comment regarding predicates
* Bump version
* Fix refamp generation for gametest API. Fixes#1722
* Bump version.
* Add two more sleep events (#1755)
* 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
* Bump version
* Fix Registry.GAME_EVENT not being synced.
* Updated mappings to yarn 1.17.1+build.63 (#1786)
* Updated mappings to yarn 1.17.1+build.63
* Forgot some bits.
* Forgot to reeable
* Make biome & dimension api stable. And change usage around @Deprecated (#1783)
* Make biome & dimension api stable (for 1.17). Remove the usage of @Deprecated for other experimental modules.
The @Deprecated should be used for experimental/volatile APIs that are highly likely to change.
* Apply suggestions from code review
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
* ItemGroup API: Remove return and call super so all others ItemStack's get appended (#1617)
* Remove return and call super so all others ItemStack's get appended
* Add method to FabricItemGroupBuilder to pass ItemGroup with appendItems and change stacksForDisplay to a BiConsumer
* Update ItemGroupBuilder javadoc and add example to testmod
* Remove leftover aw
* Update fabric-item-groups-v0/src/main/java/net/fabricmc/fabric/api/client/itemgroup/FabricItemGroupBuilder.java
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
* Update fabric-item-groups-v0/src/testmod/java/net/fabricmc/fabric/test/item/group/ItemGroupTest.java
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
* Remove used import in ItemGroupTest
* Clean up
* Fix damn checkstyle
* Change version to 0.3.0
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
* Bump version
* Add tag-based mining level API, fix and deprecate FabricBlockSettings.breakByTool (#1629)
* Mining Level API, part 1
* Fix incorrect netherite mining level in MiningLevelManager docs
* Add some format checks in dynamic mining level tag checking
* Add mining level API test mod
* Grammar
* Add cursed basic support for the tool attribute api
* Fix tool attribute JD
* Add proper compat for tool attribute api
Also fixes the remaining bugs in it!
* Update license headers
* stuff
* better comments
* more test mod work
* more
* Fix test mod
* i'm done with this module
* Address some code review things
* Use Reference2IntMap (basically IdentityHashMap for int values)
* Prefix mixin handlers with fabric$
* Add missing license header
* Update fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/api/object/builder/v1/block/FabricBlockSettings.java
* Resolve liach's comment
* Update to use TagFactory
* Add event phases (#1669)
* Proof of concept
* Simplify and document
* Allow events to be registered with default phases
* Use modified Kosaraju for the toposort, and add test for cyclic dependency graphs
* Separate phase-related functionality in an EventPhase class
* Revert "Separate phase-related functionality in an EventPhase class"
This reverts commit e433f348f4.
* Ensure that the phase order is deterministic
* Add pretty graphs
* Add a test, fix a bug, only do one sort for every constraint registration
* Environmental renderers (#1727)
* Environmental Renderers
* Remove defunt hideClouds and hideWeather
* Pushed missing License
* Push checkstyle fixes
* remove unused
* Unwrapped the test mod sky rendering.
* Added a first attempt at javadoc.
* Forgot a blank line
* Moved Environment references out of class
* Moved Lamda functions for fog override, thick fog usage and fog color adjustment to their own interfaces and gave them proper javadoc.
* Made FabricSkyProperties private
* PURGE THE H...I mean FabricSkyPropertyBuilder and FabricSkyProperties.
- Reverted unintentional mixin changes
- Fix various typo errors that were pointed out.
- Added missing javadocs and added the ability to override.
* Forgot some pluggin in some overrides.
* Added missing javadoc suggestion
* Changed api a bit so that it fires a exception if renderer not being overridden and one already exists.
* Split Implemtnation and Interface
* Forgot a license
* Added WorldRenderContext to Renderers
* Added logging
* Added missing javadocs and removed the override option.
* Removed INSTANCE
* Environmental Renderers
* Remove defunt hideClouds and hideWeather
* Pushed missing License
* Push checkstyle fixes
* remove unused
* Unwrapped the test mod sky rendering.
* Added a first attempt at javadoc.
* Forgot a blank line
* Moved Environment references out of class
* Moved Lamda functions for fog override, thick fog usage and fog color adjustment to their own interfaces and gave them proper javadoc.
* Made FabricSkyProperties private
* PURGE THE H...I mean FabricSkyPropertyBuilder and FabricSkyProperties.
- Reverted unintentional mixin changes
- Fix various typo errors that were pointed out.
- Added missing javadocs and added the ability to override.
* Forgot some pluggin in some overrides.
* Added missing javadoc suggestion
* Changed api a bit so that it fires a exception if renderer not being overridden and one already exists.
* Split Implemtnation and Interface
* Forgot a license
* Added WorldRenderContext to Renderers
* Added logging
* Added missing javadocs and removed the override option.
* Removed INSTANCE
* Fixed Issues
* Fixed formatting issue.
* completed Juuxl's suggestions and removed null check on adding skyproperties. Changed SkyProperties registering to take an Identifier. Registration turns out to be only adding new options to the "effects" entry of dimension type jsonjson.
* Forgot to reenable this.
* Just did suggested tweaks
* Changed SkyProperties to DimensionEffects
* Pushed suggestions of Haykam and apple502j
* Added missing changes from sky properties to dimension effects.
* Corrected me being inconsistent.
* Forgot to remove import.
* Impliments
https://github.com/FabricMC/fabric/pull/1727#discussion_r734988305https://github.com/FabricMC/fabric/pull/1727#discussion_r734988265
* Implements https://github.com/FabricMC/fabric/pull/1727#discussion_r730429748
* Last minute tweak. Runnable that controls fog runs right before dimension spefific rendering is done. Based on more subtle issues discovered while working api with twilight forest.
Co-authored-by: AlphaMode <AlphaModeYT@gmail.com>
* Another wave of transfer API improvements (#1801)
* Another wave of transfer API improvements
* Cleaner implementation of FilteringStorage#...Of
* Undo colored name for water and lava variants
* Custom fluid renderers and enhanced vanilla fluid renderer customization (#1687)
* Implement custom fluid rendering
* Move custom renderers in FluidRenderer mixin and add overlay sprite support to FluidRenderHandlers
* Add vanilla-like fluid renderer. Maybe very unnecessary, might remove.
* Optimize imports
* Allow custom fluid renderers to call the default renderer. Re-add DEFAULT.
* Add interface to implement by blocks that enforces overlay texture on fluids
* Some comments
* Simplify API and remove DefaultLikeFluidRenderer
* Make simple renderer overlay texture nullable
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
* Expand test mod
* Checkstyle and licenses
* Easy shortcut for custom colored vanilla water fluids
* Easy way to register a renderer for two (still+flowing) fluids
* Update fabric-rendering-fluids-v1/src/main/java/net/fabricmc/fabric/api/client/render/fluid/v1/FluidRenderHandlerRegistry.java
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
* Update fabric-rendering-fluids-v1/src/main/java/net/fabricmc/fabric/mixin/client/rendering/fluid/MixinFluidRenderer.java
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
Co-authored-by: modmuss50 <modmuss50@gmail.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
* Bump versions
All of the version need to be bumped due to fabric-api-base being updated, this highlights the need for a better solution.
* Target the void world in the DimensionalRenderingTest
It's a bit too obnoxious for the overworld.
* Fix shears being the ultimate mining tool (#1809)
* Add detail about default value to MiningLevelManager jd
* Fix shears being the ultimate mining tool
In more technical terms, fix an invalid
comparison in TaggedToolsModdedBlocksToolHandler.
The code was supposed to check if the tool's
mining level was at least the block's minimum
mining level. Instead, the check succeeded
whenever the block required a tool
(min level >= 0).
* WIP fixing tool attribute api bugs
* Fix mostly everything
* Simplify to (== 0) with explanation
* A less breaking workaround for https://github.com/FabricMC/fabric/issues/1806 (#1811)
* A less breaking workaround for https://github.com/FabricMC/fabric/issues/1806
* Checkstyle
* Bump version
* Update Loom and Loader. Cleanup/improve buildscript. (#1802)
Co-authored-by: shartte <shartte@users.noreply.github.com>
* Fix missing some chunk unloads events leading to a possible memory leak. (#1820)
* Fix crash when loading resources from a UNC (windows) network share.
See: https://bugs.openjdk.java.net/browse/JDK-8178726
* Update ResourceManagerHelper.java
* Update ResourceManagerHelperImpl.java
* Update ResourceManagerHelperImpl.java
* attempt to get rid of trailing whitespace
* works
* Update the test mod
* Split TestPack to check if unnamed packs still load and display correctly
* update javadoc
* bump testmod version
* Update fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/api/resource/ResourceManagerHelper.java
Co-authored-by: LambdAurora <aurora42lambda@gmail.com>
* Use modid in description
* Add lang
Co-Authored-By: LambdAurora <email@lambdaurora.dev>
* Update fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/impl/resource/loader/ResourceManagerHelperImpl.java
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
* Fix optional server resource loading
* small changes and adhere to checkstyle
* Remove ResourcePackProfileAccessor from mixin json
* bump pack_format
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
Co-authored-by: BasiqueEvangelist <basiqueevangelist@yandex.ru>
Co-authored-by: modmuss50 <modmuss50@gmail.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: Waterpicker <Waterpickerenternity@gmail.com>
Co-authored-by: AlphaMode <AlphaModeYT@gmail.com>
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Shadew <11669132+FoxShadew@users.noreply.github.com>
Co-authored-by: shartte <shartte@users.noreply.github.com>
Co-authored-by: LambdAurora <aurora42lambda@gmail.com>
Co-authored-by: LambdAurora <email@lambdaurora.dev>
Co-authored-by: deirn <deirn@bai.lol>
(cherry picked from commit 2afceb2962)
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.
* Stop DefaultResourcePack scanning the entire classpath
* Use another approach to find the JAR
* Make it work for filesystem assets as well (tested, it works!)
* Only patch what is necessary
* 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)
* Fix resource reload listeners not being sorted.
Fix missing/broken reload listener keys.
Add a debug log line for missing reload keys
Add some basic tests.
* Undo adding new keys, we can look at this later.
* use AssertionError
* Fix test on server
(cherry picked from commit 67abea83c2)
* WIP built-in resource packs API.
* Add built-in resource pack register API and fix old injection methods.
* Fix code style.
* Fix code style.
* Add documentation.
* Drop useless else.
* Fix resource packs and data packs isolation issues, and more.
* Move ResourcePackManagerAccessor to its own accessor mixin.
* Make the built-in mod pack test mod work on server too because data pack part.
* Add new argument to built-in pack method and make mod data packs always active.
* Add documentation.
* Complete documentation in GameOptions mixin.
* Remove register built-in pack overload as Player requested.