feat: tu43 entity sounds, spawner fixes, and a 16x16 region toolset

This commit is contained in:
Fireblade
2026-07-23 19:47:55 -04:00
parent 1488469cb2
commit a045d994fb
135 changed files with 416 additions and 20 deletions
+8
View File
@@ -34,6 +34,7 @@ bool LeashItem::bindPlayerMobs(shared_ptr<Player> player, Level *level, int x, i
// look for entities that can be attached to the fence
bool foundMobs = false;
bool knotCreated = false;
double range = 7;
vector<shared_ptr<Entity> > *mobs = level->getEntitiesOfClass(typeid(Mob), AABB::newTemp(x - range, y - range, z - range, x + range, y + range, z + range));
if (mobs != nullptr)
@@ -46,12 +47,19 @@ bool LeashItem::bindPlayerMobs(shared_ptr<Player> player, Level *level, int x, i
if (activeKnot == nullptr)
{
activeKnot = LeashFenceKnotEntity::createAndAddKnot(level, x, y, z);
knotCreated = true;
}
mob->setLeashedTo(activeKnot, true);
foundMobs = true;
}
}
}
if (foundMobs && knotCreated)
{
activeKnot->playSound(eSoundType_ENTITY_LEASHKNOT_PLACE, 1.0f, 1.0f);
}
return foundMobs;
}