Update Villager.cpp

This commit is contained in:
DeadVoxelx
2026-05-06 14:29:25 -04:00
committed by GitHub
parent 8b55bc4a35
commit 7bb989f9c9

View File

@@ -472,6 +472,7 @@ void Villager::addOffers(int addCount)
addItemForPurchase(newOffers, Tile::glass_Id, random, getRecipeChance(.2f));
addItemForPurchase(newOffers, Item::compass_Id, random, getRecipeChance(.2f));
addItemForPurchase(newOffers, Item::clock_Id, random, getRecipeChance(.2f));
addItemForPurchase(newOffers, Item::nameTag_Id, random, getRecipeChance(.2f));
if (random->nextFloat() < getRecipeChance(0.07f))
{
@@ -775,3 +776,12 @@ wstring Villager::getDisplayName()
};
return app.GetString(name);
}
void Villager::thunderHit(const LightningBolt *lightningBolt)
{
if (level->isClientSide) return;
shared_ptr<Witch> pz = std::make_shared<Witch>(level);
pz->moveTo(x, y, z, yRot, xRot);
level->addEntity(pz);
remove();
}