Commit Graph

24 Commits

Author SHA1 Message Date
Sascha L. Teichmann
032237261d remove old compress workaround needed for pre Go 1.7 2024-01-07 03:56:32 +01:00
Sascha L. Teichmann
65762936a4 fix error strings 2024-01-06 10:17:25 +01:00
Sascha L. Teichmann
fa0ec06e36 Fix zstd decoding 2024-01-06 02:27:45 +01:00
Sascha L. Teichmann
8a344b5a6d Support v29 blocks 2024-01-06 01:40:03 +01:00
Sascha L. Teichmann
827d73bed0 Add zstd library 2024-01-05 14:41:06 +01:00
Sascha L. Teichmann
08d32826dc Increased readability of block content extraction a tiny bit. 2017-03-01 11:41:21 +01:00
Sascha L. Teichmann
c167efecd2 Content and parameters width seems to be 255 instead of 2 in new block format. This is strange becaus they are set hard to 2 in mapblock.cpp#MapBlock::serialize. 2017-02-24 12:02:06 +01:00
Sascha L. Teichmann
90279506d1 Ported new map block offset in version >= 27 from C++ mapper.
Needs testing.
See 21444d00c3
2017-02-23 16:08:16 +01:00
Sascha L. Teichmann
ea57c7c35f Silence all warnings of golint not related to missing comments. 2016-04-24 12:41:58 +02:00
Sascha L. Teichmann
b5f531b0ba Before Go 1.7 there is an extra offset needed to decode blocks correctly
after the embedded compressed data. In post 1.7 this bug was fixed.
We use build tags here to support both cases.
2016-04-08 23:40:36 +02:00
Sascha L. Teichmann
08031f1dcd Do more boundary checks in block decoding. 2015-08-24 10:45:28 +02:00
Sascha L. Teichmann
011cd0e4f4 Be more defensive in decoding node id table in blocks. 2015-08-23 22:48:54 +02:00
Sascha L. Teichmann
c4c35dc10d Use a sync.Pool to recycle the zlib readers. Speeds up the decoding of database blocks significantly. 2015-08-08 16:01:23 +02:00
Sascha L. Teichmann
ab1a86384b Reset zlib reader instead of re-opening it before reading meta data from block. Speeds up decoding of blocks significantly. Using a sync.Pool will seed it up even more. 2015-08-08 13:00:12 +02:00
Sascha L. Teichmann
7f82d482f5 More header updates. 2015-07-26 16:44:51 +02:00
Sascha L. Teichmann
91a50a4622 Log missing colors only once to make log output less spammy. 2015-07-20 14:01:01 +02:00
Sascha L. Teichmann
232feaa435 Dont store air only information in decoded block. This can be found out pretty easy by analysing the other fields if needed. 2015-07-20 13:27:46 +02:00
Sascha L. Teichmann
2d00eb9567 Simplifications when decoding blocks from database to save some memory allocations. 2015-06-21 22:47:06 +02:00
Sascha L. Teichmann
eaa3949b10 Added a flag to decoded block to check if it contains any transparent colors. Useful to establish a fast path in transparent rendering if it does not. 2014-10-25 11:20:51 +02:00
Sascha L. Teichmann
c03d382ca6 Pass pointer to Colors struct around which makes it easier to eg. find transparent colors. 2014-10-19 21:05:38 +02:00
Sascha L. Teichmann
8b42446acc Do not render air only blocks. Nice performance speed up! :-) 2014-10-19 17:15:33 +02:00
Sascha L. Teichmann
b445cfb33a Moved bloch decoding and rendering from tilemapper to common. 2014-09-12 20:22:34 +02:00
Sascha L. Teichmann
13bb251f35 Moved all the block producer/consumer interfaces to common. 2014-09-07 16:12:18 +02:00
Sascha L. Teichmann
d75fe4f102 Moved Block as type to common structures. 2014-09-07 15:57:25 +02:00