Commit graph

980 commits

Author SHA1 Message Date
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
Waterpicker
bbf4c01986 Update the Dimension API (#1172)
* Reimplement Dimension API

* Forgot to update dimension-api mixins.json

* Did suggested changes.

* Move Nullable import.

* Remove unneeded whitespace

* Added automatic testing testmod feature.

* ...Removed unused imports...

* And other stuff the auto style system complains about...

* ...

* Drop Networking

* Completed suggested changes.

* Revert "Completed suggested changes."

This reverts commit 97740e6134.

* Did requested changes.

* Forgot colon

* Turn plural to singular

Co-authored-by: i509VCB <git@i509.me>
2020-11-28 19:50:27 +00:00
Technici4n
fddcc0d88f Cache the fuel time map in the fuel registry (#1108)
* Cache the fuel time map in the fuel registry

* Use a faster map for the fuel times

* Rebuild the fuel times map on the client side too

* Use more compatible mixins

* Replace a function overwrite by a TAIL inject

* Mixin formatting

* Indentation

* Make cache thread-safe, switch to boxed collection (IHM) since most
uses yield boxed results, refactor cache clearing

* fix import formatting

Co-authored-by: Player <player@player.to>
2020-11-28 19:48:27 +00:00
i509VCB
5a2efd399e
Reimplement block entity (un)load events (#1177)
* Reimplement block entity (un)load events

This is pending testing to verify the tracking is reliable.

* Forgot that null check for parity

* Everything is implemented. Now for testing

* Fix server block entity unload events

* Bah indentations broke

* Handle world chunks instead of the positions
2020-11-28 19:47:47 +00:00
modmuss50
0c3d83a544 20w48a - Just mapping updates 2020-11-25 19:34:48 +00:00
modmuss50
18e7e5e181 Bump version 2020-11-24 19:54:57 +00:00
modmuss50
1fec9da3c8 Assign a new ID to client only registry entries when syncing. (#1179)
* Assign a new ID to client only registry entries when syncing.

Fixes #1165

* Cleanup + review comments
2020-11-24 19:52:26 +00:00
modmuss50
cc3cc6c601 Bump version 2020-11-23 20:24:54 +00:00
modmuss50
40e91bd0cb Fix MC-149777 - java.util.ConcurrentModificationException when using Java 11 or above (#1176)
* Fix MC-149777

* Fix license
2020-11-23 20:14:35 +00:00
i509VCB
f9a8239a75 Drop use of remote buildscripts (#1175) 2020-11-23 20:14:32 +00:00
i509VCB
eaafab80ff Add command to audit mixin environment in game (#1174)
* Add command to audit mixin environment in game

* Throw assertion error instead and add success message

Assertion errors will bypass the command exceptions being eaten.
2020-11-23 20:14:29 +00:00
modmuss50
d7dacf3db0 Bump version 2020-11-21 18:53:21 +00:00
modmuss50
16a3a4a49a Fix MC-202036 - Shifting biome IDs (#1168)
* First pass on PersistentDynamicRegistryHandler, not tested

* Extra debugging + fix it not working

* Fix build

* Minor tweaks

* checkstyle ;)

* Improve comments + fix issues with tag reading/writing

* Simplify mixin
2020-11-21 18:50:12 +00:00
modmuss50
f1dfa4ca83 Bump version 2020-11-15 19:58:59 +00:00