Commit graph

99 commits

Author SHA1 Message Date
Technici4n
b808eab9dd
Add more transitive Access Wideners (#2780)
* 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
2022-12-23 15:23:14 +00:00
Technici4n
8a534ba41e
Ensure consistent ordering of datagen TAW (#2781) 2022-12-23 13:09:13 +00:00
modmuss50
112a38be2a
Generate access wideners for DataProvider.getName implementations (#2736)
* Generate AW for DataProvider.getName impls

* Remove final

* Typo + improve memory usage
2022-12-11 13:50:46 +00:00
modmuss50
65e415cb4c
Add some useful helper methods to FabricDynamicRegistryProvider.Entries (#2692)
* Add some useful helper methods to FabricDynamicRegistryProvider.Entries

* Update fabric-data-generation-api-v1/src/main/java/net/fabricmc/fabric/api/datagen/v1/provider/FabricDynamicRegistryProvider.java

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

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2022-11-26 19:58:25 +00:00
modmuss50
6d14859da5
Add FabricDataGenerator.createBuiltinResourcePack to support data generating builtin resourcepacks (#2697) 2022-11-26 19:57:50 +00:00
apple502j
8c84281028
1.19.3-pre2 javadoc fixes (#2698)
* 1.19.3-pre2 javadoc fixes

* Update fabric-data-generation-api-v1/src/main/java/net/fabricmc/fabric/api/datagen/v1/FabricDataGenerator.java

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
2022-11-26 19:57:30 +00:00
modmuss50
ceb5661e2d
Add DataGeneratorEntrypoint.buildRegistry (#2681) 2022-11-24 15:05:09 +00:00
modmuss50
6605894492 Fix invalid accesswidener following the mapping update. 2022-11-23 20:23:12 +00:00
modmuss50
2894d6df22 1.19.3-pre1 2022-11-22 16:28:48 +00:00
90
f36e03c9c8 Add access widener for ItemModelGenerator#writer (#2635)
Allows for the use of custom Models and TextureMaps for generating item models.

(cherry picked from commit ad31814d3c)
2022-11-20 13:45:34 +00:00
modmuss50
49abcf7e64 Update mappings 2022-11-16 16:12:51 +00:00
apple502j
0d6838e783
Rename FabricWorldgenProvider to FabricDynamicRegistryProvider (#2638)
* Rename FabricWorldgenProvider

* Fix merge
2022-11-13 14:46:17 +00:00
modmuss50
f84bf2d968
22w45a (#2647) 2022-11-10 16:07:38 +00:00
modmuss50
f75bcd18f3
22w44a (#2632)
Co-authored-by: Sebastian Hartte <shartte@users.noreply.github.com>
2022-11-03 13:48:27 +00:00
modmuss50
65727739fb Rename FabricDataGenerator.create to createPack 2022-10-28 20:13:56 +01:00
modmuss50
11ba9c3b22
22w43a (#2610)
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
2022-10-26 20:48:38 +01:00
modmuss50
75e98211bd
22w42a 🐫 (#2599)
Co-authored-by: shartte <shartte@users.noreply.github.com>
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2022-10-22 20:38:33 +01:00
modmuss50
b598f4acf2
Add DataGeneratorEntrypoint.getEffectiveModId (#2534) 2022-09-25 14:45:43 +01:00
apple502j
93d8cb82e8
Fix many javadoc issues (#2526)
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2022-09-25 14:45:12 +01:00
mineblock11
0b73465810
FabricLanguageProvider - Data Generation API (#2451)
Co-authored-by: modmuss50 <modmuss50@gmail.com>
Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>
2022-09-25 14:44:35 +01:00
Shnupbups
a680b9b44b
Add some more TAWs to the Datagen Module (#2322)
- 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
2022-06-19 19:17:44 +01:00
modmuss50
2a5b9210c6 1.19-rc2 2022-06-04 21:32:33 +01:00
Technici4n
123f0c73d5 A few datagen fixes (#2250)
* 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)
2022-06-04 21:09:22 +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
55043e695a 1.19-pre1 2022-05-18 19:16:52 +01:00
modmuss50
55e82473ab 22w19a 2022-05-12 21:58:35 +01:00
Player
729842f055 22w18a 2022-05-04 21:56:29 +02:00
modmuss50
ec94c6f636
22w16b
Co-authored-by: Player <player@player.to>
2022-04-20 22:22:10 +01:00
modmuss50
734df6198f Fix datagen failures not exiting with a none zero exit code. (#2141)
* Fix datagen failures not exiting with a none zero exit code.

* Checkstyle :)
2022-04-17 19:49:15 +01:00
modmuss50
c65ffd6601 Fix FabricTagProvider generating tags in incorrect directories. 2022-04-17 19:49:15 +01:00
Deximus-Maximus
614e540081 Add fabric-convention-tags-v1 (#2063)
* 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>
2022-04-17 19:49:14 +01:00
modmuss50
8eae451042 22w15a 2022-04-13 19:03:57 +01:00
modmuss50
717abbc48a 22w14a 2022-04-06 21:49:45 +01:00
modmuss50
09a7afff2f 22w13a 2022-03-31 18:38:32 +01:00
Player
7463d67c85 22w11a 2022-03-18 00:33:37 +01:00
Deximus-Maximus
6d3e56363a
Fix optional tag from tagkey generation (#2070) 2022-03-13 13:51:58 +00:00
modmuss50
b5a7ab53f9 1.18.2-rc1 - AW build fix due to mapping changes. 2022-02-25 17:47:36 +00:00
modmuss50
ebd24f870f
Misc FabricTagProvider fixes and improvements. (#2019)
* Misc tag data gen fixes.

* Fix backwards compat issue.
2022-02-23 16:17:26 +00:00
modmuss50
d1027f7d5e Update mappings. 2022-02-19 17:05:08 +00:00
modmuss50
5a05a77ac9 22w07a 2022-02-16 19:24:00 +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
Shnupbups
9b5f02e4eb
Datagen Renames (#1910)
* Renames

* whoops

* Return dataGenerator fields in deprecated classes

* fix up conflicts

* Update FabricRecipesProvider.java
2022-02-11 13:27:31 +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
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
modmuss50
9b1557c1f3
Allow adding vanilla tags to FabricTagBuilder (#1926)
Co-authored-by: deirn <deirn@bai.lol>
2021-12-22 18:55:37 +00:00
deirn
c568f923d0
Add datagen support for dynamic registry tags (#1890)
* Add datagen support for dynamic registry tags

* Update according review

* Make FabricTagBuilder final

* Throw AssertionError if expected errors didn't happen
2021-12-22 18:25:57 +00:00
modmuss50
c2214d9892 Update minimum loader version to 0.12.12 and build against 1.18.1.
This is done to help promote people to use a loader version that has full mitigations against the log4j exploits.
2021-12-22 17:22:58 +00:00
Shnupbups
252fd7d614
Datagen Additions (#1911)
* 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>
2021-12-22 17:09:51 +00:00
modmuss50
3fec4ad922
Fabric Data Generation API (#1824)
* First look at datagen

* First pass on item/block models

* Tags

* Advancements + BlockFamilies

* Loot tables

* Cleanup

* Start on javadocs, and cleanup

* Update for new mappings.

* Added client-side entrypoint and more logging.

* Complete javadoc, add modid filter and misc fixes/cleanup.

* Minor fixes.

* Renames and misc changes.

* Strict validation fixes.

* Apply suggestions from code review

Co-authored-by: Shnupbups <shnupbups@gmail.com>

* Update fabric-data-generation-api-v1/src/main/java/net/fabricmc/fabric/api/datagen/v1/FabricDataGenerator.java

Co-authored-by: Shnupbups <shnupbups@gmail.com>

* Update fabric-data-generation-api-v1/src/main/java/net/fabricmc/fabric/api/datagen/v1/FabricDataGenerator.java

Co-authored-by: Shnupbups <shnupbups@gmail.com>

* Review fixes.

* Set generated dir as resources not sources.

Co-authored-by: Sebastian Hartte <shartte@users.noreply.github.com>
Co-authored-by: Shnupbups <shnupbups@gmail.com>
2021-12-03 13:35:29 +00:00