chunky icon indicating copy to clipboard operation
chunky copied to clipboard

Separate Lectern and Book to match enchantment tables and its book

Open NotStirred opened this issue 2 years ago • 2 comments

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 and fromJson 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

NotStirred avatar Jul 20 '22 16:07 NotStirred

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?

leMaik avatar Jul 24 '22 22:07 leMaik

Yeah that was my thinking, if you'd like me to implement it differently let me know

NotStirred avatar Jul 26 '22 00:07 NotStirred