Dylan K. Taylor
0aebb3f4fb
Clean up LevelSoundEvent handling
2019-03-26 19:53:40 +00:00
Dylan K. Taylor
e1504c668e
LevelSoundEventPacket: more helpers
2019-03-26 18:23:02 +00:00
Dylan K. Taylor
1bf0802275
LevelEventPacket: added create() to reduce boilerplate code
2019-03-26 16:49:00 +00:00
Dylan K. Taylor
2a3e6dcf00
Rename BlockIds -> BlockLegacyIds
2019-03-23 19:46:31 +00:00
Dylan K. Taylor
79ef8e0803
Replace all legacy blockID references with BlockIds::
2019-03-23 19:44:33 +00:00
Dylan K. Taylor
8c536c248d
Updating for latest PocketMine-NBT changes
2019-03-21 15:58:22 +00:00
Dylan K. Taylor
8de9e61651
Item: Remove get/set/removeNamedTagEntry()
2019-03-17 17:49:09 +00:00
Dylan K. Taylor
a858103e6b
Support paletted subchunks, drop all formats except leveldb
2019-03-10 19:53:24 +00:00
Dylan K. Taylor
a0a8026cba
Implemented automatic world format conversion
2019-03-10 19:53:23 +00:00
Dylan K. Taylor
ae9f57ac28
Revert "Remove hacks for triggering adjacent light refill"
...
This reverts commit 1dca9074d5f087d15f8d30d2941150fe51617489.
This change introduced performance issues with transparent blocks.
2019-03-10 19:50:35 +00:00
Dylan K. Taylor
1bb9b3d3ab
Discard light information from disk storage
...
this makes world conversion faster and offers the opportunity to correct age-old lighting bugs.
2019-03-03 16:22:44 +00:00
Dylan K. Taylor
6bd43a8215
Firehose auto-tick-rate anti-feature, closes #2665
2019-03-03 13:24:53 +00:00
Dylan K. Taylor
6c8fa8ae28
More nullable and void typehints
2019-03-02 10:29:11 +00:00
Dylan K. Taylor
d679fb7546
Block: Rename onActivate() -> onInteract()
2019-02-28 17:35:30 +00:00
Dylan K. Taylor
899081e1b9
Level: fixed randomTickBlocks, also delete some useless code
...
the randomTickBlocks thing is populated with state IDs anyway, not variants...
2019-02-24 13:10:45 +00:00
Dylan K. Taylor
878c704597
Remove another dead function
2019-02-23 17:15:50 +00:00
Dylan K. Taylor
49f9605620
Level: Allow tiles to be sent with regular block updates
2019-02-23 17:01:59 +00:00
Dylan K. Taylor
eadb1d310e
Level->sendBlocks() now syncs tiles
2019-02-23 16:53:29 +00:00
Dylan K. Taylor
c26544475e
More PHP 7.1 nullables
2019-02-22 12:55:34 +00:00
Dylan K. Taylor
73a565355b
Make some forced-optional nullable parameters non-optional, PHP 7.1 style
...
these parameters did not make any sense to be optional, but were forced to be this way because of the way nullable types worked before 7.1.
2019-02-22 12:54:00 +00:00
Dylan K. Taylor
fd4a441f3a
Level: add unregisterChunkListenerFromAll()
...
it's not expected for chunk listeners to have to track all the chunks they are listening to under normal circumstances.
2019-02-21 14:51:16 +00:00
Dylan K. Taylor
58cafc853f
s/level/world (strings only)
...
we should look at doing this for code too, but for now I'm not planning to break everyone's plugins.
2019-02-20 15:33:46 +00:00
Dylan K. Taylor
2c8a065b94
Standardise SNAKE_CASE for surrogate enums
2019-02-20 11:14:07 +00:00
Dylan K. Taylor
b252be1c7a
Added ItemFactory::air() sugar
...
This makes it easier to create air stacks without accidents, and also reduces the amount of throwaway air objects which get created.
2019-02-16 12:19:54 +00:00
Dylan K. Taylor
f49d590794
Level: remove getTiles(), more removal of tiles from user interface
2019-02-15 16:27:00 +00:00
Dylan K. Taylor
dce08b4e88
Introduce Item use results - can be success, fail or none
...
closes #2693 , closes #2705 , closes #2734
2019-02-14 19:21:29 +00:00
Dylan K. Taylor
7b6d76871c
Block: add face and clickVector to onActivate() parameters, closes #267
...
this is an old old old issue, i don't know why it wasn't addressed sooner.
2019-02-13 14:29:59 +00:00
Dylan K. Taylor
01e7ebeb5c
Automate creation and deletion of Tiles for appropriate blocks
...
closes #880
2019-02-13 12:27:13 +00:00
Dylan K. Taylor
260c5dcf00
Clean up tile destruction
2019-02-13 12:02:04 +00:00
Dylan K. Taylor
923b1ad9a6
Split up ChunkLoader and ChunkListener
2019-02-04 19:53:03 +00:00
Dylan K. Taylor
8387c08db2
Level: remove unused variable
2019-02-04 19:50:24 +00:00
Dylan K. Taylor
c9f9f551f4
Merge branch '3.5' into master-rollback
2019-02-04 19:47:21 +00:00
Dylan K. Taylor
0f92ec6d2a
Level: Record a debug message when chunks are loaded without loaders
2019-02-03 16:24:10 +00:00
Dylan K. Taylor
0b7ff6f2e7
Level: properly mark some functions as @internal
...
this ensures these functions won't appear in the documentation.
2019-02-01 14:33:06 +00:00
Dylan K. Taylor
5fe1d2e396
Level: fixed setChunk() bug introduced by eebd90ec4245abbcdddfc11fe3f4dc36a008f19e
...
Anyone who is using getChunkPlayers() should probably check that their code is actually doing what they think it's doing.
2019-01-31 18:28:42 +00:00
Dylan K. Taylor
c124aae219
Merge branch '3.5'
2019-01-30 13:09:43 +00:00
Dylan K. Taylor
331ae5498f
Crash the generator when encountering invalid presets
...
this is a partial fix for #2717 , but still not ideal because it'll spam whenever a chunk is attempted to be generated. However, fixing this properly requires potentially breaking API changes.
2019-01-30 12:29:04 +00:00
Dylan K. Taylor
5c24ac604a
Merge branch '3.5'
2019-01-30 11:14:47 +00:00
Dylan K. Taylor
eebd90ec42
Level: fixed setChunk() leaking memory when not copying tiles/entities
...
closes #2719
2019-01-30 10:58:35 +00:00
Dylan K. Taylor
8e47a40b4c
Level: rename poorly-named parameter of setChunk()
...
this now has a mouthful of a name. I'd like to invert it, but I can't do that without silently breaking backwards compatibility, which is unacceptable.
2019-01-30 10:26:18 +00:00
Dylan K. Taylor
a6237958e8
Level: fix another crashy edge case in chunk ticking
...
this also removes a bias towards the chunk that the player is on, because this makes such chunks tick faster than adjacent chunks.
2019-01-27 20:41:47 +00:00
Dylan K. Taylor
729ae8bab7
Level: fixed adjacent chunk loading check
2019-01-27 16:20:38 +00:00
Dylan K. Taylor
eac8f639a7
Level: Simplify internal chunk ticking handling
2019-01-26 13:48:43 +00:00
Dylan K. Taylor
939f3efa3b
Merge branch '3.5'
2019-01-25 19:44:08 +00:00
Dylan K. Taylor
c66dc7b273
Level: Optimize blockticking coordinate selection
...
generating 1 large bounded random costs the same as generating 4 small ones, so it makes more sense to do it like this instead.
Note that prior to 7.1 this code would not work due to it not handling 64-bit appropriately.
2019-01-25 19:43:16 +00:00
Dylan K. Taylor
6ee484e401
ChunkLoader: remove getLoaderId() (take 2)
2019-01-25 18:58:01 +00:00
Dylan K. Taylor
bb27c76d13
Merge branch '3.5'
2019-01-25 17:12:00 +00:00
Dylan K. Taylor
5bf7350ee5
Level: change some stupid var names
2019-01-25 17:10:44 +00:00
Dylan K. Taylor
8a0f5cd7c9
Merge branch '3.5'
2019-01-25 13:19:40 +00:00
Dylan K. Taylor
636cc1c199
Level: some mitigations for #2675
...
this reduces the performance impact by using smaller keys, which reduces the key distance for nearby blocks.
2019-01-25 13:17:33 +00:00