implement la's TU22 patch file

This commit is contained in:
piebot
2026-03-13 00:56:59 +03:00
parent f255035afd
commit beec56d3be
22 changed files with 87 additions and 26 deletions
+7 -1
View File
@@ -221,6 +221,12 @@ void Animal::readAdditionalSaveData(CompoundTag *tag)
setDespawnProtected();
}
void Animal::dropLeash(bool synch, bool createItemDrop)
{
setDespawnProtected();
Mob::dropLeash(synch, createItemDrop);
}
shared_ptr<Entity> Animal::findAttackTarget()
{
if (fleeTime > 0) return nullptr;
@@ -301,7 +307,7 @@ int Animal::getAmbientSoundInterval()
bool Animal::removeWhenFarAway()
{
return !isDespawnProtected(); // 4J changed - was false
return !hasCustomName() && !isLeashed() && !isDespawnProtected();
}
int Animal::getExperienceReward(shared_ptr<Player> killedBy)