* 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
* Fix datagen for custom dynamic registry
* Test datagen for custom dynamic registry
* Check if the dynamic registry is registered with Fabric API
* Cleanup testmod
* Don't apply to registries not added using the fabric api.
---------
Co-authored-by: modmuss50 <modmuss50@gmail.com>
* Some more TAWs
Added some TAWs for various methods in `Blocks` used to create certain types of blocks that mods may want to also create. Using these methods will allow them to ensure they have all the right block settings they need to stay consistent with vanilla blocks that use the same methods.
* Add some fields from BlockLootTableGenerator
useful fields from BlockLootTableGenerator. also cleaned up the datagen api's accesswidener file
* Add API for adding custom dynamic registries
Closes#1012, supersedes #1031 and #2719.
* Add missing license headers
* Clarify RegistryLoaderMixin namespace injection
* Replace event with static registration, add skeleton for sorting registries
* Fix typo
* Refactor event phase sorting system for use with dynamic registries (#1)
* Make minor changes to Technici4n's PR
* Add test for nested dynamic objects
* Revert "Add test for nested dynamic objects"
This reverts commit 486e3e1ce0.
* Revert "Make minor changes to Technici4n's PR"
This reverts commit 741bd52c1e.
* Revert "Refactor event phase sorting system for use with dynamic registries (#1)"
This reverts commit bb7c8b8790.
* Remove sorting API
* Add support for defaulted dynamic registries
* Re-add test for nested dynamic objects
* Add missing license headers
* Fix typo
* Remove defaulted dynamic registries; flatten registration methods
* Remove last reference to registry sorting
* Add option to skip syncing for empty dynregs
* Update DynamicRegistrySyncOption docs
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
* Address review feedback
* Add registry namespace to tag paths for modded registries
* Move dynamic registry tests into their own class for readibility
* Finish DynamicRegistries doc
* Only apply tag change to dynamic registries
* Fix checkstyle
* Update fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/api/event/registry/DynamicRegistries.java
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
---------
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
# 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/
* 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
* Fabric custom ingredient API
* More Ingredient API work
* Optimize shapeless matching logic
* Fix all the things
* Move custom ingredient network serialization to account for ingredient extension API
* Apply suggestions from code review
Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>
* Address 🍎 review
* Get rid of the @Overwrite
* Implement graceful fallback for clients not supporting some custom ingredients
* Move custom ingredient code to new Recipe API module
* Fix client package change
* Address review comments
- And/Or -> All/Any
- Move builtin ingredient registration to entrypoint
- Initial protocol version is 1
- Misc other changes
* Add testing instructions
* Use a List for `getMatchingStacks`
* Overengineer ingredient query a bit
Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>
Co-authored-by: modmuss50 <modmuss50@gmail.com>
* Fixed blocks with vanilla loot tables making strict validation of datagen fail
Previously, blocks that used `.dropsLike(block)` in their block settings to use a vanilla block's loot table, or `.dropsNothing()` to use the `minecraft:empty` loot table, would cause strict validation in data generation to fail as the vanilla loot tables wouldn't be present in the mod's own block loot table generator.
This fixes that by ensuring that the block's loot table ID has a namespace that matches the loot table generator before adding it to the missing IDs list.
Two test blocks were added to the testmod, one which uses `.dropsLike(Blocks.STONE)` to use the same loot table as Stone, and one that uses `.dropsNothing()`. Previously, these would have caused strict validation to fail as the `minecraft:stone` and `minecraft:empty` loot tables aren't generated by the testmod's generator. Now they pass just fine.
* Fixed blocks with vanilla loot tables making strict validation of datagen fail
Previously, blocks that used `.dropsLike(block)` in their block settings to use a vanilla block's loot table, or `.dropsNothing()` to use the `minecraft:empty` loot table, would cause strict validation in data generation to fail as the vanilla loot tables wouldn't be present in the mod's own block loot table generator.
This fixes that by ensuring that the block's loot table ID has a namespace that matches the loot table generator before adding it to the missing IDs list.
Two test blocks were added to the testmod, one which uses `.dropsLike(Blocks.STONE)` to use the same loot table as Stone, and one that uses `.dropsNothing()`. Previously, these would have caused strict validation to fail as the `minecraft:stone` and `minecraft:empty` loot tables aren't generated by the testmod's generator. Now they pass just fine.
* Add more transitive Access Wideners
- Expose `StateProviderType` constructor. Fixes#474.
- Expose DefaultBiomeCreator.getSkyColor. Fixes#981.
- Make custom `RenderLayer` registration easier. Fixes#1635.
- Add warning at the beginning of the generated AW to prevent manual
editing of the file.
* Add warning to datagen generated AW
- Added transitive-accessible wideners for `BlockStateModelGenerator$TintType`, `BlockStateModelGenerator$BlockTexturePool`, `BlockStateModelGenerator$LogTexturePool`, and `BlockStateModelGenerator$BuiltinModelPool` classes
- Added transitive-accessible widener for `TexturedModel#makeFactory` method
- Moved transitive-accessible wideners for `ItemModelGenerator` methods to the generate run, so it covers the 2 new methods and any future ones
- Fixed `generateAccessWideners` task so it can now find the jar
- Tweaked the whitespace in the accesswidener file a bit
* Include datagen in the production fatjar. Closes#2228
* Allow exclusion of block loot tables from strict validation. Closes#2241
* Auto-generate item models even when strict validation is disabled. Fixes#2240
(cherry picked from commit 4d962b4e9e)
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.
* Add framework for common-tags-v1
* Add javadoc to fabric tool tags
* Fix wrong package arrangement
* Add some more tags
* Add more biome tags
Thanks to TelepathicGrunt for the suggestions
* Update fabric-common-tags-api-v1/src/main/java/net/fabricmc/fabric/api/tags/v1/CommonEnchantmentTags.java
Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
* Update fabric-common-tags-api-v1/src/main/java/net/fabricmc/fabric/api/tags/v1/CommonEnchantmentTags.java
Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
* Clarify enchantment tags
* Add no-shulker tag
* Add minecart tag
* Begin work on datagen and populating tags
* Add bucket tags
* First pass at populating biome tags
* Add boat tag
* Fix missing inclusion of f:shears into c:shears
* Hide fabric tool tags in datagen
* Add weapon damage enhancement tag
* Change impl package name to be inline with rest of fapi
* Rename enchantment tags
* Some cleanup
* Populate blocktag datagen
Remove crops tag
* Add javadoc links to vanilla counterparts
* Move datagen to its own sourceset
* Fix package names for checkstyle
* Populate more entries
* Remove exclusion tag
* Add license headers
Fix checkstyle
* Add missing nether quarts to ores tag
* Use `worldgen/biome` instead of `biomes` for biome tags
Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
* Manually include all biomes for overworld
* Remove ancient debris from NetheriteOres
* Add and populate glass tags
* Add and populate movement enhancement
* Break up item tags
* Add armour damage reduction tag
* Add missing ore and related tags
* Fix quartz tags
* Add floral tag
* Add golden carrot
* Correct some biome tag issues
* Separate SNOWY_PLAINS and PLAINS
* Add SNOWY tag and remove snowy biomes from ICY
* Correct enchantment tag
Remove silk touch tag
* Fix more biome issues
* Add deep and shllow ocean tags
* Add no-move tag
* Remove netherite ores
* Add shulker tags
* Add raw ore
* Add dye tags
* Fif dye tags
* Fix typo
* Document some biome tags where the naming may not be clear
* Remove tag mirroring for blocks and items
* Rename module
Remove unused methods
* Rename impl package
* Rename packages and module
* Rename folder
* Rename api classes
* Add generateResources task to cover all resource generation tasks.
* Add generated tags to repo
* Fix ocean tag excluding shallow ocean
* Iterate registry to generate foods tag
* Remove cache, add to gitignore
* Rename generated folder
Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
Co-authored-by: modmuss50 <modmuss50@gmail.com>
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.
* Add datagen support for dynamic registry tags
* Update according review
* Make FabricTagBuilder final
* Throw AssertionError if expected errors didn't happen
* Datagen additions
Now separated from #1889
* add throws javadoc tag, and test for copying a block tag that contains a block without an item form to an item tag
* linkplain
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
* Add javadoc note about copy filtering
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>