Commit graph

48 commits

Author SHA1 Message Date
modmuss
3434862fbd
Port to 23w51b (#3474)
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`
2023-12-18 18:47:42 +00:00
modmuss
78d798af9d
Update to loader 0.15 (#3451) 2023-12-08 15:19:17 +00:00
modmuss50
1b2a41bc96 1.20.3-pre2 2023-11-22 15:24:46 +00:00
modmuss50
d49cb47876 Update generated TAWs. 2023-11-21 08:16:48 +00:00
modmuss50
6f7ba8f277 23w46a 2023-11-16 17:01:20 +00:00
apple502j
a2e8758a92
23w45a porting fixes (#3421) 2023-11-16 16:11:10 +00:00
modmuss50
23e8616e74 23w45a 2023-11-08 16:26:36 +00:00
modmuss50
f31bf881a9 23w44a 2023-11-01 17:00:09 +00:00
modmuss50
3b908f6ae4 23w43a 2023-10-25 16:48:41 +01:00
modmuss50
2148f3b922 23w42a 2023-10-18 17:14:09 +01:00
modmuss50
13986bf795 23w41a 2023-10-11 16:56:02 +01:00
modmuss50
10292b95f5 23w40a 2023-10-05 09:45:32 +01:00
modmuss
fce67b32cf
23w35a (#3292) 2023-08-31 12:50:38 +01:00
modmuss50
0ba8e9ce03 23w32a 2023-08-09 18:04:04 +01:00
modmuss
86b12645b9
23w31a 2023-08-07 09:09: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
Shnupbups
6c31357e16
Some more TAWs for block creation and block loot tables (#3201)
* 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
2023-07-18 12:54:51 +01:00
modmuss
b3afc78b68
Setup unit tests & format gradle files. (#3073) 2023-05-30 13:07:11 +01:00
qouteall
4014940769 Add an event that fires when client player left-clicks (#3043)
The ClientPreAttackCallback will fire every tick when the attack key is pressed, before vanilla attack handling. If the callback returns true, then the vanilla handling (breaking block, attacking entity, swining hand) will be cancelled. For multiple callbacks, if the former callback returns true, the later callback won't execute.

This event does not consider attack cooldown.
2023-05-30 12:51:54 +01:00
modmuss50
df34a27454 1.20-pre6 2023-05-25 14:26:11 +01:00
Maity
41a649626a
Fix last few transitive access wideners missing the transitive- prefix (#3064)
Also add validation to make sure that the generated `.accesswidener` has only transitive access modifiers.
2023-05-15 21:04:07 +02:00
Technici4n
fffc558953 Add TAWs for DamageSources (#3048)
Co-authored-by: modmuss50 <modmuss50@gmail.com>
2023-05-14 15:01:43 +01:00
Maity
0bf6077708 Add some new TAWs for tree worldgen (#3060)
* TAWs for worldgen

* Impl suggestions

* Forgot run generateAccessWidener ;)
2023-05-14 15:01:19 +01:00
modmuss50
03ef495b7f 1.20-pre1 2023-05-10 14:51:08 +01:00
modmuss50
cbbb1b3fc0 23w18a 2023-05-03 14:56:35 +01:00
modmuss50
fb8d95dacb Split test mods into client and common. (#3033) 2023-05-01 14:04:29 +01:00
modmuss50
848ffaabb4 23w13a 2023-03-29 16:07:13 +01:00
Shnupbups
63b515f4db
BlockSetTypeRegistry and WoodTypeRegistry (#2916)
* 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
2023-02-22 12:54:42 +00:00
modmuss50
e45f7c6532 23w07a 2023-02-15 19:54:58 +00:00
modmuss50
57338cbe24 23w06a 2023-02-08 17:54:34 +00:00
modmuss50
12a6ba2c15 23w05a 2023-02-01 16:35:59 +00:00
modmuss50
a1ccd7bfed 23w04a 2023-01-24 16:59:43 +00:00
Shnupbups
5b9a588bfd
Autogenerate Item constructor TAWs (#2795)
`generateAccessWidener` task in TAW module will now automatically generate TAWs for the constructors of non-abstract item classes, similar to how it already did so for blocks.
As such, previously manually added item constructor TAWs have been removed from the template. This also means that `HoeItem` is now TAW'd. (I totally overlooked it earlier... whoops!)
2023-01-02 13:05:24 +00:00
Daomephsta
1d37d50279 API for brewing recipes which use Ingredients instead of Items (#2670)
* API for brewing recipes which use Ingredients instead of Items

* Improve comments and JavaDoc

* Update mixin compatibility level

* Replace accessor mixin with access widener

* Fix double space

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

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
(cherry picked from commit 7c6cd14d84)
2022-12-23 15:37:09 +00:00
AlphaMode
6dc0edd789 Deprecated BlockEntityRendererRegistry in favor of vanilla's BlockEntityRendererFactories (#2582)
* Deprecated BlockEntityRendererRegistry in favor of vanilla's BlockEntityRendererFactories

* Undo unintended change

* Update fabric-transitive-access-wideners-v1/src/main/resources/fabric-transitive-access-wideners-v1.accesswidener

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>

* Update BlockEntityRendererRegistry javadoc to match others

* Implement sign renderer test

* Fix template

* Change SignTestBlockEntity to SignBlockEntityTest

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>

(cherry picked from commit 08b73de4d1)
2022-12-23 15:32:51 +00:00
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
modmuss50
0efcd39b73
Add access widener for SoundEvent.of (#2695)
* Add access widener for SoundEvent.of

* Update fabric-transitive-access-wideners-v1/template.accesswidener

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

* Update fabric-transitive-access-wideners-v1/src/main/resources/fabric-transitive-access-wideners-v1.accesswidener

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

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: Shnupbups <shnupbups@gmail.com>
2022-11-26 19:58:01 +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
modmuss50
f75bcd18f3
22w44a (#2632)
Co-authored-by: Sebastian Hartte <shartte@users.noreply.github.com>
2022-11-03 13:48:27 +00: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
Shnupbups
42d99c329d
Add many more transitive access wideners (#2341)
- `DamageSource` constructor and methods made accessible - supersedes #1085
- `SpawnRestriction` method `register` made accessible - allows `SpawnRestrictionAccessor` mixin to be removed
- `TradeOffers` trade factory inner classes made accessible
- `Material$Builder` methods made accessible (except `lightPassesThrough` method as that would break binary compat in `FabricMaterialBuilder`
- Fixed `generateAccessWideners` task for TAWs module so it can now find the jar
- `AxeItem`, `MusicDiscItem`, and `PickaxeItem` constructors made accessible
- `ItemUsageContext` and `ItemPlacementContext` alternate constructors made accessible - allows passing a `null` PlayerEntity
- `Factory` inner classes of both `CookingRecipeSerializer` and `CuttingRecipeSerializer` made accessible
- `BrewingRecipeRegistry` methods `registerItemRecipe`, `registerPotionType`, and `registerPotionRecipe` made accessible
- `ScoreboardCriterion` `create` methods made accessible
- `ModelPart` inner classes `Vertex` and `Quad` made accessible
- `RenderLayer` `of` method made accessible
- `SensorType` and `Activity` constructors made accessible
- `LivingEntity` methods `damageArmor`, `damageHelmet`, and `damageShield` made accessible
- `ProjectileEntity` constructor made accessible
- `FishingBobberEntity` alternate constructor made accessible - allows passing luck of the sea or lure levels for custom fishing bobbers
- `ServerWorld` method `sendToPlayerIfNearby` made accessible
- `TextColor` method `getHexCode` made accessible
- `TranslatableTextContent` method `getArg` made accessible
2022-08-15 18:41:18 +01:00
Technici4n
1e232e13ae
Move a few object builders to transitive AWs (#2154)
* Move a few object builders to transitive AWs

* Remove outdated access widener

* Remove controversial deprecation of FabricBlockEntityTypeBuilder
2022-08-06 19:01:41 +01:00
Juuxel
9e7660c677 Loot table API v2
- Deprecates all classes and methods that use outdated Yarn names.
- Adds FabricLootTable and FabricLootTableBuilder to replace
  the LootSupplier naming variants.
- Deprecates LootEntryTypeRegistry and LootJsonParser
  as their functionality is exposed in vanilla now.
- Adds methods to FabricLootPoolBuilder for working
  with collections as builder parameters.
- FabricLootPool and FabricLootTable/Supplier now return immutable lists
  instead of modifiable fixed-size ones.

  Co-authored-by: i509VCB <i509vcb@gmail.com>
2022-05-31 13:09:54 +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
09a7afff2f 22w13a 2022-03-31 18:38:32 +01:00
Juuxel
40c91ec8c3
Create transitive AW module (#2044)
* Add transitive AW module with block constructors

* Add various registries to transitive AW module

* Fix module name in README, add skip flags to class reading

* Add reasons for TAWs, document Block ctor finding algorithm
2022-03-13 13:52:38 +00:00