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

@@ -89,7 +89,7 @@ charArray MapItemSavedData::HoldingPlayer::nextUpdatePacket(
data[i * DEC_PACKET_BYTES + 7] |= md->visible ? 0x80 : 0x0;
}
unsigned int dataIndex = playerDecorationsSize;
for (AUTO_VAR(it, parent->nonPlayerDecorations.begin());
for (auto it = parent->nonPlayerDecorations.begin();
it != parent->nonPlayerDecorations.end(); ++it) {
MapDecoration* md = it->second;
#if defined(_LARGE_WORLDS)
@@ -238,7 +238,7 @@ void MapItemSavedData::tickCarriedBy(std::shared_ptr<Player> player,
// 4J Stu - Put this block back in if you want to display entity positions
// on a map (see below)
bool addedPlayers = false;
for (AUTO_VAR(it, carriedBy.begin()); it != carriedBy.end();) {
for (auto it = carriedBy.begin(); it != carriedBy.end();) {
std::shared_ptr<HoldingPlayer> hp = *it;
// 4J Stu - Players in the same dimension as an item frame with a map
@@ -246,8 +246,8 @@ void MapItemSavedData::tickCarriedBy(std::shared_ptr<Player> player,
if (hp->player->removed) //|| (!hp->player->inventory->contains(item)
//&& !item->isFramed() ))
{
AUTO_VAR(it2, carriedByPlayers.find(
(std::shared_ptr<Player>)hp->player));
auto it2 = carriedByPlayers.find(
(std::shared_ptr<Player>)hp->player);
if (it2 != carriedByPlayers.end()) {
carriedByPlayers.erase(it2);
}
@@ -262,7 +262,7 @@ void MapItemSavedData::tickCarriedBy(std::shared_ptr<Player> player,
bool atLeastOnePlayerInTheEnd = false;
PlayerList* players =
MinecraftServer::getInstance()->getPlayerList();
for (AUTO_VAR(it3, players->players.begin());
for (auto it3 = players->players.begin();
it3 != players->players.end(); ++it3) {
std::shared_ptr<ServerPlayer> serverPlayer = *it3;
if (serverPlayer->dimension == 1) {
@@ -271,8 +271,8 @@ void MapItemSavedData::tickCarriedBy(std::shared_ptr<Player> player,
}
}
AUTO_VAR(currentPortalDecoration,
nonPlayerDecorations.find(END_PORTAL_DECORATION_KEY));
auto currentPortalDecoration =
nonPlayerDecorations.find(END_PORTAL_DECORATION_KEY);
if (currentPortalDecoration == nonPlayerDecorations.end() &&
atLeastOnePlayerInTheEnd) {
float origX = 0.0f;
@@ -367,7 +367,7 @@ void MapItemSavedData::tickCarriedBy(std::shared_ptr<Player> player,
PlayerList* players =
MinecraftServer::getInstance()->getPlayerList();
for (AUTO_VAR(it3, players->players.begin());
for (auto it3 = players->players.begin();
it3 != players->players.end(); ++it3) {
std::shared_ptr<ServerPlayer> decorationPlayer = *it3;
if (decorationPlayer != nullptr &&
@@ -465,7 +465,7 @@ void MapItemSavedData::tickCarriedBy(std::shared_ptr<Player> player,
charArray MapItemSavedData::getUpdatePacket(
std::shared_ptr<ItemInstance> itemInstance, Level* level,
std::shared_ptr<Player> player) {
AUTO_VAR(it, carriedByPlayers.find(player));
auto it = carriedByPlayers.find(player);
if (it == carriedByPlayers.end()) return charArray();
std::shared_ptr<HoldingPlayer> hp = it->second;
@@ -475,8 +475,8 @@ charArray MapItemSavedData::getUpdatePacket(
void MapItemSavedData::setDirty(int x, int y0, int y1) {
SavedData::setDirty();
AUTO_VAR(itEnd, carriedBy.end());
for (AUTO_VAR(it, carriedBy.begin()); it != itEnd; it++) {
auto itEnd = carriedBy.end();
for (auto it = carriedBy.begin(); it != itEnd; it++) {
std::shared_ptr<HoldingPlayer> hp = *it; // carriedBy.at(i);
if (hp->rowsDirtyMin[x] < 0 || hp->rowsDirtyMin[x] > y0)
hp->rowsDirtyMin[x] = y0;
@@ -529,7 +529,7 @@ void MapItemSavedData::handleComplexItemData(charArray& data) {
std::shared_ptr<MapItemSavedData::HoldingPlayer>
MapItemSavedData::getHoldingPlayer(std::shared_ptr<Player> player) {
std::shared_ptr<HoldingPlayer> hp = nullptr;
AUTO_VAR(it, carriedByPlayers.find(player));
auto it = carriedByPlayers.find(player);
if (it == carriedByPlayers.end()) {
hp = std::shared_ptr<HoldingPlayer>(new HoldingPlayer(player, this));
@@ -572,8 +572,8 @@ void MapItemSavedData::mergeInMapData(
void MapItemSavedData::removeItemFrameDecoration(
std::shared_ptr<ItemInstance> item) {
AUTO_VAR(frameDecoration,
nonPlayerDecorations.find(item->getFrame()->entityId));
auto frameDecoration =
nonPlayerDecorations.find(item->getFrame()->entityId);
if (frameDecoration != nonPlayerDecorations.end()) {
delete frameDecoration->second;
nonPlayerDecorations.erase(frameDecoration);