Commit graph

23 commits

Author SHA1 Message Date
modmuss
239dafd8f9 Fix registry resource conditions on loot tables. (#3432)
* Fix registry resource conditions on loot tables.

* assert we dont already have the DRM set on this thread.

* Use a sync map

(cherry picked from commit de5c6cca0a)
2023-11-26 13:02:17 +00:00
modmuss
e3d2bf3f57
Make some experimental APIs stable. (#3354)
* Make some experimental APIs stable.

* Imports.
2023-10-08 13:02:07 +01:00
modmuss50
435112151c 1.20.2-pre1 2023-09-05 16:31:02 +01:00
modmuss
fce67b32cf
23w35a (#3292) 2023-08-31 12:50:38 +01:00
modmuss
f4b7e42468
Update to loom 1.3 and use Mod Publish Plugin (#3158)
* 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
2023-08-02 18:51:21 +01:00
apple502j
ea08f9d850
Fix resource conditions for loot tables (#3117)
* Add test for LootManager

* Fix resource conditions for loot tables
2023-06-13 12:43:12 +01:00
modmuss
b3afc78b68
Setup unit tests & format gradle files. (#3073) 2023-05-30 13:07:11 +01:00
Technici4n
e6c7d4eea9 Resource Conditions Additions (#2821)
* Resource Conditions Additions

- Add `registry_contains` condition. Closes #2548.
- Make `fabric:load_conditions` appear first in generated JSON objects.
- Uniformize implementation a bit.

* Update fabric-resource-conditions-api-v1/src/main/java/net/fabricmc/fabric/mixin/resource/conditions/DataProviderMixin.java

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>

* itemsLoaded -> itemsRegistered

---------

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
(cherry picked from commit e63306e015)
2023-02-13 09:33:49 +00:00
Technici4n
1134c5b850
Remove leftover @ApiStatus.Internal annotations and add annotation validation (#2825)
* Remove leftover `@ApiStatus.Internal` annotations and add annotation validation

* Simplify

* Simplify more

* Update gradle/validate-annotations.gradle

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2023-01-05 12:50:15 +00:00
apple502j
280be3abc9
Resource Conditions: add feature_enabled (#2658)
* Resource Conditions: add feature_enabled

* Fix impl

* Some refactors

* Address reviews

* Update testmod

* Fix checkstyle

* Move javadoc

* Sort identifiers
2022-11-26 20:00:49 +00:00
modmuss50
49abcf7e64 Update mappings 2022-11-16 16:12:51 +00:00
modmuss50
f84bf2d968
22w45a (#2647) 2022-11-10 16:07:38 +00:00
apple502j
aae9039dc3
Resource conditions: support all tags (#2564)
* Resource conditions: support all tags

* Minor improvements; deprecate old methods

* Fix build?

* Add more tests, throw on null condition

* Add more javadoc

* Javadoc fixes
2022-10-16 15:10:20 +01:00
Technici4n
a29562c81b
Fix @SafeVarargs warnings in Resource Conditions and ColorProviderRegistry (#2547) 2022-09-25 14:47:00 +01:00
modmuss50
e62f51a37f 1.19-rc1
Only mapping updates.
2022-06-02 15:41:09 +01:00
modmuss50
9ff28f4026
Split client only code into its own sourceset. (#2179)
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.
2022-05-21 16:26:46 +01:00
modmuss50
55e82473ab 22w19a 2022-05-12 21:58:35 +01:00
Technici4n
91b7aa665b
Fix tags_populated resource conditions in 1.18.2 (#2099)
* Fix tags_populated resource conditions

* move gametest entrypoint further up before resource manager getting loaded

* Add maxShiftBy

Co-authored-by: deirn <deirn@bai.lol>
Co-authored-by: modmuss50 <modmuss50@gmail.com>
2022-04-10 16:33:09 +01:00
modmuss50
d1027f7d5e Update mappings. 2022-02-19 17:05:08 +00:00
modmuss50
d882b91555
Port to 22w06a (#1989)
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.
2022-02-11 17:02:44 +00:00
modmuss50
d7c144a830
Migrate to SLF4j and update loom (#1960)
* Migrate to SLF4j and update loom

* Update loom

* Update to latest loom
2022-01-30 21:37:23 +00:00
deirn
13eda06580
Fix tags_populated conditions not working (#1957)
closes #1954
2022-01-17 12:11:19 +00:00
Technici4n
12540453db Fabric Resource Conditions (#1656)
* First completed draft

* Update PR, should be close to ready now

* Add fluid/item_tags_populated conditions

* Log processed resource with trace log level

* Use debug instead of trace log level

* Apply suggestions from code review

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Code review suggestions

* writeAdditional -> writeParameters

* Apply suggestions from code review
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* CONDITION_ID -> CONDITION_ID_KEY
2022-01-14 15:10:43 +00:00