PocketMine-MP
PocketMine-MP copied to clipboard
Added Type NBT data for illager banners
Introduction
Banners can now be set and used as the illager type.
Relevant issues
Fixes #2951
Changes
API changes
6 new functions:
item\Banner::isIllagerPattern()
item\Banner::setIllagerPattern(bool)
tile\Banner::isIllagerPattern()
tile\Banner::setIllagerPattern(bool)
block\BaseBanner::isIllagerPattern()
block\BaseBanner::setIllagerPattern(bool)
Behavioral changes
N/A
Backwards compatibility
N/A
Follow-up
WIP
Tests
Pending Tests
I’d like to fix the banners which are stored in the creative inventory next. What’s the best place for the server recognize the difference in nbt sent from the client?
These APIs should also be provided in block\BaseBanner.
It would be nice if you would test what happens when an illager banner receives extra patterns. I don't think there's a way to do that in vanilla.
When the illager banner type is set, any pattern layers turn into this:

Since this creates conditionally useless APIs (and is also 2 years obsolete), I'm going to close this. The new serializer system in PM5 should facilitate dealing with illager banners in a better way.