Commit Graph

23 Commits

Author SHA1 Message Date
a42bb9626d Added another handful of blocks
clearing out my workspace...
2022-07-05 20:42:22 +01:00
412dcaa744 Implemented crimson, warped and mangrove signs 2022-07-05 16:18:54 +01:00
d9544b5d0e Added soul fire 2022-07-04 22:32:35 +01:00
dd615c775d Added various blocks made from mangrove, crimson and warped wood 2022-07-03 19:01:34 +01:00
33eef99d1f Added axis support for all-sided logs 2022-07-03 17:27:25 +01:00
e302e5a85f Implemented chiseled deepslate, chiseled nether brick and cracked nether brick 2022-07-03 03:04:06 +01:00
4acf7aadbd Added quartz bricks 2022-07-03 02:11:50 +01:00
a3016abf53 Added polished deepslate block/slab/stair/wall 2022-07-03 02:00:43 +01:00
89632f3514 Added deepslate, cobbled/tiles/bricks walls/slabs/stairs/cubes 2022-07-03 01:43:27 +01:00
3f937605ac Added calcite 2022-07-02 23:54:51 +01:00
b818ed0d08 Regenerated TODO list 2022-07-02 23:17:46 +01:00
0e0b858b69 Added raw copper, gold and iron blocks 2022-07-02 23:17:10 +01:00
2a0fade893 Implemented Light blocks 2022-07-02 22:39:11 +01:00
172214386a Added a batch of simple blocks from 1.16 and 1.17 2022-07-02 21:53:59 +01:00
d49597fe5f BlockStateToBlockObjectDeserializer: make stairs less annoying to implement 2022-07-02 20:51:31 +01:00
ff90c83d66 Implemented log stripping via axe right-click 2022-07-02 19:16:15 +01:00
248eacd042 GlazedTerracotta: make colour dynamic, like all other coloured blocks
made possible by stripping out legacy mess
2022-07-02 18:30:23 +01:00
9740891a2f Move BlockLegacyMetadata to pocketmine\data package 2022-07-02 17:01:10 +01:00
27d7672273 Item frames can now be placed on the up or down faces of blocks 2022-06-25 16:10:39 +01:00
f24f2d9ca9 Hit block legacy metadata with the biggest nuke you've ever seen
This commit completely revamps the way that blocks are represented in memory at runtime.

Instead of being represented by legacy Mojang block IDs and metadata, which are dated, limited and unchangeable, we now use custom PM block IDs, which are generated from VanillaBlocks.
This means we have full control of how they are assigned, which opens the doors to finally addressing inconsistencies like glazed terracotta, stripped logs handling, etc.

To represent state, BlockDataReader and BlockDataWriter have been introduced, and are used by blocks with state information to pack said information into a binary form that can be stored on a chunk at runtime.
Conceptually it's pretty similar to legacy metadata, but the actual format shares no resemblance whatsoever to legacy metadata, and is fully controlled by PM.
This means that the 'state data' may change in serialization format at any time, so it should **NOT** be stored on disk or in a config.

In the future, this will be improved using more auto-generated code and attributes, instead of hand-baked decodeState() and encodeState(). For now, this opens the gateway to a significant expansion of features.
It's not ideal, but it's a big step forwards.
2022-06-24 23:19:37 +01:00
be2fe160b3 Throw a more specific exception on unknown block IDs 2022-06-24 22:52:48 +01:00
adf8a61814 BlockStateToBlockObjectDeserializer: make map() public
this allows plugins to implement their own blocks using this deserializer.
2022-06-23 19:40:11 +01:00
680615eed8 Namespace rename 2022-06-08 15:54:45 +01:00