Commit graph

344 commits

Author SHA1 Message Date
modmuss50
b2a1ac47de 1.20.5-pre3 2024-04-16 15:17:20 +01:00
modmuss50
2a2c66b625 1.20.5-pre2 fixes 2024-04-15 17:01:26 +01:00
modmuss50
d4f1273d0b 1.20.5-pre2 2024-04-15 16:29:01 +01:00
modmuss50
cfb0a2d3d2 Bump version 2024-04-14 13:40:56 +01:00
apple502j
c5fc38b3f7
Finish port to 1.20.5-pre1 (#3706)
* Buildscript changes

* Particle API: port and some refactor

* Add support for Ingredient in FabricBrewingRecipeRegistry

* Add private ctor to ClientPlayerBlockBreakEvents

Not related to port, but something I've found during the process.
Also adds final to CommonLifecycleEvents.

* Fix Sound API testmod

* Fix broken javadocs

* Codec-related changes

* Document behavior of SUCCESS_NO_ITEM_USED in UseEntityCallback

* Add getEnabledFeatures

* checkstyle
2024-04-14 13:26:09 +01:00
modmuss
74e2f560d5
1.20.5-pre1 (#3700)
* 1.20.5-pre1

* BrewingRecipeRegistryBuilderCallback

* Remove debug line

* Fix build

* Bump version
2024-04-10 19:02:33 +01:00
modmuss50
f1e646e4d5 24w14a & Java 21 2024-04-03 15:46:52 +01:00
apple502j
97f703da44
Improve data attachment port (#3678)
* Bump yarn

* Apply yarn update

* Fix porting of Data Attachment block entity support

* Fix FrameBlockEntity testmod
2024-04-03 15:39:47 +01:00
modmuss
b21c00cb44
24w13a (#3676)
Fixes https://github.com/FabricMC/fabric/issues/3669

Co-authored-by: Drex <nicknamedrex@gmail.com>
2024-03-27 19:26:14 +00:00
apple502j
9b3069f652
Fully port to 24w12a (#3664)
* Bump yarn

* Apply yarn update

* Sync map decorations type registry

* Remove Mining Level API

* Port loot API

* whoops

* Rename LootManagerMixin

* Fix javadoc

* Fix registerGiftLootTable

* RegistryKey is traditionally compared using identity

* Fix wrong loot source being used
2024-03-27 16:47:29 +00:00
modmuss
e9d2a72b4f
24w12a (#3658)
# Removed
- FabricItemStack.isSuitableFor (replaced with vanilla component)
- FabricItemStack.getFoodComponent (replaced with vanilla component)
- ResourceReloadListenerKeys.LOOT_TABLES
- fabric-resource-conditions-api-v1 support for loot tables

# Disabled modules
- fabric-loot-api-v2
- fabric-mining-level-api-v1
2024-03-20 19:08:34 +00:00
modmuss50
3a09d40a83 Bump version 2024-03-18 09:24:37 +00:00
modmuss50
dac6c6d2c0 Bump version 2024-03-14 20:32:00 +00:00
modmuss50
9bd9228c21 24w11a 2024-03-14 16:55:10 +00:00
modmuss50
15922910f6 Bump version 2024-03-12 10:51:02 +00:00
modmuss50
031f0cf067 24w10a 2024-03-06 16:40:52 +00:00
modmuss50
29bc5c1b06 Bump version 2024-03-04 09:45:59 +00:00
modmuss50
d20e1f08cb Bump version 2024-03-01 17:48:56 +00:00
modmuss50
2f977a43d9 Bump version 2024-02-29 19:21:21 +00:00
modmuss
1172e89799
24w09a (#3623)
* In game

* More fixes

* Small fixes + changes

* Rename

* Fix test
2024-02-29 19:16:35 +00:00
modmuss50
c81ced1dbb Bump version 2024-02-25 13:50:20 +00:00
modmuss50
4fcbeea9b2 Bump version 2024-02-18 13:23:47 +00:00
modmuss50
548b1e1b9e 24w07a 2024-02-14 19:17:38 +00:00
modmuss50
44ed7ba466 Bump version 2024-02-12 18:07:29 +00:00
modmuss50
24d3f0ed2d Bump version 2024-02-09 17:57:56 +00:00
apple502j
109a837c6e
24w06a porting fixes (#3578)
* Bump yarn

* Fix TagsLoaded event again

* Resource Loader: internal refactor (name to ID)

* More refactors

* Reset ignoreFallDamageAboveY when using custom elytra

* fix checkstyle
2024-02-09 17:36:06 +00:00
modmuss50
54b4400cee 24w06a 2024-02-07 19:01:58 +00:00
modmuss50
b77b568afd Bump version 2024-02-05 11:32:53 +00:00
modmuss
03be9f1df2
Port to 24w05a (#3560)
Co-authored-by: Drex <nicknamedrex@gmail.com>
2024-01-31 20:24:57 +00:00
modmuss50
f3561f053e Bump version 2024-01-28 13:53:02 +00:00
modmuss50
9bfa344c7d 24w04a 2024-01-24 19:59:21 +00:00
modmuss
7b70ea8a7a
Port to 24w03b (#3537)
* Deprecate FabricBlockSettings

* Deprecate FabricItemSettings

* Start on 24w03a

* Main menu :)

* Update mappings

* PayloadTypeRegistry

* Networking part 2 of many

* Networking part 3 of many

* Networking part 4 of many

* Recipe api

* Port Item API to 1.20.5

* Is this even right?

* Port FabricParticleTypes to 1.20.5

* Remove redundant fuel caching logic

* Remove fabric-containers-v0, deprecated since 2020

* Regsync work

* Adapt screen handler to new networking

* Update yarn + more work

* More mapping updates

* Compile fixes

* Checkstyle + small fixes

* Single and multiplayer fixes

* Handle play packets on main thread.

* Update mappings

* Even more networking

* Networking tests

* Fix todo's

* Update javadocs

* Networking API improvements

* Some small regsync refactors

* Fix handling of null NBT in NbtIngredient

* Update fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/api/object/builder/v1/block/FabricBlockSettings.java

Co-authored-by: ErrorCraft <51973682+ErrorCraft@users.noreply.github.com>

* Update fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/api/object/builder/v1/block/FabricBlockSettings.java

Co-authored-by: ErrorCraft <51973682+ErrorCraft@users.noreply.github.com>

* Add context objects

* ChannelInfoHolder.getPendingChannelsNames -> fabric_getPendingChannelsNames

* Fix crash

* send `c:register` packet for play phase instead of config (#3544)

* Bump version

---------

Co-authored-by: ErrorCraft <51973682+ErrorCraft@users.noreply.github.com>
Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>
Co-authored-by: Drex <nicknamedrex@gmail.com>
Co-authored-by: deirn <deirn@bai.lol>
2024-01-22 18:24:37 +00:00
Syst3ms
93072209fd Data Attachment API (#3476)
* Data Attachment API

* javadoc

* Remove AttachmentSerializer & independent syncability and persistence

- removed AttachmentSerializer in favor of codecs
- renamed serializability to "persistence"
- made persistence and syncability independent switches
- reworked convenience registry methods to use Suppliers from the get-go

* Move some serialization-related methods to impl

- changed logger name

* rename Attachment to AttachmentType

* Added DefaultedAttachmentType and reworded Javadoc

* add warning in getAttached

* javadoc

* fix defaulted API

* Add unit tests

* remove DefaultedAttachmentType, add helper methods

bikeshedding inbound

* add more unit tests

* add testmod

it works

* stash syncing for a further PR

* missed license header

* address most reviews

* more reviews

* naming convention

* fix tyop

* fix invalid file name error

* simplify API in the absence of sync

It was established that the presence of a codec might be useful for other things than persistence, and while this seems to couple the two, the API can be changed later in a backward-compatible way if need be.

* couple codec with persistence

committing to the change I mentioned previously

* little fixes

* Fix mixins + requests

- Copy attachments on entity copy,& with a customizable flag in the case of player respawn
- Call relevant change-notifying methods when calling setAttached on BEs and chunks
- Change persistence key
- Fix mixin visibility

* Write tests for entity copy

* replace mixin by COPY_FROM event

* missed license header

* more advanced copy mechanics

- attachments require an EntityCopyHandler to be copied across entities
- a copy handler is automatically derived if there's a codec
- updated javadoc for chunk and BE targets

* Revert "more advanced copy mechanics"

This reverts commit 3f53b554fb.

* replaced complicated API by a stern warning

- also handled cross-world entity teleportation

* add gametest

* fix compilation

* flipped boolean

* forgot some more bools to flip

* requests

* fix FMJ

* fix BE mixin and add gametest

* add client player entity copying

* Use new mob conversion event

---------

Co-authored-by: modmuss <modmuss50@gmail.com>

(cherry picked from commit 25e1b4769d)
2024-01-19 11:15:42 +00:00
modmuss50
80f8cf516f Update Fabric Loader 2024-01-17 17:15:38 +00:00
modmuss50
c10e41a5b1 Bump version 2024-01-15 13:54:51 +00:00
modmuss50
6f3c2ac4f4 Bump version 2024-01-11 20:48:04 +00:00
modmuss50
3fc873d1ee Bump version 2024-01-11 16:09:27 +00:00
modmuss50
6ae4991e0e Bump version 2024-01-05 18:26:42 +00:00
modmuss50
6fb5fe468a Bump version 2023-12-27 13:22:02 +00:00
modmuss50
efa5891941 Update CF version 2023-12-18 18:53:24 +00:00
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
modmuss50
4ced05928d Fix sleeping direction always being null.
Closes #3470
Closes #3471
2023-12-16 10:32:34 +00:00
modmuss50
33cef71655 Bump version 2023-12-08 15:43:09 +00:00
modmuss
78d798af9d
Update to loader 0.15 (#3451) 2023-12-08 15:19:17 +00:00
modmuss50
b46767fdfc 1.20.4 2023-12-07 22:02:02 +00:00
modmuss50
dc89771ba2 1.20.4-rc1 2023-12-06 17:20:08 +00:00
modmuss50
e5e39e755d 1.20.3-pre4 2023-11-29 22:28:22 +00:00
modmuss50
f6e85ac2bb 1.20.3-pre3
Just mapping updates
2023-11-27 16:17:03 +00:00
modmuss50
e0858cfb7b Bump version 2023-11-27 10:28:56 +00:00
modmuss50
00e49842c5 Bump version 2023-11-26 13:52:44 +00:00
modmuss50
1b2a41bc96 1.20.3-pre2 2023-11-22 15:24:46 +00:00
modmuss50
ed814d36ba 1.20.3-pre1
Just a mappings update :)
2023-11-20 16:36:56 +00:00
modmuss50
7feff5da3e Fix creative inventory buttons showing without any modded item groups.
Also, a minor code cleanup from the port.
2023-11-17 17:55:40 +00:00
modmuss50
6f7ba8f277 23w46a 2023-11-16 17:01:20 +00:00
modmuss50
23e8616e74 23w45a 2023-11-08 16:26:36 +00:00
modmuss50
0f7e959b65 Bump version 2023-11-02 12:50:14 +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
07fc18e505 Bump version 2023-10-22 14:46:22 +01:00
modmuss50
77996a0c10 Fix client crash introduced in the 23w42a port 2023-10-18 18:13:34 +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
ae7e00873a Bump version 2023-10-08 13:35:10 +01:00
modmuss50
10292b95f5 23w40a 2023-10-05 09:45:32 +01:00
modmuss50
670b2ea08d Bump version
All versions bumped due to Loom upgrade.
2023-10-01 12:48:38 +01:00
modmuss50
3ccb77f2a4 Bump version 2023-09-23 10:11:13 +01:00
modmuss50
b1913a6ae6 Bump version 2023-09-21 19:33:57 +01:00
modmuss50
8fe45160ad 1.20.2 2023-09-21 19:23:46 +01:00
modmuss50
0708114127 Bump version 2023-09-18 18:07:48 +01:00
modmuss50
5c133856b8 1.20.2-rc2 2023-09-18 16:13:25 +01:00
modmuss50
daef22a2cb 1.20.2-rc1 2023-09-15 15:27:05 +01:00
modmuss50
109a65e5af 1.20.2-pre4 2023-09-13 17:22:35 +01:00
modmuss50
3bafade3d1 1.20.2-pre2 2023-09-07 15:23:20 +01:00
modmuss50
435112151c 1.20.2-pre1 2023-09-05 16:31:02 +01:00
modmuss50
462ea84f7d Bump version 2023-09-03 21:54:51 +01:00
modmuss50
22fb02c315 Bump version 2023-09-03 13:34:17 +01:00
PepperCode1
73761d2e2d BlockView API v2 (#3268)
* Fabric BlockView API v2

* Fix dependency on nonexistent module

* Add test for biome getter

* Improve getBiomeFabric documentation

* Simplify javadoc

(cherry picked from commit 92a0d36746)
2023-09-03 13:13:56 +01:00
modmuss
fce67b32cf
23w35a (#3292) 2023-08-31 12:50:38 +01:00
modmuss50
f091af96c5 23w33a 2023-08-17 16:51:04 +01:00
modmuss50
11da534fdc Bump version 2023-08-13 16:26:33 +01:00
modmuss50
09816d0313 Fix createAndPopulateRegistryMap() always returning null, preventing registry sync.
This was caused by the changes in the port to 23w32a
2023-08-11 12:14:20 +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
modmuss50
d9acd820fc Bump version 2023-07-25 14:55:57 +01:00
modmuss50
e3d1b5f3d8 Bump version 2023-07-18 13:55:53 +01:00
Technici4n
9386d8a793
Model Loading API v1 (#3145)
This PR deprecates and supersedes the old `fabric-models-v0` module.

## Refactors compared to v0
### Model loading hooks
Mods now register a single `ModelLoadingPlugin` for any change they want to make to the model loading process. (Or multiple plugins if they want to). This replaces the old `ModelLoadingRegistry`.

Here is an example:

```java
ModelLoadingPlugin.register(pluginContext -> {
    // ResourceManager access is provided like in the v0 API, but in a central place, and can be used for shared processing in the plugin.
    ResourceManager manager = pluginContext.resourceManager();

    // Model resource providers still exist, but they are called model resolvers now
    pluginContext.resolveModel().register(context -> {
        // ...
    });
});
```

#### `ModelVariantProvider` -> `BlockStateResolver`
`ModelVariantProvider` was heavily reworked, and is now replaced by the `BlockStateResolver`, with a much better defined contract.

#### `ModelResourceProvider` -> `ModelResolver`
The resource provider is mostly unchanged. The biggest difference is that it is now registered as an event listener. This allows mods to use event phases for ordering between conflicting ~~providers~~ resolvers.

#### Removed custom exception
Additionally, `ModelProviderException` could be thrown by a variant or resource provider in the v0 API. This was not explained in the documentation, and would according to the code stop further processing of the providers and log an error.

In the new API, any `Exception` is caught and logged. If that happens, the other resolvers are still processed. There is no custom `Exception` subclass anymore.

### Helper method to get a `BakedModel` by `Identifier` from the manager
The v0 had such a method in a helper class: `BakedModelManagerHelper#getBakedModel`. It is now interface-injected instead. See `FabricBakedModelManager`.

## New model wrapping hooks
New hooks are added for the various needs of mods that want to override or wrap specific models. Thanks to @embeddedt for contributing an initial version of them!

Here is an example of wrapping the gold model to remove the bottom quads, for example:
```java
ModelLoadingPlugin.register(pluginContext -> {
	// remove bottom face of gold blocks
	pluginContext.modifyModelAfterBake().register(ModelModifier.WRAP_PHASE, (model, context) -> {
		if (context.identifier().getPath().equals("block/gold_block")) {
			return new DownQuadRemovingModel(model);
		} else {
			return model;
		}
	});
});
```

There are 3 events, for the following use cases:
- Wrapping `UnbakedModel`s right when they are loaded. This allows replacing them entirely in dependent models too.
- Wrapping `UnbakedModel`s right before they are baked. This allows replacing them without affecting dependent models (which might not be expecting a model class change).
- Wrapping `BakedModel`s right when they are baked.

Multiple mods have implemented their own version of them. Providing them in Fabric API will make it easier on these mods, and will additionally allow optimization mods that perform on-demand model loading to simply fire the hooks themselves instead of working around injections performed by other mods.

Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com>
Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2023-07-18 12:53:13 +01:00
modmuss50
1ac061308b Bump version 2023-07-03 14:05:25 +01:00
modmuss50
8643158e89 Bump version 2023-06-21 10:18:14 +01:00
modmuss50
91e182c28a Bump version 2023-06-13 12:49:45 +01:00
modmuss50
5c1d40156b 1.20.1-rc1 2023-06-09 16:09:11 +01:00
modmuss50
96a7932e17 Bump version 2023-05-30 13:41:14 +01:00
modmuss
b3afc78b68
Setup unit tests & format gradle files. (#3073) 2023-05-30 13:07:11 +01:00
modmuss50
e808a8f296 1.20-pre7 2023-05-29 16:13:02 +01:00
modmuss50
df34a27454 1.20-pre6 2023-05-25 14:26:11 +01:00
modmuss50
488c3cd2d8 Bump version 2023-05-24 21:22:22 +01:00
modmuss50
ec0bbba5e9 1.20-pre5 2023-05-23 14:58:33 +01:00
modmuss50
63e9e1806d 1.20-pre3
- Only mapping updates.
2023-05-19 13:34:23 +01:00
modmuss50
b04edc7ab9 1.20-pre2 2023-05-16 15:36:50 +01:00
Technici4n
6b6af38432 Bump version 2023-05-15 21:36:03 +02:00