Dylan K. Taylor
f488e594f6
Remove hardcoded facing literals in for loops
2018-09-13 19:34:27 +01:00
Dylan K. Taylor
ebc1524f9a
Merge remote-tracking branch 'origin/release/3.3'
2018-09-12 10:39:49 +01:00
Dylan K. Taylor
09dea035d4
Level: Batch light updates at the end of the tick to amortize CPU cost ( #2429 )
...
this produces a 5x performance improvement for lighting updates during water flow, and 25% improvement for lava flow.
2018-09-12 10:33:28 +01:00
Dylan K. Taylor
b3902ed76f
Merge branch 'release/3.3'
2018-09-11 11:40:54 +01:00
Dylan K. Taylor
0aa63d269a
Merge branch 'release/3.2' into release/3.3
2018-09-11 11:35:46 +01:00
Dylan K. Taylor
53a76c0d14
Merge branch 'release/3.1' into release/3.2
2018-09-11 11:35:38 +01:00
Dylan K. Taylor
69500fe183
LightUpdate: Remove garbage left over from dab73d895099e4c1c7d632711e204971cbbb0590
2018-09-11 11:35:31 +01:00
Dylan K. Taylor
191f0038b8
LightUpdate: Allow a single position to be set more than once before executing
...
This is needed for batched lighting updates to work. It also reduces the overhead involved with simply preparing a lighting update and moves the pain to the execute() instead.
2018-09-11 11:33:57 +01:00
Dylan K. Taylor
f03ab76c83
Remove imports left over from 5ce2d5e072e8659190d1111cd394ebb8f78db4dc
2018-09-10 17:51:13 +01:00
Dylan K. Taylor
37190c9a65
Apply typehints to all AsyncTask methods
...
Since we're breaking API here anyway, no point in holding back on this.
2018-09-10 15:54:01 +01:00
Dylan K. Taylor
d62e00cc74
AsyncPool: Remove Server dependency (API breaks included)
...
This brings two plugin-breaking changes: AsyncTask->onCompletion() and AsyncTask->onProgressUpdate() no longer accept Server parameters.
This now allows for the functionality of AsyncPool and AsyncTask to be tested outside of a Server.
2018-09-10 15:48:59 +01:00
Dylan K. Taylor
5ce2d5e072
Clean up to Generator creation, remove getSeed() from ChunkManager interface
...
it's the generator's responsibility to know about the seed, not the chunkmanager's. This now reduces the complexity of implementing and using a chunkmanager.
2018-09-10 13:28:15 +01:00
Dylan K. Taylor
9b49d09714
LevelProvider: Added methods to get and set rain/lightning level and times
2018-08-28 15:02:45 +01:00
Dylan K. Taylor
66e46e1c07
Level: use chunk records for tile reading in getTileAt()
...
the previous revision caused a crash when clicking on the bottom of the world due to a block hash being out of bounds.
2018-08-26 18:57:08 +01:00
Dylan K. Taylor
4fb1f8dd76
Merge branch 'release/3.2'
2018-08-25 17:49:28 +01:00
Dylan K. Taylor
fe6d546190
Merge branch 'release/3.1' into release/3.2
2018-08-25 17:49:21 +01:00
Dylan K. Taylor
c7af1cf785
Merge branch 'release/3.0' into release/3.1
2018-08-25 17:49:14 +01:00
Dylan K. Taylor
7dd53f2397
Replace unnecessary strlen > 0 calls with !== "" checks
2018-08-25 16:07:49 +01:00
Dylan K. Taylor
848bce193c
Chunk: change tile storage hash function to unbind Y coordinate
...
this isn't strictly needed but it is more scalable in the case of future build height limit lifts.
2018-08-19 16:56:50 +01:00
Dylan K. Taylor
7c41bfcdf3
Removed Tile numeric runtime IDs, use block hashes instead
...
Tiles are level-local and are not indexed globally like entities. There is pretty much zero point to them having numeric runtime IDs.
2018-08-19 16:37:04 +01:00
Dylan K. Taylor
92aeab0d00
Merge branch 'release/3.2'
2018-08-19 16:03:04 +01:00
Dylan K. Taylor
2eda8cfad3
Merge branch 'release/3.1' into release/3.2
2018-08-19 16:01:47 +01:00
Dylan K. Taylor
91be5aba0c
Merge branch 'release/3.0' into release/3.1
2018-08-19 16:00:25 +01:00
Dylan K. Taylor
5df601c817
Add @see docs so PhpStorm can see dynamic constructor usages
...
PhpStorm can't see constructor usages when the class name is dynamic. This causes maintenance problems because cross-referencing constructors called like this doesn't show up dynamic calls.
2018-08-19 16:00:15 +01:00
Dylan K. Taylor
728142b113
Level: remove useless check for RIGHT_CLICK_AIR
...
it's impossible for this to fire because of the condition immediately above, and makes no sense anyway...
2018-08-14 19:39:06 +01:00
Dylan K. Taylor
0273e2484e
Kill entity runtime NBT ( #2361 )
2018-08-14 13:33:02 +01:00
Dylan K. Taylor
15bac8c58a
Implement send buffering and queuing for network sessions ( #2358 )
...
Async compression and broadcasts are now reliable and don't have race condition bugs.
This features improved performance and significantly reduced bandwidth wastage.
Reduce Level broadcast latency by ticking network after levels. This ensures that session buffers get flushed as soon as possible after level tick, if level broadcasts were done.
2018-08-13 14:37:18 +01:00
Dylan K. Taylor
4142666df8
Level: clean up and remove checkTime()
2018-08-06 19:00:00 +01:00
Dylan K. Taylor
fb0cc0804c
Merge branch 'release/3.2'
2018-08-06 18:45:53 +01:00
Dylan K. Taylor
09dadc72bc
Merge branch 'release/3.1' into release/3.2
2018-08-06 18:45:08 +01:00
Dylan K. Taylor
e33d1279fa
Merge branch 'release/3.0' into release/3.1
2018-08-06 18:45:01 +01:00
Dylan K. Taylor
9e1fa453ad
Level: Fixed leak of global packets when no players are online
...
If a global packet was broadcasted when no players were online, it would be held in memory indefinitely (until a player joined).
2018-08-06 18:44:53 +01:00
Dylan K. Taylor
6fcb221453
Remove useless crap from ChunkLoader interface
...
these methods are not used anywhere and are unnecessary extra baggage for any implementation.
2018-08-05 18:38:51 +01:00
Dylan K. Taylor
20f3b82d52
Be less dependent on AsyncTask->onCompletion() Server parameter
...
this is going to get removed soon.
2018-08-04 15:56:14 +01:00
Dylan K. Taylor
588d6c4b26
Merge branch 'release/3.2'
2018-08-03 18:24:50 +01:00
Dylan K. Taylor
334caaaa34
Merge branch 'release/3.1' into release/3.2
2018-08-03 18:24:44 +01:00
Dylan K. Taylor
89cf76363f
Merge branch 'release/3.0' into release/3.1
2018-08-03 18:24:36 +01:00
Dylan K. Taylor
9ff5c65fb6
Level: Make async chunk sending aware of faults
...
Previously any random error could occur during an AsyncTask preparing a chunk, and the Level would never know about it and thus never send the chunk.
I don't know how many invisible-chunk bug cases this fixes, but I expect it's quite a lot.
2018-08-03 18:23:32 +01:00
Dylan K. Taylor
1532b0ef6d
Level: Remove chunks from chunk send queue on unload
...
When a chunk request task crashes, these can get stuck and never get removed. This allows using /gc to collect the bad chunk in order to fix the bug.
2018-08-03 18:04:56 +01:00
Dylan K. Taylor
7560880168
Added DataPacketBroadcastEvent, refactor broadcast handling, close #1521
...
batchPackets() is now considered internal and shouldn't be used by plugins.
Added Server->broadcastPackets(Player[], DataPacket[]) : bool
2018-08-02 15:54:30 +01:00
Dylan K. Taylor
eb738d1d72
Apply more typehints to generator namespace
2018-07-26 19:31:18 +01:00
Dylan K. Taylor
edb03e8a9b
Remove more dead code from the generator
...
this stuff is useless broken crap that just makes noise in inspections for no good reason... bye
2018-07-26 19:21:38 +01:00
Dylan K. Taylor
be37236c76
Deduplicate code for general classpath registries
2018-07-26 15:21:03 +01:00
Dylan K. Taylor
057d4fc62f
Merge branch 'release/3.2'
2018-07-25 18:52:26 +01:00
Dylan K. Taylor
24f11779f2
Level: don't try to unregister generators from non-live workers
...
this was causing garbage-collected workers to get restarted on shutdown if they previously had the generator registered for that level.
2018-07-25 18:52:17 +01:00
Dylan K. Taylor
bdd9a7eb52
Kill BatchPacket, clean up batching related things
...
DataPacketSendEvent and DataPacketReceiveEvent will no longer capture BatchPackets
In most places strings are now used instead of DataPackets, to remove limitations on what data can be sent to a network interface
Removed CraftingManager's cyclic dependency on Server
There is a lot more work to do aside from this, but this commit is intended to clean up what is necessary to fix the handling of BatchPacket.
2018-07-20 12:36:44 +01:00
Dylan K. Taylor
1144620f2b
Level: minor de-spaghettification of chunk requesting
...
Now the Level tells the player to request chunks on tick, instead of the server doing it.
2018-07-18 16:49:58 +01:00
Dylan K. Taylor
df3870a112
Merge branch 'release/3.2'
2018-07-17 18:35:43 +01:00
Dylan K. Taylor
527d8e9374
Merge branch 'release/3.1' into release/3.2
2018-07-17 18:35:16 +01:00
Dylan K. Taylor
93a2f397c6
Merge branch 'mc-broken-ed-1.5' into release/3.1
2018-07-17 18:13:06 +01:00