fabric/fabric-item-api-v1
i509VCB 2f23104bdd
Lifecycle Events V1 [1.15] (#619)
* Lifecycle Events V1

Now includes Chunk and (Block)Entity (un)load events

* Add some tests to verify worlds are ticking in the log

* Lambda boogaloo

* Add some docs. Distinguish between a server starting to stop and server which has stopped.

* Split up test mods, some tweaks to (block)entity (un)load events.

Bind the ServerWorld being closed during shutdown to unload (block)entities.

* Shift around a few profiler variables and finalize

* Complete the tests, Block entities on server should be reliably tracked now.

Entities on the server obviously still need to be wrangled.

* Drop Server Entity Unload callback.

Believe me, this was a hard decision but it stands on the fact that about 20-40% of entities silently unload without going through the proper "unloadEntity" method in ServerWorld. No amount of debug hacks, double tracking unload events and even replacing the entity maps do not fix this issue. So I have decided to drop this from the feature set.

* checkstyle

* generic-events -> item-api

* Server start -> Server started

* Allow getting current server from Lifecycle

People have asked for this, but it is not encouraged for obvious reasons. Should be staged well enough to revert if we decide to.

* checkstyle lol

* update injection name

* Checkstyle lol: Redundant modifiers

* Add client starting, stopping and stopped callbacks.

* Loicenses

* Reorganize so each event category has it's own class.

Also this collapses the pretty widely reaching interfaces into more specific inner classes to avoid issues with generics.

* Some docs and slight name changes

* Add start tick callbacks to worlds, server and client

* Enhance some client related docs to life cycle

* Deprecate for reasons of discouraging singletonish server getter methods in lifecycle

* Add some description related to integrated server on server stopping.

* Add small test to verify tick starts are right spot of load

* Docs and a tiny bit more testing.

* Try clarifying client docs

* Drop a slightly unnessecary event

* Actually call and implement START_SERVER_TICK event

* Remove non-existent test

* again

* Refer to minecraft itself in client lifecycle docs

* Refer to Minecraft itself within ServerLifecycleEvents

* Remove primary server getters

* IJ DO YOU SPEAK RESOLVING IMPORTS

(cherry picked from commit c9257e8a11d8361469349f4171263121bb111af7)

* Prune the tests that shouldn't exist

* Listen here checkstyle you bugger

(cherry picked from commit 9701bba4002cec089c9d3738b1f226128078c130)

* Split up events to individual interfaces. Make Chunk events use WorldChunk instead.
2020-06-25 22:28:49 +01:00
..
src Lifecycle Events V1 [1.15] (#619) 2020-06-25 22:28:49 +01:00
build.gradle Lifecycle Events V1 [1.15] (#619) 2020-06-25 22:28:49 +01:00