Commit graph

9 commits

Author SHA1 Message Date
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
liach
0036435150 Update checkstyle and change tab width to be 4 than 8 (#518)
* Remove unnecessary chmod in travis script
* Update checkstyle and fix indent config
* Travis CI optimizations and checkstyle fixes
2020-04-11 21:24:59 +02:00
Player
b7f9825dbb Add checkstyle verification for package names, fix non-API packages. 2019-11-03 20:14:45 +01:00
Player
dfdb52d6e5 Add checkstyle, format existing code accordingly. 2019-10-27 15:40:26 +01:00
Prospector
5ed88c193a Add more metadata to the modules (#353)
* Add fabric-api-base as a dep to fabric-networking-v0
2019-09-09 01:48:43 +02:00
modmuss50
eff46b3d8e Add ItemStack Tooltip event (#302) 2019-08-08 00:01:17 +01:00
asie
59147463cc add proper depends lists to mods 2019-05-17 23:08:53 +02:00
Adrian Siekierka
9232ac87a2 fingers crossed and hope for the best 2019-05-12 00:00:57 +02:00
Adrian Siekierka
f16189181b final module name refactor prior to release, hopefully 2019-05-11 23:48:33 +02:00