9b49d09714
LevelProvider: Added methods to get and set rain/lightning level and times
2018-08-28 15:02:45 +01:00
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
4fb1f8dd76
Merge branch 'release/3.2'
2018-08-25 17:49:28 +01:00
fe6d546190
Merge branch 'release/3.1' into release/3.2
2018-08-25 17:49:21 +01:00
c7af1cf785
Merge branch 'release/3.0' into release/3.1
2018-08-25 17:49:14 +01:00
7dd53f2397
Replace unnecessary strlen > 0 calls with !== "" checks
2018-08-25 16:07:49 +01:00
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
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
92aeab0d00
Merge branch 'release/3.2'
2018-08-19 16:03:04 +01:00
2eda8cfad3
Merge branch 'release/3.1' into release/3.2
2018-08-19 16:01:47 +01:00
91be5aba0c
Merge branch 'release/3.0' into release/3.1
2018-08-19 16:00:25 +01:00
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
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
0273e2484e
Kill entity runtime NBT ( #2361 )
2018-08-14 13:33:02 +01:00
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
4142666df8
Level: clean up and remove checkTime()
2018-08-06 19:00:00 +01:00
fb0cc0804c
Merge branch 'release/3.2'
2018-08-06 18:45:53 +01:00
09dadc72bc
Merge branch 'release/3.1' into release/3.2
2018-08-06 18:45:08 +01:00
e33d1279fa
Merge branch 'release/3.0' into release/3.1
2018-08-06 18:45:01 +01:00
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
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
20f3b82d52
Be less dependent on AsyncTask->onCompletion() Server parameter
...
this is going to get removed soon.
2018-08-04 15:56:14 +01:00
588d6c4b26
Merge branch 'release/3.2'
2018-08-03 18:24:50 +01:00
334caaaa34
Merge branch 'release/3.1' into release/3.2
2018-08-03 18:24:44 +01:00
89cf76363f
Merge branch 'release/3.0' into release/3.1
2018-08-03 18:24:36 +01:00
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
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
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
eb738d1d72
Apply more typehints to generator namespace
2018-07-26 19:31:18 +01:00
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
be37236c76
Deduplicate code for general classpath registries
2018-07-26 15:21:03 +01:00
057d4fc62f
Merge branch 'release/3.2'
2018-07-25 18:52:26 +01:00
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
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
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
df3870a112
Merge branch 'release/3.2'
2018-07-17 18:35:43 +01:00
527d8e9374
Merge branch 'release/3.1' into release/3.2
2018-07-17 18:35:16 +01:00
93a2f397c6
Merge branch 'mc-broken-ed-1.5' into release/3.1
2018-07-17 18:13:06 +01:00
ddc118a562
Merge branch 'release/3.1'
2018-07-17 12:02:33 +01:00
ad1cf38c21
LevelProviderManager: tighten up checks on registering
2018-07-17 12:02:08 +01:00
5d769147ca
LevelProviderManager: make addProvider() throw InvalidArgumentException instead of LevelException
...
LevelException is not useful because it's too generic.
2018-07-17 12:02:08 +01:00
1f023bdcef
Merge branch 'release/3.1'
2018-07-17 10:13:00 +01:00
6f00a30ad7
Merge branch 'release/3.0' into release/3.1
2018-07-17 10:12:52 +01:00
921f7e8f6a
Level: remove useless check from populateChunk()
...
this is already checked at the top of the function.
2018-07-16 17:36:36 +01:00
165aac1ba3
Merge branch 'release/3.0' into mc-broken-ed-1.5
2018-07-14 16:09:57 +01:00
340de1c478
Merge branch 'release/3.1'
2018-07-14 11:57:32 +01:00
478a131aa5
Flat: separate logic of parsing preset and generating base chunk
...
now always generates the base chunk on init, because the generator won't be created unless there is generation to be done.
2018-07-14 11:51:49 +01:00
53068caf3c
Level: Only register generators when attempting to actually generate chunks
...
This saves a ton of memory on servers which don't generate any chunks during their runtime (which is most servers).
2018-07-14 11:34:55 +01:00
ee5165b040
Merge branch 'release/3.1'
2018-07-12 18:04:26 +01:00
1b7cd156aa
Merge branch 'release/3.0' into release/3.1
2018-07-12 18:04:19 +01:00