Added Rabbits
This commit is contained in:
@@ -1442,6 +1442,10 @@ void cWSSAnvil::LoadEntityFromNBT(cEntityList & a_Entities, const cParsedNBT & a
|
||||
{
|
||||
LoadPigFromNBT(a_Entities, a_NBT, a_EntityTagIdx);
|
||||
}
|
||||
else if (strncmp(a_IDTag, "Rabbit", a_IDTagLength) == 0)
|
||||
{
|
||||
LoadRabbitFromNBT(a_Entities, a_NBT, a_EntityTagIdx);
|
||||
}
|
||||
else if (strncmp(a_IDTag, "Sheep", a_IDTagLength) == 0)
|
||||
{
|
||||
LoadSheepFromNBT(a_Entities, a_NBT, a_EntityTagIdx);
|
||||
@@ -2363,6 +2367,26 @@ void cWSSAnvil::LoadPigFromNBT(cEntityList & a_Entities, const cParsedNBT & a_NB
|
||||
|
||||
|
||||
|
||||
void cWSSAnvil::LoadRabbitFromNBT(cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx)
|
||||
{
|
||||
std::unique_ptr<cRabbit> Monster(new cRabbit());
|
||||
if (!LoadEntityBaseFromNBT(*Monster.get(), a_NBT, a_TagIdx))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!LoadMonsterBaseFromNBT(*Monster.get(), a_NBT, a_TagIdx))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
a_Entities.push_back(Monster.release());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cWSSAnvil::LoadSheepFromNBT(cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx)
|
||||
{
|
||||
int ColorIdx = a_NBT.FindChildByName(a_TagIdx, "Color");
|
||||
|
||||
Reference in New Issue
Block a user