Commit Graph

149 Commits

Author SHA1 Message Date
fe649d8d70 Extract ServerConfigGroup from Server
this API isn't very nice, but it's pretty much the same as the original, and at least this can be _kinda_ unit-tested...
2020-05-24 15:48:03 +01:00
c9af5ce7a9 Convert GeneratorManager to singleton 2020-05-23 10:13:03 +01:00
148228e360 update pocketmine/math, adapt to add() changes 2020-05-19 12:26:18 +01:00
58fb185e05 Merge commit '58e32086c04d6622c01f59d0cd7216bd8a50eddb'
# Conflicts:
#	resources/vanilla
#	src/world/World.php
2020-05-18 10:47:37 +01:00
11ef9fb0c0 Item-from-string parsing no longer depends on ItemIds
after this is done I'm banning the constant() function.
2020-05-13 00:18:49 +01:00
8efe7fcfb0 World: allow configuring blocks-per-tick for random updating
this makes it much easier to observe and debug stuff that depends on it, such as grass, crop and tree growth, since they'll happen much faster.
A future improvement would be to have the update function use a non-global random so that the output can be reproduced using a given seed.
2020-05-10 11:50:31 +01:00
53a33e8c20 World: remove unused import
we're getting so close !!!
2020-05-04 11:58:57 +01:00
d40152e3bb World: fix time sync 2020-05-04 11:23:44 +01:00
aac017eae4 World: drop unused and very misleadingly named addChunkPacket() 2020-05-04 10:22:39 +01:00
c490bc5a8c World: drop global packet broadcast 2020-05-04 02:31:19 +01:00
b1021315b0 World: remove protocol-specialized broadcastLevelEvent() 2020-05-04 02:28:34 +01:00
3ce9a4801f World: allow registering unload hooks
this will be used for cache management when worlds get unloaded.
2020-04-29 18:48:16 +01:00
bb11cbd89c World: relocate packet stuff for time and difficulty behind NetworkSession API 2020-04-29 18:31:54 +01:00
a178a14732 Merge commit '34a3e0d' 2020-04-25 12:13:03 +01:00
7d9df6af6f Convert EntityFactory to singleton 2020-04-24 22:43:02 +01:00
5a94af40e2 Convert ItemFactory to singleton 2020-04-24 00:18:31 +01:00
13d784cd0c Convert BlockFactory to singleton 2020-04-23 23:45:13 +01:00
aac7da6c96 eliminate remaining empty() usages 2020-02-07 21:51:50 +00:00
fb1126797a Merge branch 'stable' 2020-02-07 18:13:55 +00:00
ff63f6d055 fill in more iterable types (master) 2020-02-01 20:19:57 +00:00
465d8cda79 Merge commit 'a5764b3ae98a70fe8f20f9b403a4ab84b51b11d8'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/level/format/io/LevelProvider.php
#	src/world/generator/Generator.php
#	src/world/generator/GeneratorRegisterTask.php
2020-01-31 19:32:38 +00:00
5955ff5393 fix phpdoc spacing screwed up by phpstorm 2020-01-22 15:20:50 +00:00
8efc4d12ec trim phpdoc lines 2020-01-22 15:18:37 +00:00
055b13a6cf strip extra blank lines (php-cs-fixer) 2020-01-22 15:14:10 +00:00
1b33143f4f pass 2, manual removal of incorrect non-nullable phpdoc types 2020-01-22 12:06:47 +00:00
67bcc1c0fb phpdoc armageddon for master, pass 1 2020-01-22 11:55:03 +00:00
3ee6887792 populate remaining missing return types, using native returns where possible
this is done separately to stable so that stable changes can be integrated easily using an empty merge.
2020-01-19 10:26:35 +00:00
96b91af66a Merge branch 'stable' 2020-01-11 21:41:38 +00:00
cda1143a79 Merge branch 'stable' 2020-01-09 17:17:42 +00:00
0f718ea28b Merge commit '8726604899d1a371567141e0831ed570d3233356' 2019-12-25 14:19:35 +00:00
a9c09e4517 Merge branch 'next-minor' 2019-12-12 13:52:14 +00:00
d3d7709ead Merge branch 'next-minor' 2019-12-03 11:55:45 +00:00
9aab97578b World: clean up lighting update API 2019-10-23 21:52:39 +01:00
3768f3008e World: group light-related functions
i don't know why these were dumped between getBlock() and setBlock() to begin with.
2019-10-23 21:29:00 +01:00
f01b7b74ba World: remove setBlockLightAt() and setBlockSkyLightAt() 2019-10-23 21:25:29 +01:00
21e9bca64a World: remove getHeightMap() and setHeightMap()
these are too specialized to be of any use to plugin developers, and they are also misleading - plugin devs often think this refers to the highest block Y coordinate, but it doesn't.
2019-10-23 19:30:06 +01:00
02ff8d671b Mostly phase out EmptySubChunk
copy-on-write and zero-layer SubChunk objects are much easier to manage and have less cognitive overhead.

obviously, the goal is to get rid of EmptySubChunk completely, but right now it does still serve a purpose (filling in dummy values for reading out-of-bounds on chunks), and that's a problem that takes a little more work to fix.
2019-10-22 23:00:49 +01:00
b8c857df64 World: prevent getHighestAdjacentBlockLight() and getHighestAdjacentBlockSkyLight() trying to exceed world bounds
this creates a problem for sky light above y=256, but this problem exists in lots of other places already anyway.
2019-10-22 23:00:49 +01:00
39d5903c3e Remove INT32_MIN and INT32_MAX global constants 2019-08-25 16:09:51 +01:00
6a4ae4cb94 remove position parameters from BlockFactory::get() and BlockFactory::fromFullBlock() 2019-08-24 17:19:27 +01:00
aa60aa69ee World: fix bug in getNearestEntity()
fuck you PhpStorm
2019-08-21 18:51:08 -04:00
3a41a798ad move forced overflow of SetTimePacket to SetTimePacket::create() 2019-08-20 16:24:47 +01:00
794c7b2469 clean up imports 2019-08-20 15:59:27 +01:00
965177fb74 Server: drop redundant proxy function broadcastPacket()
this is just making it harder to search for broadcast usages, and we want to get rid of all packet broadcasting shit from Server anyway.
2019-08-19 19:30:57 +01:00
73b2669712 remove World->isFullBlock(), add Block->isFullCube(), clean up some BB mess 2019-08-15 16:22:54 +01:00
c533f6a0bd Implemented partial chunk saving on LevelDB (#3078) 2019-08-07 17:39:36 +01:00
4e5b296c8c Tiles now encapsulate positions instead of extending them 2019-08-05 19:33:34 +01:00
53ab860db5 first shot making Block not extend Position
this makes some stuff a lot less pretty, but this seems to be the bare minimum necessary to do this task. It can be enhanced later.
2019-08-05 16:44:09 +01:00
5499ac620c Removed pocketmine subdirectory, map PSR-4 style 2019-07-30 19:14:57 +01:00