chunky
chunky copied to clipboard
Separate Lectern and Book to match enchantment tables and its book
Previously a lectern redirected all pose information to its child book, which is different to the enchantment table. Likely because both lectern and book are entities
Main changes in this PR:
- blocks and entities can return multiple entities on
toEntity
andfromJson
respectively - lecterns are no longer poseable entities
- lecterns now return both the lectern and its book as entities
As a result, lecterns don't show up in the entities list (as they shouldn't), and lectern books show up in the entities list
Lecterns are entities only because they are bigger than a block, i.e. they would be block entities. But then there's the book, which must be an entity (an actor) so that it can be posed.
Having a block entity and an entity at the same time would help, but I guess returning collections helps make this future-proof?
Yeah that was my thinking, if you'd like me to implement it differently let me know