reimplement aether stuff from personal repo

This commit is contained in:
Bonnie
2026-03-03 11:12:53 -06:00
parent 4d04f408d7
commit afb8090812
129 changed files with 4352 additions and 591 deletions

View File

@@ -538,6 +538,37 @@ void ServerPlayer::doTickB(bool ignorePortal)
isInsidePortal = false;
}
}
else if (isInsideAetherPortal)
{
// Aether portal handling — toggles between Overworld (0) and Aether (2)
if (containerMenu != inventoryMenu)
{
closeContainer();
}
if (riding != NULL)
{
this->ride(riding);
}
else
{
portalTime += 1 / 80.0f;
if (portalTime >= 1)
{
portalTime = 1;
changingDimensionDelay = 10;
int targetDimension = 0;
if (dimension == 2) targetDimension = 0;
else targetDimension = 2;
server->getPlayers()->toggleDimension( dynamic_pointer_cast<ServerPlayer>( shared_from_this() ), targetDimension );
lastSentExp = -1;
lastSentHealth = -1;
lastSentFood = -1;
}
}
isInsideAetherPortal = false;
}
else
{
if (portalTime > 0) portalTime -= 1 / 20.0f;