Merge branch 'upstream-dev' into cleanup/nullptr-replacement

# Conflicts:
#	Minecraft.Client/Network/PlayerChunkMap.cpp
#	Minecraft.Client/Network/PlayerList.cpp
#	Minecraft.Client/Network/ServerChunkCache.cpp
#	Minecraft.Client/Platform/Common/Consoles_App.cpp
#	Minecraft.Client/Platform/Common/DLC/DLCManager.cpp
#	Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.cpp
#	Minecraft.Client/Platform/Common/GameRules/LevelRuleset.cpp
#	Minecraft.Client/Platform/Common/Tutorial/Tutorial.cpp
#	Minecraft.Client/Platform/Common/Tutorial/TutorialTask.cpp
#	Minecraft.Client/Platform/Common/UI/IUIScene_CreativeMenu.cpp
#	Minecraft.Client/Platform/Common/UI/UIComponent_Panorama.cpp
#	Minecraft.Client/Platform/Common/UI/UIController.cpp
#	Minecraft.Client/Platform/Common/UI/UIController.h
#	Minecraft.Client/Platform/Extrax64Stubs.cpp
#	Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Input.h
#	Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Storage.h
#	Minecraft.Client/Player/EntityTracker.cpp
#	Minecraft.Client/Player/ServerPlayer.cpp
#	Minecraft.Client/Rendering/EntityRenderers/PlayerRenderer.cpp
#	Minecraft.Client/Textures/Packs/DLCTexturePack.cpp
#	Minecraft.Client/Textures/Stitching/StitchedTexture.cpp
#	Minecraft.Client/Textures/Stitching/TextureMap.cpp
#	Minecraft.Client/Textures/Textures.cpp
#	Minecraft.World/Blocks/NotGateTile.cpp
#	Minecraft.World/Blocks/PressurePlateTile.cpp
#	Minecraft.World/Blocks/TileEntities/PotionBrewing.cpp
#	Minecraft.World/Enchantments/EnchantmentHelper.cpp
#	Minecraft.World/Entities/HangingEntity.cpp
#	Minecraft.World/Entities/LeashFenceKnotEntity.cpp
#	Minecraft.World/Entities/LivingEntity.cpp
#	Minecraft.World/Entities/Mobs/Boat.cpp
#	Minecraft.World/Entities/Mobs/Minecart.cpp
#	Minecraft.World/Entities/Mobs/Witch.cpp
#	Minecraft.World/Entities/SyncedEntityData.cpp
#	Minecraft.World/Items/LeashItem.cpp
#	Minecraft.World/Items/PotionItem.cpp
#	Minecraft.World/Level/BaseMobSpawner.cpp
#	Minecraft.World/Level/CustomLevelSource.cpp
#	Minecraft.World/Level/Level.cpp
#	Minecraft.World/Level/Storage/DirectoryLevelStorage.cpp
#	Minecraft.World/Level/Storage/McRegionLevelStorage.cpp
#	Minecraft.World/Level/Storage/RegionFileCache.cpp
#	Minecraft.World/Player/Player.cpp
#	Minecraft.World/WorldGen/Biomes/BiomeCache.cpp
#	Minecraft.World/WorldGen/Features/RandomScatteredLargeFeature.cpp
#	Minecraft.World/WorldGen/Layers/BiomeOverrideLayer.cpp
This commit is contained in:
MatthewBeshay
2026-03-30 16:28:40 +11:00
265 changed files with 1408 additions and 1426 deletions

View File

@@ -125,7 +125,7 @@ TexturePackRepository::getTexturePackIdNames() {
std::vector<std::pair<std::uint32_t, std::wstring> >* packList =
new std::vector<std::pair<std::uint32_t, std::wstring> >();
for (AUTO_VAR(it, texturePacks->begin()); it != texturePacks->end(); ++it) {
for (auto it = texturePacks->begin(); it != texturePacks->end(); ++it) {
TexturePack* pack = *it;
packList->push_back(std::pair<std::uint32_t, std::wstring>(
pack->getId(), pack->getName()));
@@ -142,7 +142,7 @@ bool TexturePackRepository::selectTexturePackById(std::uint32_t id) {
// pack is installed
app.SetRequiredTexturePackID(id);
AUTO_VAR(it, cacheById.find(id));
auto it = cacheById.find(id);
if (it != cacheById.end()) {
TexturePack* newPack = it->second;
if (newPack != selected) {
@@ -177,7 +177,7 @@ bool TexturePackRepository::selectTexturePackById(std::uint32_t id) {
}
TexturePack* TexturePackRepository::getTexturePackById(std::uint32_t id) {
AUTO_VAR(it, cacheById.find(id));
auto it = cacheById.find(id);
if (it != cacheById.end()) {
return it->second;
}
@@ -213,19 +213,19 @@ TexturePack* TexturePackRepository::addTexturePackFromDLC(DLCPack* dlcPack,
}
void TexturePackRepository::clearInvalidTexturePacks() {
for (AUTO_VAR(it, m_texturePacksToDelete.begin());
for (auto it = m_texturePacksToDelete.begin();
it != m_texturePacksToDelete.end(); ++it) {
delete *it;
}
}
void TexturePackRepository::removeTexturePackById(std::uint32_t id) {
AUTO_VAR(it, cacheById.find(id));
auto it = cacheById.find(id);
if (it != cacheById.end()) {
TexturePack* oldPack = it->second;
AUTO_VAR(it2,
find(texturePacks->begin(), texturePacks->end(), oldPack));
auto it2 =
find(texturePacks->begin(), texturePacks->end(), oldPack);
if (it2 != texturePacks->end()) {
texturePacks->erase(it2);
if (lastSelected == oldPack) {
@@ -264,7 +264,7 @@ TexturePack* TexturePackRepository::getTexturePackByIndex(unsigned int index) {
unsigned int TexturePackRepository::getTexturePackIndex(std::uint32_t id) {
int currentIndex = 0;
for (AUTO_VAR(it, texturePacks->begin()); it != texturePacks->end(); ++it) {
for (auto it = texturePacks->begin(); it != texturePacks->end(); ++it) {
TexturePack* pack = *it;
if (pack->getId() == id) break;
++currentIndex;