Skip to content

Commit

Permalink
Another one.#
Browse files Browse the repository at this point in the history
  • Loading branch information
bearbin committed Oct 27, 2014
1 parent 7de8757 commit b67eb21
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/WorldStorage/NBTChunkSerializer.cpp
Expand Up @@ -604,6 +604,28 @@ void cNBTChunkSerializer::AddMonsterEntity(cMonster * a_Monster)
m_Writer.AddByte("IsConverting", (((const cZombie *)a_Monster)->IsConverting() ? 1 : 0));
break;
}
case mtInvalidType:
case mtBlaze:
case mtCaveSpider:
case mtChicken:
case mtCow:
case mtEnderDragon:
case mtGhast:
case mtGiant:
case mtIronGolem
case mtMooshroom:
case mtOcelot:
case mtPig:
case mtSilverfish:
case mtSnowGolem:
case meSpider:
case mtSquid:
case mtWitch:
case mtZombiePigman:
{
// Other mobs have no special tags.
break;
}
}
m_Writer.EndCompound();
}
Expand Down

2 comments on commit b67eb21

@NiLSPACE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't a simple default: do the trick?

@bearbin
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would. But it's better to show all of the mob types, so a warning is emitted when a new mob type is created, to remind the creator to check here and add the tags if it has tags.

Please sign in to comment.