Dylan K. Taylor
05af87e1d4
Strip empty lines at the end of classes
2018-06-11 13:19:23 +01:00
Dylan K. Taylor
b3ea9606c7
Server: fixed doc comment for shutdown()
2018-06-11 12:32:38 +01:00
Dylan K. Taylor
a080a9b75c
Player: remove redundant parameter from checkNearEntities()
2018-06-11 12:25:01 +01:00
Dylan K. Taylor
137a05c418
Player: remove useless return value from orderChunks()
2018-06-11 12:22:46 +01:00
Dylan K. Taylor
245f5c6bef
Player: remove obsolete TODO
2018-06-11 12:20:11 +01:00
Dylan K. Taylor
3be6665e3d
AsyncWorker IDs now start from 0 instead of 1
...
this now matches their IDs in the AsyncWorker pool, as used by submitTask().
2018-06-11 11:58:24 +01:00
SOFe
8704d378d4
PluginBase::getResources() returns associative array ( #2193 )
...
Now, it has string keys, which is the path of the resource file relative to the resources folder.
2018-06-11 11:06:54 +01:00
Dylan K. Taylor
b9718f9e87
Remove redundant second parameters for BlockFactory::get()
2018-06-11 11:03:23 +01:00
Dylan K. Taylor
1d1e6966a2
Biome: remove useless abstract class
2018-06-11 11:00:33 +01:00
Dylan K. Taylor
610b7bd8b0
RiverBiome: don't generate grass underwater
2018-06-11 10:58:30 +01:00
Dylan K. Taylor
17607b8116
AsyncPool: added some void typehints
2018-06-11 10:41:40 +01:00
Dylan K. Taylor
4c98d9d3ad
AsyncPool: add a type doc to $size
2018-06-11 10:40:01 +01:00
Dylan K. Taylor
7d5b3079bc
AsyncPool: more documentation
2018-06-11 10:38:51 +01:00
Dylan K. Taylor
88d83e0fca
AsyncPool: Lazy-start AsyncWorkers when they are needed only
...
This changes how the AsyncPool works so that it does not immediately always start all of the workers in the pool.
Instead, workers will be started only when an idle worker was not found.
This allows for significant memory footprint reductions while idle.
In effect the async-workers setting in pocketmine.yml now dictates a _maximum_ pool size, not a fixed pool size.
2018-06-11 10:23:46 +01:00
Dylan K. Taylor
4b221c0601
OceanBiome: don't inherit from GrassyBiome, change ground cover to gravel
2018-06-11 09:58:48 +01:00
Dylan K. Taylor
e867427f71
Leaves: remove useless $check parameter
...
this is only written to and never read from.
2018-06-10 17:20:34 +01:00
Dylan K. Taylor
c4c6c58615
Added some missing typehints
2018-06-10 17:18:55 +01:00
Dylan K. Taylor
89643ff9af
MainLogger: Added getFormat() and setFormat()
...
this allows plugins to easily alter the output of the console logger.
2018-06-10 10:49:12 +01:00
Dylan K. Taylor
9657d50aeb
MainLogger: workaround --disable-ansi not being respected on other threads
2018-06-10 10:24:49 +01:00
Dylan K. Taylor
3725bea3e5
AsyncPool: Slightly reduce worker memory usage with more conservative start options
...
this results in a memory footprint reduction of maybe 4MB for a total of 8 workers. Not much, but it's something.
2018-06-10 10:18:07 +01:00
Dylan K. Taylor
f3a84b332b
Updated RakLib and SPL dependencies, allow any 0.3.x SPL
2018-06-09 20:13:27 +01:00
Dylan K. Taylor
f6481eab8f
Implemented an InventoryEventProcessor, fixes #1986 ( #2176 )
...
* Implemented InventoryEventProcessor, fixes #1986
Event processors can now be registered and unregistered at will. Entity inventory/armor change events are now handled by event processors instead of the inventories themselves, which allows enabling/disabling the calling of these events at will.
This now avoids stupid things happening when initializing inventory contents, since the callers for those events are now registered _after_ the contents are initialized.
2018-06-09 17:37:10 +01:00
Dylan K. Taylor
8e5aca70b4
Entity: Avoid using close() during initEntity()
...
this simply conceals bugs and will cause astonishing behaviour.
2018-06-09 17:06:15 +01:00
Dylan K. Taylor
85136b7b4a
Entity: Attach to level & chunk after initEntity() call, not before
...
this avoids leaving garbage entities attached to chunks when exceptions are thrown during initEntity().
2018-06-09 16:59:22 +01:00
Dylan K. Taylor
47742d74c8
Player: Drop load queue on level switch
...
This ensures that the player doesn't request bad chunks if it was teleported from an invalid level.
2018-06-09 16:21:41 +01:00
Dylan K. Taylor
ca54c8d78e
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
2018-06-09 16:21:01 +01:00
Dylan K. Taylor
601811f0f8
Player: Account for the possibility of Level being null in switchLevel()
...
the Entity base also accounts for this, and assuming that this is automatically valid is causing lots of crashes. I am not sure of the circumstances under which this is suddenly becoming null, but this shouldn't assume that the level is valid nonetheless.
2018-06-09 16:20:51 +01:00
Anton
aeb551b317
Remove double use of spl_object_hash ( #2226 )
2018-06-09 14:15:50 +01:00
Dylan K. Taylor
37b445f210
Updated Math dependency
2018-06-09 13:05:25 +01:00
Dylan K. Taylor
d04991feb6
Level: Avoid chunk sending bugs caused by duplicate chunks with wrong coordinates
...
If the same chunk is set into multiple different places in the world, the chunk's position is no longer able to be relied on, because it will have the position of the last place it was set. This results in chunks not getting sent correctly when the same chunk is set in multiple places.
This avoids the bug by using known valid coordinates (using chunk hashes) to establish the real coordinates, and also adds an assert to notify developers should they unintentionally set a duplicate chunk by mistake.
2018-06-09 11:25:45 +01:00
Dylan K. Taylor
c327b3d2c4
AsyncPool: be less dependent on Server in the code
...
The goal is to remove the Server things from here completely.
2018-06-08 20:08:23 +01:00
Dylan K. Taylor
af69418a55
PlainBiome: reduce maximum elevation
2018-06-08 13:04:45 +01:00
Dylan K. Taylor
8cd311bcb4
GroundCover: don't replace liquid with can-be-flowed-into blocks
...
fixes snow layers generating underwater
2018-06-08 11:15:19 +01:00
Dylan K. Taylor
78ec3937bf
BiomeSelector: drastically simplified implementation and made more robust
...
- Doesn't need to be pre-populated with biomes prior to calculating the heatmap - now population of biomes is entirely dependent on the lookup function, improving consistency
- Uses an abstract class method for lookup instead of callback (use anonymous class instead)
- Faster because the heatmap is directly populated with biomes instead of biome IDs, removing an unnecessary lookup.
2018-06-08 10:19:08 +01:00
Dylan K. Taylor
4e3e807741
Biome: Added UnknownBiome class to avoid astonishing behaviour on unknown biomes
2018-06-08 10:19:08 +01:00
Dylan K. Taylor
8c6161a4f2
Biome: make biomes list use an SplFixedArray
2018-06-08 10:19:08 +01:00
Dylan K. Taylor
c8a87b14d5
PopulationTask: actually fix locks not getting released in generation errors
2018-06-07 23:53:59 +01:00
Dylan K. Taylor
8fca7cc68d
Apply some typehints to generators
2018-06-07 20:22:35 +01:00
Dylan K. Taylor
45f940681a
Make Normal->pickBiome() private
2018-06-07 20:21:26 +01:00
Dylan K. Taylor
e3c97d7d5e
Flat: clean up more garbage
2018-06-07 20:18:04 +01:00
Dylan K. Taylor
172abef2a7
Flat: clean up generation of base chunk
2018-06-07 20:11:29 +01:00
Dylan K. Taylor
709abb02e6
Generator: remove more dead incomplete code
...
again, this can be added when and if it's actually implemented.
2018-06-07 19:54:51 +01:00
Dylan K. Taylor
428ca29e4b
Remove dead bedrockDepth fields from generator
...
yes, this is not implemented yet. fields for this can be added when proper bedrock generation is implemented. For now, it's just dead code.
2018-06-07 19:52:56 +01:00
Dylan K. Taylor
f61ad20f6b
Remove a whole bunch of dead copy-pasted code from Nether generator
2018-06-07 19:51:27 +01:00
Dylan K. Taylor
3c9af5cd6d
Generator: small reduction of code duplication
2018-06-07 19:49:51 +01:00
Dylan K. Taylor
996935e9b2
Cleaned up level seed handling
2018-06-07 19:39:24 +01:00
Dylan K. Taylor
3707a41b67
Server: small cleanup to seed handling
2018-06-07 18:25:44 +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
083a1e1ff6
GeneratorManager: Make addGenerator() throw exceptions instead of returning false
2018-06-07 14:34:26 +01:00