Generate methods for surrogate enums, nip stupidity in the bud

this also allows changing the internal implementation later without breaking plugins.
This commit is contained in:
Dylan K. Taylor
2019-02-20 11:09:22 +00:00
parent 88c4b836f0
commit 36e9db4c07
17 changed files with 135 additions and 43 deletions

View File

@ -225,7 +225,7 @@ class Banner extends Item{
public function correctNBT() : void{
$tag = $this->getNamedTag();
if(!$tag->hasTag(self::TAG_BASE, IntTag::class)){
$tag->setInt(self::TAG_BASE, DyeColor::$BLACK->getInvertedMagicNumber());
$tag->setInt(self::TAG_BASE, DyeColor::BLACK()->getInvertedMagicNumber());
}
if(!$tag->hasTag(self::TAG_PATTERNS, ListTag::class)){