port: Nether portal sounds, save thumbnail display, worlds without worlds fix (#1523, #1519, #1529)

This commit is contained in:
veroxsity
2026-04-21 16:19:02 +01:00
parent c68b25f205
commit 87d2dfbc55
3 changed files with 41 additions and 7 deletions

View File

@@ -8,6 +8,9 @@
#include "Settings.h"
#include "PlayerList.h"
#include "MultiPlayerLevel.h"
#include "Minecraft.h"
#include "Common/Audio/SoundEngine.h"
#include "../Minecraft.World/SoundTypes.h"
#include "../Minecraft.World/net.minecraft.network.packet.h"
#include "../Minecraft.World/net.minecraft.world.damagesource.h"
@@ -783,6 +786,13 @@ void ServerPlayer::changeDimension(int i)
// 4J: Removed on the advice of the mighty King of Achievments (JV)
// awardStat(GenericStats::portal(), GenericStats::param_portal());
}
// play the travel whoosh right before the actual dimension swap
Minecraft *mc = Minecraft::GetInstance();
if (mc != nullptr && mc->soundEngine != nullptr)
{
mc->soundEngine->playUI(eSoundType_PORTAL_TRAVEL, 1, 1.0f);
}
server->getPlayers()->toggleDimension( dynamic_pointer_cast<ServerPlayer>(shared_from_this()), i);
lastSentExp = -1;
lastSentHealth = -1;