Dylan K. Taylor
22b91aaa24
SubChunkIteratorManager: Added method invalidate() to allow destroying stale chunk refs conveniently
...
this could be necessary for reusable long-life iterators when chunks get replaced.
2018-05-18 09:52:27 +01:00
Dylan K. Taylor
c285295037
Merge branch 'release/alpha12'
2018-05-17 18:40:24 +01:00
Dylan K. Taylor
ed65e91a3c
Tree: avoid astonishing behaviour with dark-oak and acacia saplings
...
ref #1973 , these should simply not grow at all since they are not implemented yet.
2018-05-12 10:03:20 +01:00
Dylan K. Taylor
b21572774a
Tool: cleanup durability handling, closes #379
...
long overdue... this isn't quite as extensible as the original api3/blocks system was, but this is primarily intended to replace Item->useOn(). If plugins want to use it it can be extended later on.
2018-05-10 19:48:51 +01:00
Dylan K. Taylor
b8523cb304
Merge branch 'remove-weak-position'
2018-05-10 13:53:07 +01:00
Dylan K. Taylor
197102ca3d
Level: fixed blocks not dropping when not broken by player
...
closes #2172
2018-05-05 21:50:28 +01:00
Dylan K. Taylor
8228774ad4
Remove extra data, this time without API breaks
...
this is necessary because the next MCPE release will probably be made before the next PM release.
2018-05-02 12:08:44 +01:00
Dylan K. Taylor
d80c471ae1
Typehints on missed sound and particle APIs
2018-05-02 11:44:18 +01:00
Dylan K. Taylor
5368120f13
Level: remove redundant getAutoSave() condition in close()
...
this is already checked by save() anyway.
2018-05-01 18:47:08 +01:00
Dylan K. Taylor
2e7db552dc
Level: __construct() now accepts a LevelProvider object instead of string, string
...
This is made possible by the removal of LevelProvider dependence on their Levels, and furthers the goal of #2024 .
2018-05-01 18:43:11 +01:00
Dylan K. Taylor
dfa6cd2b7e
Biome: Moved biome classes from level\generator\* to level\biome
2018-05-01 14:07:46 +01:00
Dylan K. Taylor
96d26a77a1
Explosion: set block damage to zero on destruction
2018-04-16 14:30:54 +01:00
Dylan K. Taylor
532269a484
Implemented block break XP drops
2018-04-15 19:03:18 +01:00
Dylan K. Taylor
f47f593555
Level: Removed fire hack from destroyBlockInternal()
...
this was causing unexpected behaviour particularly on burning trees, whereby fire would be unconditionally extinguished if the block below it was removed.
2018-04-10 09:59:40 +01:00
Dylan K. Taylor
646455f6e8
fixed painting particles, removed DestroyParticle
...
it didn't last long because they changed how this works... yuk
2018-04-09 16:26:15 +01:00
Dylan K. Taylor
e85fc54037
LevelSoundEventPacket: found unknown field
...
wtf mojang
2018-04-07 11:35:35 +01:00
Dylan K. Taylor
3134fa2744
Fixed FloatingTextParticle YET AGAIN
...
how many fucking ways can you break nametags Mojang???
2018-04-04 16:59:39 +01:00
Dylan K. Taylor
5b7b2dd0e2
Merge changes from ALPHA11 for 1.2.13
2018-04-04 11:31:39 +01:00
Dylan K. Taylor
5ce55bd3b0
duct tape for block ID remapping
2018-04-04 11:00:39 +01:00
Dylan K. Taylor
eba1ca030c
Fix variadic type docs ...again
...
PhpStorm changed its mind how it wants these documenting in 2018.1, and apparently the correct syntax follows the PHP code.
2018-04-02 12:33:24 +01:00
Dylan K. Taylor
c0c684b12e
Removed the need for paintings to check for destruction on schedule
...
Since we have a mechanism for triggering things on entities anyway, make use of it to do more than just forcing movement updates.
2018-03-25 13:15:10 +01:00
Dylan K. Taylor
a4c50d3204
Remove unused imports
2018-03-24 11:59:15 +00:00
Dylan K. Taylor
5eb1ee3416
Position: use setLevel() in constructor to validate level
2018-03-24 10:02:10 +00:00
Dylan K. Taylor
1648fff916
Replaced Position->getLevel() null checks with isValid()
2018-03-20 11:10:36 +00:00
Dylan K. Taylor
8d645b714f
Position: Destroy references to Level in isValid()
2018-03-20 10:55:24 +00:00
Dylan K. Taylor
403e996d2f
Level: Removed WeakPosition
...
This is a bad fix for an issue found in one specific use-case. This is redundant because the only places this is used are places where it's guaranteed to be valid, or places where it is checked to be valid anyway.
The Level leak originally noted that led to the creation of this class is something I consider to be a non-issue, because all the heavy things will be cleaned up anyway.
2018-03-20 10:49:23 +00:00
Dylan K. Taylor
73e09392b6
Timings: Clean up some terrible code, move namespaces
2018-03-19 19:05:51 +00:00
Dylan K. Taylor
209e28dfe5
Level: Removed MovingObjectPosition
2018-03-19 16:58:45 +00:00
Dylan K. Taylor
ac5a91b67e
Cleaned up bool comparison mess
2018-03-19 14:10:55 +00:00
Dylan K. Taylor
3d89bf5693
Updated PocketMine Math dependency
2018-03-18 18:08:24 +00:00
Dylan K. Taylor
e48ec9fb71
Ore: replaced a sub-optimal multiply()->divide() on Vector2
2018-03-18 18:06:04 +00:00
Dylan K. Taylor
95606b6e04
Generator: fixed a couple of hardcoded block IDs
2018-03-18 18:03:23 +00:00
Dylan K. Taylor
7fcc538a75
Level: clone Block object passed to setBlock() if set successfully
...
closes #2042
2018-03-17 16:35:10 +00:00
Dylan K. Taylor
9c786089f8
Level: don't create objects which aren't going to be used
2018-03-16 13:00:16 +00:00
Dylan K. Taylor
e3cae7364f
Level: don't send empty block update batches
2018-03-16 12:58:46 +00:00
Dylan K. Taylor
d542bbc736
Level: Fixed race condition between direct and batched block updating
...
This happened when a block was set into the world with a direct update, when an entry for that block was already present in the changedBlocks map. This fixes the bug by removing the entry from the changedBlocks map to avoid sending outdated block updates in batches.
2018-03-16 11:44:57 +00:00
Dylan K. Taylor
dd844f7ad3
Position: call parent constructor
2018-03-15 10:29:21 +00:00
Dylan K. Taylor
596c8a7b4f
Tile: Removed cyclic dependence on Chunks
...
Chunks were used by tiles for a couple of things:
- 1. for coordinates - which can be gotten using bitshifts
- 2. setChanged() - which is unnecessary as seen in the previous commit
Removing this circular dependency was actually remarkably easy to do.
2018-03-15 10:21:42 +00:00
Dylan K. Taylor
a2af838b1d
Level: fixed autosave not kicking in when entities are updated in a chunk (e.g. moving, dying, spawning)
2018-03-15 09:46:04 +00:00
Dylan K. Taylor
86eee429bb
Block: Split onUpdate() into several functions, removed Level::BLOCK_UPDATE_* constants
...
This allows the removal of lots of ugly code, and also exposes lots of similarities with how this update type was handled. This can be further improved in the future to more generically handle cases.
I realized in the process of changing this, that it might actually be simpler to treat to treat scheduled updates and neighbour updates as one and the same. They use the same mechanism for being saved on chunks (TileTicks),
and doing that would make updating only require one queue instead of two.
RedstoneOre: use onActivate() to trigger glowing
this is not technically correct behaviour, but this preserves the current behaviour.
2018-03-13 17:29:46 +00:00
Dylan K. Taylor
4f20a504e3
Level: remove dead function
...
this is handled by a queue now instead of ondemand, to avoid recursion bugs.
2018-03-13 11:46:23 +00:00
Dylan K. Taylor
d478661961
Minor cleanup to LevelDB constructor
2018-03-11 18:15:20 +00:00
Dylan K. Taylor
b8064aa45c
LevelDB: fixed more usages of CompoundTag ArrayAccess API
2018-03-11 17:55:35 +00:00
Dylan K. Taylor
00f596c4f8
Level: typehint hashing methods
2018-03-11 16:42:57 +00:00
Dylan K. Taylor
3f7b14bf59
Level: Remove dead generator leftovers
...
This is all handled by the population mechanism now. Nothing uses these things anymore since years.
2018-03-11 13:56:41 +00:00
Dylan K. Taylor
f2f8c235e7
Explosion: add exception throws for bad arguments
2018-03-11 13:06:29 +00:00
Dylan K. Taylor
69b3bb183d
Explosion: typehints and docs
2018-03-11 13:02:46 +00:00
Dylan K. Taylor
40b995a435
Level: Fixed botch-job PR #2089
...
@zKoz210 Do not contribute to this repository again without first testing your changes.
2018-03-10 19:08:30 +00:00
Dylan K. Taylor
b39bbffdc5
Entity: Moved and renamed entity\Item to entity\object\ItemEntity
2018-03-10 12:36:46 +00:00
Oreo Oreoniv
bd3d2451bc
Level: Added getRandomTickedBlocks() function ( #2089 )
2018-03-10 11:32:01 +00:00