* 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.
* Move deprecated modules to a sub directory.
Remove deprecated modules from the default maven pom
Create a new "fabric-api-legacy" bom with the deprecated modules.
* Fix main "fabric" project not beign a dep for the legacy bom.
* rename artifact to fabric-api-deprecated
* Spotless
* Use the latest version of spotless.
* 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>
* First proof of concept pass
* Cleanup and fixes.
* Checkstyle
* Fix running.
* Updated
* Fix build
* Cleanup + fixes.
* Fix package
* and test package
* game-test -> gametest
* Fix exclusion
* Review feedback and fixes.
* Remove comment
* Review feedback.
* Don't set the game instance
* Fix
* Work around shadowed fields from super classes not getting remapped... dejavu anyone?
See: 2e359e933a (diff-0956caa3cd38a54f5910979f0cfd98198a93e4d585e111300f2f7ab7301ad122)
* Add mixin to exit with a non-zero exit code in case the test server fails to start.
* Enable JUnit XML report generation.
Co-authored-by: Sebastian Hartte <sebastian@hartte.de>
* Original fluid API design
* Rework the transaction system
* First javadoc pass
* Add a testmod, a base implementation for fluid storages and fix some little bugs
* Fix checkstyle
* Make Movement#move extract from the view and not the whole Storage
* Document and update FluidPreconditions
* Use for-each in CombinedStorage and document a little
* Remove useless overrides in Insertion/ExtractionOnlyStorage
* Move SnapshotParticipant#snapshots to the top of the class, and make updateSnapshots public
* Fix garbage collection of unused CauldronWrappers
* Use ArrayList directly
* Remove locking, reorganize transaction implementation, and add outer close callback
* Add more javadoc
* Rework Storage#forEach into Storage#iterator
* Add a few missing `transaction.addCloseCallback(iterator)`
* Add anyView(), exactView(), capacity() and isEmpty()
* Add Storage#iterable to make iteration friendlier to for loops
* Storages may now have multiple open iterators
Co-authored-by: Devan-Kerman <dev.sel20@gmail.com>
* Make CombinedStorage#supportsInsertion/Extraction iterate through the parts
* Block updates should be used when the supportsInsertion/Extraction status changes
* Fluid -> FluidKey
* Remove all references to ItemKey inside FluidKey, and other minor tweaks
* Cache FluidKeys with a null tag inside Fluid directly
* Fluid unit convention
* Add FluidKeyRendering and RenderHandler
* Bump version for more testing (also published to my maven)
* Add SingleViewIterator, massively reduce code duplication!
* Make API experimental, and add README
* Bump version
* Apparently Fluids.EMPTY is flowing
* Add package info
* Minor adjustements
* 1.17 port, cauldron support, add ResourceKey
* Checkstyle, gas rendering, use record for ResourceAmount
* Add a few helpers, rename some stuff
* Remove anyView, allow nullable in StorageUtil#find*, fix missing try block
* Slight findStoredResource cleanup
* Slightly improve implementation
* Bump version
* Fix wrong transaction
* I wrote in a comment that this could happen...
* Fix SingleFluidStorage bugs, add tests in the testmod, add testmod assets
* Add extract stick
* Rename a few things
* `ResourceKey<T>` -> `TransferKey<O>`
* `ResourceKey#getResource()` -> `TransferKey#getObject()` as resource is already widely used through the API for the keys themselves.
* `tag` -> `nbt`
* Add `get` prefixes to `StorageView` functions
* Bump version
* FluidKey -> FluidVariant
* Bump version
* Expand getVersion() documentation, make it thread-safe and use long.
Co-authored-by: Player <player@player.to>
* empty resource -> blank resource, and update SingleFluidStorage
Co-authored-by: Player <player@player.to>
* Make CauldronFluidContent a final class instead of a record.
Co-authored-by: Player <player@player.to>
* Get rid of CauldronFluidContent#minLevel (was always 1)
* Fix nested commits. (Thanks @warjort!)
* Separate Transaction and TransactionContext
Co-authored-by: Devan-Kerman <dev.sel20@gmail.com>
Co-authored-by: Player <player@player.to>
* Change WorldLocation into a private record
* Bump version
* Guard against exceptions thrown in close callbacks
* Make sure blank fluid variants don't have a tag
* Add documentation, make CauldronStorage clearer
Co-authored-by: frqnny <45723631+frqnny@users.noreply.github.com>
* Allow null storages in StorageUtil#move, and clarify sidedness of FluidStorage
* Add explicit hashCode and equals for transfer variants
* Remove ugly equals and hashCode overrides, and add constant time hashcode spec
Co-authored-by: Devan-Kerman <dev.sel20@gmail.com>
Co-authored-by: liach <liach@users.noreply.github.com>
Co-authored-by: Player <player@player.to>
Co-authored-by: frqnny <45723631+frqnny@users.noreply.github.com>
* fix#1273
* Expand testmod to test multipart and weighted models with FRAPI submodels
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>