Commit graph

693 commits

Author SHA1 Message Date
i509VCB
6692ae6057 Remove all inter-module dependencies on fabric-networking-v0 (#1291)
This migrates all uses of v0 networking to v1 api, and changes the readme to not mention networking-v0 in the example for dependencies.

This effectively makes v0 removable if it breaks in the future beyond repair. Though I expect v0 to last quite a bit longer.

(cherry picked from commit bf770ed853)
2021-02-14 17:56:36 +00:00
modmuss50
2992645b97 21w06a 2021-02-10 18:58:49 +00:00
modmuss50
1eb2670e8a 21w05a 2021-02-03 19:53:20 +00:00
modmuss50
7053477453 Actually bump version 2021-01-27 19:29:29 +00:00
modmuss50
73abe4c989 Bump version 2021-01-27 19:12:02 +00:00
modmuss50
e568618094 Crash with a more helpful message when a screen fails to call super.init
(cherry picked from commit c045166c0f)
2021-01-27 19:10:12 +00:00
modmuss50
ac6a8f141e Modrith upload (#1280)
(cherry picked from commit 281de346c7)
2021-01-25 18:24:20 +00:00
i509VCB
9af2c302f9 Screen API v1 (#645)
* Implement screen api

* Actually update to 20w27a

* Split render and tick events to before and after

* Rename and update

* A bit of javadoc and profiler name fixes

* Add functional interface annotations, move render and ticking events to actual FabricScreen instance.

* Add after screen resize event

* Implement key and mouse click/press and release events.

* Move keyboard and mouse events to their own pojos

* Init and resize are the same thing. Maybe Screen#init needs a rename

* Add mouse scroll events

* checkstyle

* Refresh event instances after init

* Before init is nessecary to listen to addition/removal of child elements

* Polish up the javadoc and do a rename to the public api interface.

* Mappings updates on testmod

* javadoc formatting again

* Rework screen api design to be more ergonomic.

* Add remove event, some javadoc

* Add allow phase

* Module dependencies

* Fix null ticking when no screen is open

* Refer to GLFW constants in mouse click/release events

* Keyboard event GLFW constant javadoc

* Remove redundant qualifier

* Some docs, degetterifying

* Because global go brr add screen params back around

* Add module lifecycle to FMJ

(cherry picked from commit 8e23c1d877)
2021-01-25 18:19:58 +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
i509VCB
f8cf2bb436 Add custom value denoting module lifecycles. (#1253)
* Add custom value denoting module lifecycles.

* Make the module validation work.

My hand has been forced - we must use buildSrc since JsonSlurper is not available in main buildscript.

* Apply task to each project and dont cross projects

* A horrible hack

* Wait what

* It works now.

* Not needed

* Drop unneeded maven repo, cache map lookup

(cherry picked from commit daa38b3d82)
2021-01-19 18:54:23 +00:00
PepperCode1
f9381f3529 Fix javadoc and typo (#1270)
* Update RenderContext.java

* Update WorldRenderEvents.java

(cherry picked from commit d795f854a9)
2021-01-19 18:54:22 +00:00
Player
53f160a834 Bump version 2021-01-05 13:22:26 +01:00
LambdAurora
ea2e406d01 Fix dev env crash on Windows. 2021-01-05 13:21:54 +01:00
modmuss50
05c818887e Bump version 2021-01-03 16:35:12 +00:00
Mitchell Skaggs
42e2b8f61c Fix nether portal crash (#1256)
* Correct ordinal of `afterWorldChanged` mixin to the correct return

Co-authored-by: i509VCB <git@i509.me>

* Handle null entity when unable to be created

* Comply with Checkstyle

* Remove redundant ordinal and only use null return to check valid teleports

Co-authored-by: Player <player@player.to>

Co-authored-by: i509VCB <git@i509.me>
Co-authored-by: Player <player@player.to>
(cherry picked from commit c7d5c83208)
2021-01-03 16:33:22 +00:00
modmuss50
ce504de521 Bump versions 2021-01-01 14:50:26 +00:00
i509VCB
2e359e933a Workaround for shadowed fields from supermixins do not remap. (#1251)
(cherry picked from commit 49c073f9a3)
2021-01-01 14:49:02 +00:00
modmuss50
c6723711fd Bump versions 2020-12-30 17:26:06 +00:00
yyny
35ad3817d3 Allow passing UV coordinates as Vec2f (#1238)
* Allow passing UV coordinates as Vec2f

Rotating UV coordinates using vector math becomes extremely annoying when every `sprite` call requires the individual `u` and `v` coordinates to be extracted again.

This change will allow passing UV coordinates in a container that will always be available.

* Revert b0fe27e0d7

* Allow Vec2f UVs in MutableQuadView

This seems like the better place to put this.

* Fix return type

oops

* Add override in QuadEmitter

* Fix JavaDoc styling

* Duplicate JavaDoc and function definition

There is probably a way in Java to override the method while keeping the JavaDoc, but I can't be bothered, and this way, the user gets a more relevant JavaDoc anyway.

* Remove Trailing Whitespace

I'm pretty sure QuadEmitter allowed trailing whitespace, though...

* Fix JavaDoc styling in QuadEmitter

Also removes trailing whitespace

(cherry picked from commit 00f5b23648)
2020-12-30 17:16:16 +00:00
grondag
ed5162f849 Add WorldRenderEvents (#1182)
* Add WorldRenderEvents

* Fix typos

* Incorporate PR feedback

* Simplify context and block outline events

* Update implementation

* Ensure the BLOCK_OUTLINE mixin does nothing if BEFORE_BLOCK_OUTLINE mixin is disabled

* Document event order in class header

* Update fabric-rendering-v1/src/main/java/net/fabricmc/fabric/api/client/rendering/v1/WorldRenderEvents.java

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

* Add environment tag to nested type

* More envionment tags

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

(cherry picked from commit c26373137e)
2020-12-30 17:14:30 +00:00
Vincent Lee
7fbd501fc7 Provide replacement for ModelAppender that allows loading non-blockstate paths (#1178)
* Extend ModelAppender to allow loading non-blockstate paths

* Use a new interface instead of adding to the old one

* Rename new interface

(cherry picked from commit 6bec8f284f)
2020-12-30 17:11:02 +00:00
i509VCB
1d561d2678 Entity Events v1 (#957)
* Entity Events v1.

First up is an event fired after a living entity is damaged. All vanilla living entities except armor stands work with this event.

* Events related to killing of entities, changing world, player respawn/copyFrom

Death related:
an entity killing something and an entity being killed by an adversary

Player related:
After respawn, copy to

* Adversary stuff isn't needed

* checkstyle again

* Call AFTER_KILLED_OTHER on a ServerPlayerEntity upon death.

* Add event which is fired when a player first joined a server and add functional interface annotations

* Update build.gradle

* mispelled

* Some renames, test events, drop damage event

Damage events need further consideration in future

* Comments and null check

* Update for mappings

* Warning comment

* Remove first join event and teleport helper

First join does not work atm and teleport is in dimensions pr

* Module dependencies

* Javadoc tweaks

* The serverening

(cherry picked from commit 79b23bee5b)
2020-12-30 17:10:56 +00:00
i509VCB
60e92d82df Add contact links to issue template page (#1244)
* Add contact links to issue template page


Whoops

* Update .github/ISSUE_TEMPLATE/config.yml

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

* Update .github/ISSUE_TEMPLATE/config.yml

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

* Update .github/ISSUE_TEMPLATE/config.yml

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

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
(cherry picked from commit d9daf26edb)
2020-12-30 16:56:58 +00:00
Maity
06178adbda Fix example implementation of using FAPI modules for Groovy (#1237)
* Fix example implementation of using FAPI modules for Groovy

The previous implementation does not quite correctly describe what it does

* Improve description of adding dependencies

* Undo the last commit changes for Kotlin DSL

(cherry picked from commit a404f47683)
2020-12-30 16:56:54 +00:00
haykam821
6bc3f52d3f Fix missing metadata (#1233)
* Fix certain modules not having icons

* Add additional metadata to the fabric-particles-v1 module

(cherry picked from commit ae85d92960)
2020-12-30 16:56:49 +00:00
cs127
ce1444b45e Added Persian translation (#1161)
* added persian translation

* small change

(cherry picked from commit 6f23ac82f9)
2020-12-30 16:56:44 +00:00
Chloe Dawn
fd9375dd4f
Update networking API to 20w46a+, simplify mixin impl (#1245) 2020-12-30 16:46:02 +00:00
modmuss50
27f445e70d Fix merge.
Its always checkstyle...
2020-12-23 20:30:07 +00:00
modmuss50
f3da4d8bf5 Bump version 2020-12-23 20:22:24 +00:00
modmuss50
87d0b2af53 Fix a number of issues with reload listeners (#1240)
* Fix resource reload listeners not being sorted.
Fix missing/broken reload listener keys.
Add a debug log line for missing reload keys
Add some basic tests.

* Undo adding new keys, we can look at this later.

* use AssertionError

* Fix test on server

(cherry picked from commit 67abea83c2)
2020-12-23 20:09:38 +00:00
LambdAurora
0ea93ebaf8 Resource loader improvements (#1186)
* Add resource pack activation type, programmer art API, group mod resource packs.

* Add missing license headers.

* Cleanup and add documentation.

* Fix performance issues.

* Rename invoker.

* Add comment in ReloadableResourceManagerImplMixin.

* Add package-info to resource loader.

(cherry picked from commit 73b29211a6)
2020-12-23 18:51:52 +00:00
modmuss50
96f0bfaa41 Bump version 2020-12-17 08:51:13 +00:00
i509VCB
f20046efd9 Fix v0 deprecation javadoc error (#1209)
(cherry picked from commit d3799feeea)
2020-12-17 08:47:00 +00:00
i509VCB
8855d01280 Check channels the server can receive, not channels the client can (#1224)
(cherry picked from commit 64c503a93e)
2020-12-17 08:46:59 +00:00
modmuss50
836e66a3f5 Fix build.
Opps ;)
2020-12-16 19:13:16 +00:00
modmuss50
1a369faf20 20w51a 2020-12-16 19:06:02 +00:00
modmuss50
d591fc0a7e Bump version 2020-12-12 16:49:45 +00:00
modmuss50
bb826c2c5b Fix registry sync being applied when its not supposed to be.
Fixes #1217
Fixes #1216
2020-12-12 16:48:39 +00:00
modmuss50
bee3a886d0 Bump version 2020-12-10 18:34:17 +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
modmuss50
8f5b7a460a Bump version 2020-12-06 19:37:32 +00:00
i509VCB
80d73bddd1 Add readme for fabric-lifecycle-events-v1 (#1119)
* Add readme for fabric-lifecycle-events-v1

* Spelling lol

* Update fabric-lifecycle-events-v1/README.md

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

* Don't document everything under the sun. Instead explain what there is

* Indicate > specify

* Consistent referral to the types of worlds.

* Update fabric-lifecycle-events-v1/README.md

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

* Update fabric-lifecycle-events-v1/README.md

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

* Grammer go brr

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
(cherry picked from commit ffb68a877b)
2020-12-05 19:05:40 +00:00
i509VCB
bd906e77da
Implement entity unload event on server (#1191)
* Start toying with server entity unload event

* Implement testmod stuff

* Implement shutdown implementation of unload entities

* Update fabric-lifecycle-events-v1/src/testmod/java/net/fabricmc/fabric/test/event/lifecycle/ServerEntityLifecycleTests.java

Co-authored-by: Pyrofab <redstoneinfire@gmail.com>

* Comment suggestion

Co-authored-by: Pyrofab <redstoneinfire@gmail.com>
2020-12-05 19:03:30 +00:00
i509VCB
8c05a46689
Block entity unload: compensate for WorldChunk code changes (#1204) 2020-12-05 19:02:56 +00:00
modmuss50
e1f1abb1c0 20w49a 2020-12-02 19:02:44 +00:00
modmuss50
b49af6f4d8 Bump version 2020-11-28 23:37:40 +00:00
modmuss50
5341e62685 Fix crash on prod server as remap was disabled... 2020-11-28 23:36:21 +00:00
modmuss50
880269e646 Bump version 2020-11-28 20:34:56 +00:00
Vincent Lee
d6167ae542 Add tag builder method for the new optional entries (#1173)
* Add tag builder method for the new optional entries

* Address comments

* Rename addOptional to addOptionalObject

* Flesh out doc

* Move mixin to target proper class
2020-11-28 19:51:34 +00:00