34 Commits

Author SHA1 Message Date
Dylan K. Taylor
39c0fa6103 Merge branch 'release/3.5' 2018-12-29 20:58:12 +00:00
Dylan K. Taylor
cd80ae00d4 Handle errors properly on chunk load
Only CorruptedChunkException and UnsupportedChunkFormatException are expected. Anything else should crash the server.
2018-12-29 16:37:10 +00:00
Dylan K. Taylor
0cc4bc48cc Move generator classpath hack out of BaseLevelProvider 2018-10-04 18:55:20 +01:00
Dylan K. Taylor
49e47edcf5 Separate level data handling from the main LevelProvider 2018-10-04 18:45:02 +01:00
Dylan K. Taylor
41f335e7d9 Level: Remove setSeed()
Seed is immutable information about the world, like its generator type, generator options, name, etc. We don't allow changing any of those things, so why the fuck would we allow changing the seed? This makes no sense at all.

I'm removing this because a) its existence makes no sense, and b) it will not produce the behaviour expected from such a function (what even is the expected behaviour???)
2018-10-04 16:24:07 +01:00
Dylan K. Taylor
4d9d4d7c60 More cleanups to level provider hierarchy, move more garbage out of BaseLevelProvider 2018-10-04 16:02:55 +01:00
Dylan K. Taylor
4f421d561c BaseLevelProvider: clean up not-exists error handling disaster
It checks for the existence of (and creates) the world directory if it doesn't exist. But what sense does this make when the world obviously doesn't exist in this case and must be generated first?
2018-10-04 15:41:18 +01:00
Dylan K. Taylor
07a156f5c4 BaseLevelProvider: remove leftover from b54197904d6c23c5babe2857d0107d9d0fc8bd68 2018-06-11 14:32:42 +01:00
Dylan K. Taylor
354b2dc5d1 and an extra note just in case 2018-06-07 15:20:51 +01:00
Dylan K. Taylor
0c70b83d81 LevelProvider: workaround bug fixed in b54197904d6c23c5babe2857d0107d9d0fc8bd68 for previously-affected worlds 2018-06-07 15:18:42 +01:00
Dylan K. Taylor
b54197904d Fixed imported worlds getting PM classpaths written into their level.dat for generator
This will not fix existing worlds affected by this bug.
2018-06-07 13:20:50 +01:00
Dylan K. Taylor
c493d0e6ac Level: Stop unnecessarily initializing the generator on the main thread
this is just slowing down startup times for no good reason.
2018-05-31 10:22:44 +01:00
Dylan K. Taylor
d478661961 Minor cleanup to LevelDB constructor 2018-03-11 18:15:20 +00:00
Dylan K. Taylor
9d018e8d9e Level: cleaned up chunk loading error handling, close #2056
This now removes logging from the level providers (for the most part) and replaces it with exception throws and catches. The implementation using the providers should catch these exceptions if they are thrown.
2018-03-01 12:30:12 +00:00
Dylan K. Taylor
093cb5b39e Updated PocketMine-NBT dependency 2018-02-17 14:29:20 +00:00
Dylan K. Taylor
e7e4645c0b Fixed a wide range of bugs with floating-point coordinates getting incorrectly int-casted
This causes lots of bugs in negative coordinates.

This fixes #1789 after world load & save.
2018-02-15 10:27:42 +00:00
Dylan K. Taylor
266a253c03 Remove dead imports 2018-01-05 19:48:04 +00:00
Dylan K. Taylor
a46029c0f6 LevelProvider: Nuked the complicated mess out of level providers
Level providers are now cut back to just an interface to a world's data. They don't keep their own chunk registries or any stupid shit like that because the Level already does that.

This furthers the goal of being able to move level I/O off the main thread, and also drastically decreases the complication of implementing level providers.
2018-01-01 11:21:46 +00:00
Dylan K. Taylor
1a615591e2 LevelProvider: Remove cyclic dependency between Level and LevelProvider
This will now allow LevelProviders to be constructed on threads.
2018-01-01 10:50:13 +00:00
Dylan K. Taylor
d19683b7dd LevelProvider: Remove some dead methods 2017-12-31 18:35:23 +00:00
Dylan K. Taylor
f17b3b2a3b LevelProvider: Refactor providers to drop lots of duplicated code 2017-12-31 18:35:23 +00:00
Dylan K. Taylor
8a3f8b4706 LevelProvider: Remove redundant method requestChunkTask()
This removes one more dependency that LevelProvider has on Level.
2017-12-31 16:05:58 +00:00
Dylan K. Taylor
965c19375f NBT: Split up concerns of endianness and varint NBT into their own classes, separate stream handling from NBT class
The remaining methods, constants and fields in the NBT class now pertain to generic NBT functionality (except for the matchList()/matchTree() methods, but that's a job for another time). All NBT I/O specific logic has now been moved to NBTStream and its descendents.
2017-12-30 14:55:45 +00:00
Dylan K. Taylor
aa399a1109
migrate to new CompoundTag API (#1515) 2017-11-10 15:38:21 +00:00
Dylan K. Taylor
5b4035253b Casting cleanup and removed some 32-bit string-int leftovers 2017-08-17 11:24:49 +01:00
Dylan K. Taylor
c3b8be3f60 and more typehints 2017-07-14 10:56:51 +01:00
Dylan K. Taylor
70bd9afd37 Updated leveldb implementation to support MCPE 1.1 worlds 2017-06-30 09:11:26 +01:00
Dylan K. Taylor
a4b8dd43e6 Removed useless confusing array indices in CompoundTag constructors (#1116) 2017-06-20 12:11:24 +01:00
Dylan K. Taylor
890f72dbf2 Type-hinted NBT tag constructors, made getValue() and setValue() more strict, fix dozens of assorted related bugs 2017-06-08 19:17:52 +01:00
Dylan K. Taylor
75863e2a44 OCD commit 2017-06-07 12:54:12 +01:00
Dylan K. Taylor
60f5c7ccef Async chunk compression and serialization is now non-optional 2017-05-18 12:19:27 +01:00
Dylan K. Taylor
b28e38ab26 Move some exceptions out of utils into their relevant namespaces, move some Chunk methods to ChunkUtils for I/O, refactor "colour" -> "color" 2017-01-15 11:31:12 +00:00
Dylan K. Taylor
3bbf2c245a Shut PhpStorm up 2017-01-11 10:11:13 +00:00
Dylan K. Taylor
ad0553fbf8 Bump to API 3.0.0-ALPHA2 - READ DESCRIPTION!
Refactored level\format\generic\GenericChunk -> level\format\Chunk.
Re-added support for async chunk sending
Refactored most Level IO into new namespaces for more organisation
Removed LevelDB loader completely (will be re-added at a later date)
2017-01-06 17:13:45 +00:00