this switches from a 'can be supported by' concept to a 'can stay at this position' paradigm, which requires way less boilerplate code.
there may be further improvements we can make from here, such as adding traits, but this is a good first step.
fixes#5858
technically speaking, the sideways states for non-fully-grown stems shouldn't exist, but they do in Bedrock, and changing this code to split non-fully-grown stems from fully grown ones would likely require BC breaks.
This was the minimum necessary to achieve the desired functionality.
this information will allow us to correct for any bugs introduced by past versions.
however, we still need to propagate this information to permit actually using it when loading data.
to be consistent, these shouldn't be exposed in the API like this...
I'm not very happy with the whole 'type ID map' paradigm (particularly its lack of static analysis guarantees), but the most important thing right now is to get this stuff out of the API so that plugin devs don't try and abuse it. We're not going to change the whole system days before PM5 release.
since most blocks have no state data, their lower 8 bits of state data were all zero.
This makes state IDs a bit more distributed for minimal cost.
I considered flipping these around and using type ID in the lower bits directly, but this worsened distribution for walls.
In the worst case, largest number of collisions drops from 11 to 5 with this change, and the number of states with unique hash keys increased from 3518 to 4461 (out of 7638). This is still a long way from perfect, but it's a decent improvement, improving the overall load factor from 1.6 to 1.3.
related to #5604
right now, I don't see an obvious reason to do this. If it turns out I was wrong later on, we can add functionality back, but we can't remove functionality after release.
For blocks, we now use 'block-item state' and 'block-only state', which should be much clearer for people implementing custom stuff.
'block-item state', as the name suggests, sticks to the item when the block is acquired as an item.
'block-only state' applies only to the block and is discarded when the block is acquired as an item.
'type data' for items was also renamed, since 'type' is too ambiguous to be anything but super confusing.
I don't plan to make wood-like blocks have a dynamic wood/leaves/sapling type, as it's entirely possible their type properties will continue to diverge in future versions.
TreeType includes a bunch of stuff that don't have regular saplings associated with them, such as mangrove and azalea trees.
Mangrove has a dedicated propagule block with different behaviour than the others, and azalea trees are grown from azalea blocks, which are solid and have different behaviour to saplings.
We may also want to account for crimson and warped 'trees' in TreeType too, although I'm not sure if those belong there or not.