Breaking changes:
- `FabricBrewingRecipeRegistry.registerPotionRecipe` takes `RegistryEntry<Potion>` instead of `Potion`
- `SculkSensorFrequencyRegistry.regster` takes `RegistryKey<GameEvent>` instead of `GameEvent`
- `FabricLanguageProvider.add` takes `RegistryEntry<EntityAttribute>` instead of `EntityAttribute`
- `FabricTagProvider.GameEventTagProvider` was removed replace with `FabricTagProvider<GameEvent>`
- `FabricItem.getAttributeModifiers` returns a Multimap with a key of `RegistryEntry<EntityAttribute>` instead of `EntityAttribute`
- `ModifyItemAttributeModifiersCallback.modifyAttributeModifiers` takes Multimap with a key of `RegistryEntry<EntityAttribute>` instead of `EntityAttribute`
* Fix inconsistency of placed feature locations
`BiomeSource#getBiomes` mixin applies to all biome sources, including one for Overworld.
The return value is a set; however one caller in the worldgen code iterates over it: `PlacedFeatureIndexer`.
Using a hash set here randomizes the return value, affecting feature placement.
Use a linked hash set instead.
* Improve fix to only make changes when required.
---------
Co-authored-by: modmuss50 <modmuss50@gmail.com>
(cherry picked from commit 661cc8c6dc)
* Update to loom 1.3
* Fix more 1.3 deprecations
* Opps
* Move to mod publish plugin
* Revert some changes
* Fix some more Gradle deprecations
* Fix names
* Remove extra stuff
* Cleanup
* BlockSetTypeRegistry and WoodTypeRegistry
Adds `BlockSetTypeRegistry` for creating `BlockSetType`s using Identifiers.
Also adds `WoodTypeRegistry` to replace `SignTypeRegistry`, matching the new more accurate Yarn name. The old `SignTypeRegistry` remains as deprecated for compatibility.
Also updates Yarn build.
* Delete SignTypeRegistry.java
Broke in the update anyway, no use keeping it
* Suggestions
* Whoops
* Suggestions
* Allow OptionalInt in BiomeModificationContext
For some reason, vanilla uses `Optional<Integer>` instead of
the preferred `OptionalInt`. Add an override that allows passing
`OptionalInt`. For consistency with vanilla, the old method is NOT
deprecated.
* Do not rely on Identifier identity when checking registration
`Identifier` is a value-based class and should never be compared
using `==`. Luckily, this does not cause bugs right now.
(Using `equals` is worse, since it'll prevent spawning pigs.)
Instead use the proper method of checking if an entry is registered.
* Fix#2079
* 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)
The following classes have been made final and unconstructible:
- All convention tags classes
- `FluidVariantAttributes`
- `FluidVariantRendering`
The following classes have been made unconstructible:
- `BiomeModifications`
- `ClientEntityEvents`
- `ClientTickEvents`
- `LootTableEvents`
- `FabricDefaultAttributeRegistry`
- `MinecartComparatorLogicRegistry`
- `StorageUtil`
The following classes have been explicitly marked as final. Note that actually extending such class has always been impossible due to missing public constructor:
- `VillagerInteractionRegistries`
- `VillagerPlantableRegistry`
- `ModelHelper`
- `StoragePreconditions`
While the first two are technically breaking changes, there is no actual or observed usage for any of those.
* Fix loading data pack biomes
* Add command to help test.
* Fix custom end biomes crash
closes#2292
* add plains biome to the end
* remove unnecessary field prefix
* End biomes now generate properly
* Remove test logging
* Remove test command (was barely functional)
* Fix checkstyle
* Some small refactors
* Save the sampler directly on MultiNoiseSampler instance (#1)
Co-authored-by: modmuss50 <modmuss50@gmail.com>
Co-authored-by: deirn <deirn@bai.lol>
* 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.