Glowkit-Legacy icon indicating copy to clipboard operation
Glowkit-Legacy copied to clipboard

Add flower pot state

Open ghost opened this issue 10 years ago • 0 comments

In this pull request the interface for a flower pot state is added, most importantly.

Modifications Create a new extension of BlockState for flower pots with a getter and setter for the flower pot's contents. This is required for the post-1.7 way of handling flower pots, which is done with tile entities. To indicate this new option as preferable to the old option of handling flower pot contents, I deprecated the old manner. Why exactly is the new option preferable, you ask? Tile entities support all flowers, while the block data way doesn't; and changing the block data of flower pots that use tile entities, could result in unknown behaviour.

Result A present and future proof way to handle flower pot contents.


Edited by turt2live

Related links:

  • Glowstone: GlowstoneMC/Glowstone#477

ghost avatar Oct 23 '14 23:10 ghost