Commit graph

24 commits

Author SHA1 Message Date
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
modmuss
b3afc78b68
Setup unit tests & format gradle files. (#3073) 2023-05-30 13:07:11 +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
Player
f71b366fb1
Update command registration API to reflect 1.19 vanilla changes (#2227)
* Update command registration API to reflect vanilla changes

* Allow module versions in impl+mixin packages

* Use v2 module, keeping v1 for server commands at least

* update, address review

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2022-05-20 18:39:10 +01:00
modmuss50
b4f4f6cda4 Update Loom and Loader. Cleanup/improve buildscript. 2021-11-12 15:02:54 +00:00
modmuss50
65d505fc8a Bump versions
All of the version need to be bumped due to fabric-api-base being updated, this highlights the need for a better solution.
2021-11-05 17:09:48 +00:00
modmuss50
e14f9c8f05 21w44a 2021-11-03 18:57:29 +00:00
modmuss50
6eb8b35a31 21w39a 2021-09-29 20:03:16 +01:00
modmuss50
2e8bd82f1c Bump version 2021-08-08 18:39:30 +01:00
modmuss50
6cefd57746 1.17.1-rc2 2021-07-05 18:44:49 +01:00
modmuss50
b7ab612143 1.17-pre1 2021-05-27 18:40:00 +01:00
Player
75bf7f0f4a Bump versions 2021-05-20 01:32:24 +02:00
modmuss50
a02b4463f9 21w19a 2021-05-12 20:23:04 +01:00
Player
74330c9e99 Fix network api throwing on client/server query disconnects 2021-05-10 14:40:38 +02:00
Player
daa3672176 Bump versions 2021-05-05 07:59:13 +02:00
modmuss50
413ddf6456 21w14a - Mappings update 2021-04-07 18:46:09 +01:00
modmuss50
23b3c92ea9 21w13a 2021-03-31 20:52:51 +01:00
modmuss50
7268309e55 21w08a 2021-02-24 20:30:53 +00:00
modmuss50
40e100eb8e 21w07a - Fairly major mappings update 2021-02-17 19:11:45 +00:00
modmuss50
36b77c3e9f 21w03a 2021-01-20 19:50:47 +00:00
modmuss50
92519afafe Version bump 2021-01-19 19:38:22 +00:00
modmuss50
c6723711fd Bump versions 2020-12-30 17:26:06 +00:00
i509VCB
fd11873744 Fabric Networking API V1 (#1081)
* Networking api v1

Some final docs?

Licenses and testmod

Fix a bunch o imports and make things work for v1 (v0 is bork)

Make the testmod pass checkstyle and work

Docs for v1

* Deprecate v0 and implement using v1

* Drop files down one package due to package check error

* Fix issue with channel registration, add another testmod

* jaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaavadoc

* Make javadoc use `code`, move impl interface to package access

* this things

* Rename a few internal methods

* Mark all client side stuff client only, move client mixins

* Add null checks around the place, clarify some javadoc and method names

* Make FutureListeners uninstantiable

* Some internal nullable annotations

* An impl class I forgot to rename

* Some comments and clarify some client login handler javadoc

* Add a missing FunctionalInterface annotation

* Split play and login, move client stuff to right package

* No interface left behind

* Inline channel registries in api

* Login and play subpackages not needed

* Add helper method to create play custom packets

* hasGlobalChannel -> hasGlobalReceiver

* Just rename the collection method for now

* Inline PlayPacketSender into static methods

* Start on testmod idea for verifying dynamic registration

* Add client login events

* You don't say hello when talking to yourself.

Also more testmod stuff

* Make event names present tense

* Some javadoc and impl interface rename

* Change the test keybinding

* Begin working on dynamic reg

* Dynamic reg works, just need a lot of cleanup and reimpling global

* A few renames, readd global methods

* Try to reduce the amount of duplicate registration logic

* Reimplement dynamic accessors

* More impl

* Start reimplementing global receivers. Still very hacky solution.

* Reimplement some server global reciever stuff

* Add login init event for server login.

* Implement client login query start event

* Move event invocations into addon, don't dual register global recievers

* Finally reimplement global recievers for all networking phases

* A revelation: Send packets properly

This also finds the issue with screen getting the proper S2C channels, current on TODO list.

* Disconnect event does not need a packet sender

* Clarify, add methods to get channels net handler can recieve on client

* Unregister actually works now

* Bunch of null checks, add simpler login delay test for vanilla clients

* Add some debug logging entries, fix unregister on client's session reg

* Play channel event javadoc and rename login query handlers

* More channel -> channelName

* thisening

* Introduce the basics infrastructure for tracking global receivers

* Add more substantial javadoc to login connection events

* Javadoc, reimplement unreg methods on v0, 1 impl fix

* Implement tracking for global recievers

* Dont forget to start tracked sessions in 3/4 cases

* Global receiver docs and move methods in classes

* Complete null checks

* big boi javadoc part 1

* Finish the main javadoc, usage javadoc is left

* Set so has method is not needed

* Rename receiveable and sendable methods

* Add the two missing private ctors

* buildscript update to upstream

* Split out player finding stuff to networking player tracking API v1

Signed-off-by: liach <liach@users.noreply.github.com>

Forward v0 PlayerStream to new module, add entity track events

Rename module to player tracking

Well javadoc can make sense

Decide on tracking for the name

Update fabric-player-tracking-api-v1/src/main/java/net/fabricmc/fabric/api/networking/player/tracking/v1/package-info.java

Co-authored-by: Erlend Åmdal <erlend@aamdal.com>
Remove exceptions from javadoc that are not thrown

javadoc fix again

Handle a case where the player manager happens to be null

rename player tracking to player lookup

Yeet

* Cherrypick #1092

* Remove some redundant client networking methods, rename `(un)register` to `(un)registerReceiver`

* Simplify access to dynamic reg on client

* Param shifting, let users get sender.

* Warning about time and distance units

* Make sure these are client only

* Fix control flow in ClientPlayNetworking#send

* Correct example code javadoc

* javadoc correction in server login

* Put login delay tests behind system property

Also remove unnecessary junk added by old module that was merged together.

* Fix ordering so channel registrations during `PHASE`_INIT work

* Fix prod bug and an oversight

* Fix login when connecting to dedicated server

* Update registry sync to v0 to prevent issue with reg sync hanging client

* this is done
2020-12-09 18:49:22 +00:00