feat(TU20/21): Implement la's TU21 patch file

This adds the following:

TU20:
1. Librarians now have a small chance to offer name tags for sale
2. Witches can now spawn at light level 7 or less in any biome or cave
3. Skeletons & Wither Skeletons now rarely spawn anywhere in the Nether

TU21:
1. Minecart entity limit increased
This commit is contained in:
2026-07-08 06:51:34 +03:00
parent a2c136a5ad
commit 6c757e5322
20 changed files with 75 additions and 21 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;
@@ -294,7 +300,7 @@ int Animal::getAmbientSoundInterval()
bool Animal::removeWhenFarAway()
{
return !isDespawnProtected(); // 4J changed - was false
return !hasCustomName() && !isLeashed() && !isDespawnProtected();
}
int Animal::getExperienceReward(shared_ptr<Player> killedBy)