Dylan K. Taylor
1648fff916
Replaced Position->getLevel() null checks with isValid()
2018-03-20 11:10:36 +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
ac5a91b67e
Cleaned up bool comparison mess
2018-03-19 14:10:55 +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
9c598d1345
Spawnable: don't mark chunk as changed onChanged()
...
this is unnecessary because a chunk is considered "changed" if it has tiles on it anyway.
2018-03-15 09:48:28 +00:00
Dylan K. Taylor
28e601bbb9
Tile: added handling for PC 1.11 save IDs
2018-02-28 19:58:18 +00:00
Dylan K. Taylor
0ad8ea6e92
Remove unused imports
2018-02-24 19:01:09 +00:00
Dylan K. Taylor
093cb5b39e
Updated PocketMine-NBT dependency
2018-02-17 14:29:20 +00:00
Dylan K. Taylor
ce4e0bf69c
Tile: fixed copying of custom block data
2018-02-15 11:47:12 +00:00
Dylan K. Taylor
dc84484c2b
ContainerTrait: Add PhpDoc for ListTag iteration
2018-02-15 11:45:13 +00:00
Dylan K. Taylor
9abfd54cc1
Updated with ListTag changes from PocketMine-NBT
2018-02-13 16:50:49 +00:00
Dylan K. Taylor
c4486d9ad7
Tile: Cleaned up utterly pointless overcomplicated code for inventories
2018-02-06 13:01:54 +00:00
Dylan K. Taylor
266a253c03
Remove dead imports
2018-01-05 19:48:04 +00:00
Dylan K. Taylor
90fc649441
Fixed bad PhpDoc leftovers from NBT streams refactor
2018-01-04 20:32:06 +00:00
Dylan K. Taylor
c747c7d025
Throw exceptions when entities/tiles are created on chunks that don't exist
...
These assertions don't make sense. Since the chunk field is used below in both cases, the chunk should **never** be null no matter what.
2018-01-02 13:12:54 +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
4f8e4f0522
Add EOF newlines where missing (bulk) ( #1836 )
...
This should solve issues with people making GitHub PRs and having the web editor messing things up. GitHub Web Editor sucks :(
2017-12-20 11:56:36 +00:00
JackNoordhuis
686e1c4470
Implement ender chest ( #1462 )
2017-11-22 14:25:21 +00:00
Dylan K. Taylor
8d59843020
Order tile constants alphabetically
2017-11-22 14:00:41 +00:00
Dylan K. Taylor
74b074753f
Bulk addition of constant visibilities
...
thanks PhpStorm inspections plugin for annoying the shit out of me until
I did this.
2017-11-21 14:44:10 +00:00
Dylan K. Taylor
e0654b85ba
get rid of dynamic field assignments
...
nearly there now... eventually
2017-11-17 10:43:51 +00:00
Sandertv
2794df34ab
Basic implementation of banners, including API to modify them with ease. ( #1331 )
...
Banner crafting is NOT implemented yet.
2017-11-15 11:10:46 +00:00
Dylan K. Taylor
827ee5ff33
more constants in Tile
2017-11-08 10:49:15 +00:00
Dylan K. Taylor
f8e6438efe
updated some NBT for tiles
2017-10-31 18:22:06 +00:00
Dylan K. Taylor
91c256f1a9
Added Level->getTileAt()
2017-10-30 13:36:42 +00:00
Dylan K. Taylor
93443992be
Fixed chests not getting updated properly on pair/unpair, close #1514
...
it wasn't clearing spawn compound caches or chunk caches
2017-10-30 11:50:02 +00:00
Dylan K. Taylor
48fefae920
Added cache for tile spawn compounds
...
avoids expensive repetetive NBT writes on chunk sends when the tile hasn't been changed
2017-10-27 10:23:48 +01:00
Dylan K. Taylor
18e4e5364f
Fixed getBlock() performance degradation caused by 781de3efabcd526281fd1adc8ce881d408471563, added Level->getBlockAt() to avoid creating vectors everywhere
2017-10-20 13:22:49 +01:00
Dylan K. Taylor
5a353012de
Clean up some unused imports
2017-10-19 16:39:34 +01:00
Dylan K. Taylor
2c34648c3d
fixed second half of double chest items getting deleted, close #1477
2017-10-18 12:29:57 +01:00
Dylan K. Taylor
7f0a961526
"Creator" tag on signs may not exist
2017-10-17 13:35:31 +01:00
Dylan K. Taylor
68ac4f538f
Added ContainerTrait, reduce copy-pasted code in Tile
2017-10-16 20:01:17 +01:00
Dylan K. Taylor
f4ff5d81ea
Added missing parent calls for saveNBT() in Chest and Furnace
2017-10-16 18:56:48 +01:00
Dylan K. Taylor
28a840d161
Make use of CompoundTag->hasTag()
2017-10-16 18:32:08 +01:00
Dylan K. Taylor
20b86bdea8
Cleaned up tile NBT handling, use new CompoundTag API methods
2017-10-16 16:48:24 +01:00
Dylan K. Taylor
0b1a9ba062
Added more typehints to Tile namespace
2017-10-16 16:14:44 +01:00
Dylan K. Taylor
45b003ac2e
Removed unnecessary return from Sign
2017-10-16 16:10:33 +01:00
Dylan K. Taylor
af85659c63
Remove redundant property from Tile
2017-10-16 12:35:32 +01:00
Dylan K. Taylor
95fa1824c8
Use a trait for nameable tiles instead of repeating code
2017-10-16 12:32:10 +01:00
Dylan K. Taylor
3b5eb45ff5
More usages of Item->isNull()
2017-10-16 12:29:39 +01:00
Dylan K. Taylor
68809d992b
Added BaseInventory->removeAllViewers()
2017-10-16 11:15:03 +01:00
Dylan K. Taylor
cd8006e242
Use constructor parameter for ListTags instead of setTagType() and removed some unnecessary type setting
2017-10-14 13:49:24 +01:00
Dylan K. Taylor
b7a9e10d49
Some cleanup to how tiles are created
2017-10-11 18:08:08 +01:00
Dylan K. Taylor
cef9c4621c
added som PhpDoc to Tile
2017-10-09 17:27:34 +01:00
Dylan K. Taylor
151681bd80
Remove some dead properties from Tile
2017-10-09 17:25:10 +01:00
Dylan K. Taylor
327907988b
Fixed a typo in Sign->setText() docs
2017-10-09 16:56:25 +01:00
Dylan K. Taylor
7267f1a520
Fixed some usages of Item constants for Blocks
...
only cosmetic change
2017-10-09 10:37:19 +01:00
Dylan K. Taylor
c47f1f572c
Added API method Item->pop()
2017-09-27 10:56:04 +01:00
Dylan K. Taylor
043ae487de
Fixed some inconsistent uses of new ShortTag
vs setValue() in Furnace
2017-09-24 10:34:25 +01:00
Dylan K. Taylor
f12701e582
Fixed possible undefined NBT in Furnace, close #1398
2017-09-24 10:29:36 +01:00