Commit graph

1853 commits

Author SHA1 Message Date
modmuss50
c6abe49647 Bump versions 2024-11-27 18:10:50 +00:00
modmuss50
1885ad74d1 1.21.4-pre3 2024-11-27 18:08:27 +00:00
modmuss
cc0fa2fec8
Add optional registries & refactor registry sync (#4233)
* Refactor registry sync

* Remove old file

* Checkstyle

* Fixes

* Improve error message

* Fix

* Fix test
2024-11-27 18:01:38 +00:00
modmuss
b90fb141f3
Update loom (#4253) 2024-11-27 18:01:28 +00:00
modmuss50
b9e68eb56c Bump version
Some checks failed
Build / build (21-ubuntu) (push) Has been cancelled
Build / client_test (push) Has been cancelled
Build / server_test (push) Has been cancelled
Build / check_resources (push) Has been cancelled
2024-11-25 18:27:43 +00:00
JustRed23
6dc662b6c6 Fix AFTER_SETUP event not being able to render (#4219)
* Add BEFORE_TERRAIN world render event

* Add 1.21.2 rendering issue warning

* Add comment to injection point

* close b tag

* Undo all new event changes

* Move AFTER_SETUP event to new mixin

* Remove event interface

* Refine mixin

(cherry picked from commit 69228316a9)
2024-11-25 18:23:43 +00:00
Daniel Orr
56e78b9be0 Add transitive access wideners for tracked data related creator entity methods (#4229)
* feat: transitive access wideners for display entity fields

* fix: change display transitive access widener collector to check for dataTracker accesses

* fix: incorrect method names & comments

* refactor: move getMethodParameterCount to use existing lib

* feat: InteractionEntity methods & missing method from DisplayEntity

(cherry picked from commit 54a41b1cc9)
2024-11-25 18:13:37 +00:00
modmuss
aa5b2ca19e
Add RegistryEntryAddedCallback.allEntries (#4235)
* Add RegistryEntryAddedCallback.allEntries

* Pass a RegistryEntry.Reference

* Remove some temp test code

* Add note about recursion.
2024-11-25 18:12:59 +00:00
modmuss
6383078589
Fix crash with custom signs. (#4240) 2024-11-25 18:12:28 +00:00
modmuss50
5f014276c3 1.21.4-pre2 2024-11-25 18:11:53 +00:00
modmuss50
5d559cbc72 1.21.4-pre1
Some checks failed
Build / build (21-ubuntu) (push) Has been cancelled
Build / client_test (push) Has been cancelled
Build / server_test (push) Has been cancelled
Build / check_resources (push) Has been cancelled
2024-11-20 15:12:48 +00:00
modmuss50
7db2e61470 Bump version
Some checks failed
Build / build (21-ubuntu) (push) Has been cancelled
Build / client_test (push) Has been cancelled
Build / server_test (push) Has been cancelled
Build / check_resources (push) Has been cancelled
2024-11-18 18:34:18 +00:00
modmuss50
334f9fee6f Rename includeData to requestIncludeData and improve docs. 2024-11-18 18:28:25 +00:00
fishshi
e496eb156b Change outdated setPredicate to addPredicate. (#4234)
(cherry picked from commit c9d82ab2d8)
2024-11-18 18:08:00 +00:00
modmuss
9aea556b88
Provide a RegistryByteBuf for attachment syncing (#4223)
* Provide a RegistryByteBuf for attachment syncing

* None breaking?

* Slight improvement

* Test syncing an item stack

* Jdoc fix

* Jdoc fix
2024-11-18 18:07:34 +00:00
modmuss
8ca5486fd5
Fix client test random crashes (#4224)
* Fix client test random crashes

* Improve

* Even easier
2024-11-18 18:07:19 +00:00
modmuss50
8eedec2580 Fix ModelProvider.ItemAssets generating duplicate models. 2024-11-18 18:06:51 +00:00
Jochen Jacobs
105e1a95fc
Add transitive access wideners for ID_MAPPER of ItemModelTypes and related types (#4228)
* Add transitive access wideners for ID_MAPPER of ItemModelTypes and related types

* generate resources
2024-11-18 18:05:39 +00:00
apple502j
f12498d0af
Fix includeData in pick events (#4232)
* Fix includeData in pick events

* Fix javadoc
2024-11-18 18:05:28 +00:00
modmuss50
a884cf33d9 Ensure that the full datagen test is ran on build.
Some checks failed
Build / build (21-ubuntu) (push) Has been cancelled
Build / client_test (push) Has been cancelled
Build / server_test (push) Has been cancelled
Build / check_resources (push) Has been cancelled
2024-11-14 11:01:15 +00:00
modmuss50
34467ab425 Add back missing generated atlas files
Some checks are pending
Build / build (21-ubuntu) (push) Waiting to run
Build / client_test (push) Waiting to run
Build / server_test (push) Waiting to run
Build / check_resources (push) Waiting to run
2024-11-13 18:38:46 +00:00
modmuss50
203e6b2369 24w46a 2024-11-13 18:31:05 +00:00
modmuss50
b488af79da Bump version
Some checks are pending
Build / build (21-ubuntu) (push) Waiting to run
Build / client_test (push) Waiting to run
Build / server_test (push) Waiting to run
Build / check_resources (push) Waiting to run
2024-11-12 18:40:34 +00:00
fishshi
84536d3243 remove outdated SUCCESS_NO_ITEM_USED (#4215) 2024-11-12 18:34:36 +00:00
Fabric Bot
15afce79f4 Translation updates (#4194) 2024-11-12 18:31:25 +00:00
fishshi
bf2a60ebf8 Add AFTER_CLIENT_WORLD_CHANGE (#4173)
* add AFTER_CLIENT_WORLD_CHANGE

* fix

* move

* add description to README and change class to final with a private constructor

* revert the event name
2024-11-12 18:31:23 +00:00
Syst3ms
ca8aad0623 Data Attachment Sync API (#4049)
Completes the data attachment API with client-server syncing capabilities.

## Motivation

The existing API works great for attaching data to game objects, be they serverside or clientside, but lacks any ability to synchronize between the two.

A mod that wants to add a "thirst" mechanic can easily do so on the server side by attaching an integer to every player. However, the mod may also want to use this information to render additional HUD elements on the client. Currently, informing the client of this data can only be done manually, which is cumbersome, error-prone, and is much better-suited as an API feature.

## API Changes

The API doesn't change a lot (at least compared to the implementation), with a few new methods and one new class.

One new method has been added to `AttachmentRegistry.Builder`, namely `syncWith`. It declares that an attachment type may be synchronized with some clients, and takes a `PacketCodec` to encode attachment data over the network, as well as an element of the new `AttachmentSyncPredicate` interface.

This interface extends `BiPredicate<AttachmentTarget, ServerPlayerEntity>` to allow for user-defined predicates, and provides some common presets:
* `all()`: attachment data will be synchronized with all clients (that track the target).
* `targetOnly()`: attachment data will only be synchronized with the target it is attached to, when it is a player. If the target is not a player, it won't be synchronized with any client.
* `allButTarget()`: reverse of the above. For non-player targets, attachment data will be synchronized with all clients.

**NOTE**: for a user-defined condition, whether attachment data is synchronized with a client can change at runtime (e.g. "sync only with operators" when a player changes operator status). A specialized method to "refresh" data was considered, but in the end discarded due to complexity. It falls to individual mods to handle these edge cases.

AttachmentType also gets one new `isSynced` method to know whether a given attachment type can be synced.

## Usage

Here is how one could register an attachment for a "thirst" meter like mentioned above.
```java
public static final AttachmentType<Integer> THIRST = AttachmentRegistry.<Integer>builder()
    .initializer(() -> 20) // start with a default value like hunger
    .persistent(Codec.INT) // persist across restarts
    .syncWith(PacketCodecs.VAR_INT.cast(), AttachmentSyncPredicate.targetOnly()) // only the player's own client needs the value for rendering
    .buildAndRegister(Identifier.of("modid", "thirst"));
```
2024-11-12 18:31:14 +00:00
Prospector
b45c27852a
Fix raw materials item tag having duplicate entries (Fixes #4182) (#4203) 2024-11-12 18:16:50 +00:00
Prospector
8ff5c951d0
Add stripped pale oak logs & wood to their respective conventional tags (Fixes #4181) (#4199) 2024-11-12 18:16:40 +00:00
modmuss50
a81ce912a4 Bump version
Some checks failed
Build / build (21-ubuntu) (push) Has been cancelled
Build / client_test (push) Has been cancelled
Build / server_test (push) Has been cancelled
Build / check_resources (push) Has been cancelled
2024-11-08 13:56:10 +00:00
modmuss
60fccc7682 Fix crash when none player entities are flying with an elytra. (#4218)
Fixes #4217

(cherry picked from commit 825023f82e)
2024-11-08 13:53:31 +00:00
modmuss50
6d397b1b49 Fix CurseForge release.
Some checks are pending
Build / build (21-ubuntu) (push) Waiting to run
Build / client_test (push) Waiting to run
Build / server_test (push) Waiting to run
Build / check_resources (push) Waiting to run
2024-11-06 21:30:41 +00:00
modmuss
77a65688c8
Update to 24w45a (#4213)
* Update to 24w45a

* Fix model provider and build

* Remove old mixin file

* Bump versions
2024-11-06 21:10:00 +00:00
haykam821
7feeb733ad
Update mod to Minecraft snapshot 24w44a (#4197)
* Update mod to Minecraft snapshot 24w44a

* Bump version

---------

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2024-10-30 18:44:56 +00:00
modmuss
fd37071f8b
Update Loom and Loader (#4188)
Some checks failed
Build / build (21-ubuntu) (push) Has been cancelled
Build / client_test (push) Has been cancelled
Build / server_test (push) Has been cancelled
Build / check_resources (push) Has been cancelled
2024-10-27 09:44:05 +00:00
modmuss50
e14d62e1c0 Bump version
Some checks are pending
Build / build (21-ubuntu) (push) Waiting to run
Build / client_test (push) Waiting to run
Build / server_test (push) Waiting to run
Build / check_resources (push) Waiting to run
2024-10-26 17:09:02 +01:00
apple502j
e82f21f7e9
Fix overriding vanilla translations (#4187) 2024-10-26 15:54:53 +01:00
modmuss
89cb0a4eef
Revert "Prevent vanilla clients from joining servers that require modded registry entries. (#4169)" (#4184)
This reverts commit 56ec7ac6d8.
2024-10-26 15:54:42 +01:00
Jason Penilla
4402f4ee73
Add ServerChunkEvents.Generate (#4183)
* Add a new chunk generate event, fired alongside the chunk load event when a chunk is first upgraded to full status

* fix style

* Add logging test for generate event

After creating an SP world and waiting for all nearby chunks to generate (logging to stop), closing the SP world and opening it again should not log any fresh generation. Moving to an unexplored area will start logging again.
2024-10-26 15:54:31 +01:00
Alexander01998
d21566ae3c
Optimize screenshot delays in automated client test (#4178)
* Optimize screenshot delays

I've done multiple test runs on GitHub Actions and this seems to be as low as the timings can go while still reliably generating all of the screenshots correctly.

* Increase wait interval in waitFor to 50ms
2024-10-26 15:54:20 +01:00
SemmieDev
6c3b5d4971
Remove LevelProperties check (#4171) 2024-10-26 15:54:12 +01:00
Fabric Bot
1ff58ec271 New Crowdin updates (#4167)
* New translations en_us.json (German)

* New translations en_us.json (Italian)

* New translations en_us.json (Russian)

* New translations en_us.json (Polish)

* New translations en_us.json (Russian)

* New translations en_us.json (Korean)

(cherry picked from commit 7fd48375f5)
2024-10-26 15:53:49 +01:00
forgetmenot13579
d9873d8b91 AttachmentType Registration Enhancements (#4109)
* - Add new method AttachmentRegistry#create that allows configuration of the registered attachment type with a builder.
- Migrate existing creation methods to use the new one under the hood for consistency.
- Moves all null checking from AttachmentRegistry to AttachmentRegistryImpl.BuilderImpl (most of them happened there as well already and were thus redundant).

* - Adds the ability to initialize an AttachmentType with only a path, substituting the mod ID of the registrant via an entrypoint.

* - Add registration safety checks

* - Add missing copyright header

* - Remove lazy entrypoint initialization of attachment types.

* - Import fixes

* - Update javadoc.

* - Use expression lambdas.

* - Fix style checks

* - More style fixes

* - Fix line endings

* - Move WheelInfo and initialization to test package
- Deprecate AttachmentRegistry#builder
- Update existing tests to use #create rather than #builder

(cherry picked from commit e49211d8c6)
2024-10-26 15:53:46 +01:00
modmuss50
8cb06cc20b Allow running on 1.21.3 2024-10-23 14:40:16 +01:00
modmuss50
d1d444eb26 1.21.3 2024-10-23 14:34:40 +01:00
modmuss50
3a1ceae83c 1.21.2-rc2
Some checks failed
Build / build (21-ubuntu) (push) Has been cancelled
Build / client_test (push) Has been cancelled
Build / server_test (push) Has been cancelled
Build / check_resources (push) Has been cancelled
2024-10-21 18:45:26 +01:00
Alexander01998
2127dc72fe
Fix title screen screenshot in automated client test (#4177)
* Fix title screen screenshot

* Use accessor to detect when background fade is done
2024-10-21 18:36:57 +01:00
modmuss50
7d94de05ff Bump version
Some checks are pending
Build / build (21-ubuntu) (push) Waiting to run
Build / client_test (push) Waiting to run
Build / server_test (push) Waiting to run
Build / check_resources (push) Waiting to run
2024-10-21 10:21:52 +01:00
modmuss50
43607aea07 1.21.2-rc1 2024-10-21 09:51:32 +01:00
Reece Mackie
e7c9ab6617 fix: Add operator tab to common group list and filter for visible tabs in getPageCount. (#4172)
(cherry picked from commit 6823f7cd48)
2024-10-21 09:40:28 +01:00