168 Commits

Author SHA1 Message Date
Dylan K. Taylor
ae70c63798
Added tinted glass 2022-07-06 23:01:17 +01:00
Dylan K. Taylor
fe93609c8d
Added mud bricks and related blocks 2022-07-06 00:02:51 +01:00
Dylan K. Taylor
d725ded7b6
Added new ores 2022-07-05 21:43:47 +01:00
Dylan K. Taylor
a8dae96bb0
register honeycomb blocks properly 2022-07-05 21:03:27 +01:00
Dylan K. Taylor
a42bb9626d
Added another handful of blocks
clearing out my workspace...
2022-07-05 20:42:22 +01:00
Dylan K. Taylor
3c017af6a0
Added a handful of new easy items 2022-07-05 16:46:57 +01:00
Dylan K. Taylor
412dcaa744
Implemented crimson, warped and mangrove signs 2022-07-05 16:18:54 +01:00
Dylan K. Taylor
68cbe46600
Exterminate legacy item IDs 2022-07-05 15:12:55 +01:00
Dylan K. Taylor
c5282b059b
... 2022-07-05 14:27:02 +01:00
Dylan K. Taylor
325f1cf82e
Generalize runtime block data serialization
we want to reuse this code for item type data
2022-07-05 14:13:37 +01:00
Dylan K. Taylor
0a23e91329
Rename BlockFactory::fromFullBlock() -> BlockFactory::fromStateId() 2022-07-05 13:46:19 +01:00
Dylan K. Taylor
d9544b5d0e
Added soul fire 2022-07-04 22:32:35 +01:00
Dylan K. Taylor
4909c0f257
Fixed schema loading when the file path contains at least 4 numbers in a row
this spectactularly stupid bug could also have been addressed using a [^\/] in place of the . in the pattern, but I thought it made sense to make it impossible for this to happen again by making sure the regex only sees the file name.

fixes #5129
2022-07-04 22:15:50 +01:00
Dylan K. Taylor
9f0b32e748
Updated creative and crafting data to 1.19 2022-07-04 20:28:07 +01:00
Dylan K. Taylor
e44a291697
Rename ItemTypeIds -> ItemTypeNames for consistency's sake 2022-07-04 15:46:24 +01:00
Dylan K. Taylor
d9c61f0492
Publish script used to generate ItemTypeIds 2022-07-04 15:43:13 +01:00
Dylan K. Taylor
17abd50f69
Publish script used to generate BlockTypeNames, BlockStateNames and BlockStateStringValues 2022-07-04 14:56:50 +01:00
Dylan K. Taylor
ce59228688
BlockLegacyMetadata: remove unused constants 2022-07-03 19:45:13 +01:00
Dylan K. Taylor
dd615c775d
Added various blocks made from mangrove, crimson and warped wood 2022-07-03 19:01:34 +01:00
Dylan K. Taylor
6176f0d9df
Regenerate ItemTypeIds 2022-07-03 18:43:29 +01:00
Dylan K. Taylor
33eef99d1f
Added axis support for all-sided logs 2022-07-03 17:27:25 +01:00
Dylan K. Taylor
e302e5a85f
Implemented chiseled deepslate, chiseled nether brick and cracked nether brick 2022-07-03 03:04:06 +01:00
Dylan K. Taylor
4acf7aadbd
Added quartz bricks 2022-07-03 02:11:50 +01:00
Dylan K. Taylor
a3016abf53
Added polished deepslate block/slab/stair/wall 2022-07-03 02:00:43 +01:00
Dylan K. Taylor
89632f3514
Added deepslate, cobbled/tiles/bricks walls/slabs/stairs/cubes 2022-07-03 01:43:27 +01:00
Dylan K. Taylor
db9c7de35c
Remove obsolete shim items for Bed and Skull
now that the colour and skull type are included in the block type data, it's no longer necessary to maintain shim items to retain this information in the item data.
2022-07-03 00:47:42 +01:00
Dylan K. Taylor
3f937605ac
Added calcite 2022-07-02 23:54:51 +01:00
Dylan K. Taylor
b818ed0d08
Regenerated TODO list 2022-07-02 23:17:46 +01:00
Dylan K. Taylor
0e0b858b69
Added raw copper, gold and iron blocks 2022-07-02 23:17:10 +01:00
Dylan K. Taylor
2a0fade893
Implemented Light blocks 2022-07-02 22:39:11 +01:00
Dylan K. Taylor
c4fc352db1
Remove empty line 2022-07-02 21:54:36 +01:00
Dylan K. Taylor
172214386a
Added a batch of simple blocks from 1.16 and 1.17 2022-07-02 21:53:59 +01:00
Dylan K. Taylor
7750f9581a
BlockObjectToBlockStateSerializer: make adding stateless blocks less annoying 2022-07-02 21:03:25 +01:00
Dylan K. Taylor
451971b866
BlockObjectToBlockStateSerializer: make stairs less annoying to implement 2022-07-02 20:57:18 +01:00
Dylan K. Taylor
d49597fe5f
BlockStateToBlockObjectDeserializer: make stairs less annoying to implement 2022-07-02 20:51:31 +01:00
Dylan K. Taylor
ff90c83d66
Implemented log stripping via axe right-click 2022-07-02 19:16:15 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
9740891a2f
Move BlockLegacyMetadata to pocketmine\data package 2022-07-02 17:01:10 +01:00
Dylan K. Taylor
b5914f4587
phpstorm ... 2022-07-02 16:58:28 +01:00
Dylan K. Taylor
3792ef5a50
Move blockstate data runtime serialization to a more appropriate package 2022-07-02 16:48:41 +01:00
Dylan K. Taylor
2cb722b674
Fixed durability handling (ish) 2022-06-29 15:17:16 +01:00
Dylan K. Taylor
56428e8a4e
Make more item stuff dynamic 2022-06-29 00:26:16 +01:00
Dylan K. Taylor
6058032807
Make potion types dynamic
It became obvious this was needed when I wanted to make new IDs for existing items - there's no way I'm unrolling those registrations...
2022-06-28 23:33:25 +01:00
Dylan K. Taylor
541a624d48
ItemFactory::get() now consistently throws SavedDataLoadingException on any error, including unknown items 2022-06-27 17:14:43 +01:00
Dylan K. Taylor
55cb68e5b5
Burn meta wildcards from Item, allow more dynamic recipe inputs
this was an obstacle for getting rid of legacy item IDs.
2022-06-27 13:33:26 +01:00
Dylan K. Taylor
bc5a600d59
Added item stack serialize/deserialize methods 2022-06-26 17:02:55 +01:00
Dylan K. Taylor
27d7672273
Item frames can now be placed on the up or down faces of blocks 2022-06-25 16:10:39 +01:00
Dylan K. Taylor
1da4c45979
Add runtime support for wall connections
this doesn't match the 1.16+ behaviour yet, but it at least recognizes walls that are already in the post-1.16 way and doesn't break them if not interacted with.
2022-06-25 15:59:38 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
be2fe160b3
Throw a more specific exception on unknown block IDs 2022-06-24 22:52:48 +01:00