summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-07-28 23:02:05 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2021-07-31 13:11:29 +0200
commitde329dc5adb8fe5aa8ee22dd753a6adb70eb220c (patch)
tree4f02cb64d4db66955c902e94af6f7644367bd56a /src/WorldStorage
parentPaintings: add sound effects, remove critical hitting (#5276) (diff)
downloadcuberite-de329dc5adb8fe5aa8ee22dd753a6adb70eb220c.tar
cuberite-de329dc5adb8fe5aa8ee22dd753a6adb70eb220c.tar.gz
cuberite-de329dc5adb8fe5aa8ee22dd753a6adb70eb220c.tar.bz2
cuberite-de329dc5adb8fe5aa8ee22dd753a6adb70eb220c.tar.lz
cuberite-de329dc5adb8fe5aa8ee22dd753a6adb70eb220c.tar.xz
cuberite-de329dc5adb8fe5aa8ee22dd753a6adb70eb220c.tar.zst
cuberite-de329dc5adb8fe5aa8ee22dd753a6adb70eb220c.zip
Diffstat (limited to '')
-rw-r--r--src/WorldStorage/StatisticsSerializer.cpp106
1 files changed, 0 insertions, 106 deletions
diff --git a/src/WorldStorage/StatisticsSerializer.cpp b/src/WorldStorage/StatisticsSerializer.cpp
index 34621d81c..70abd711b 100644
--- a/src/WorldStorage/StatisticsSerializer.cpp
+++ b/src/WorldStorage/StatisticsSerializer.cpp
@@ -52,111 +52,6 @@ namespace StatisticsSerializer
- static void LoadLegacyFromJSON(StatisticsManager & Manager, const Json::Value & In)
- {
- // Upgrade mapping from pre-1.13 names. TODO: remove on 2020-09-18
- static const std::unordered_map<std::string_view, CustomStatistic> LegacyMapping
- {
- { "achievement.openInventory", CustomStatistic::AchOpenInventory },
- { "achievement.mineWood", CustomStatistic::AchMineWood },
- { "achievement.buildWorkBench", CustomStatistic::AchBuildWorkBench },
- { "achievement.buildPickaxe", CustomStatistic::AchBuildPickaxe },
- { "achievement.buildFurnace", CustomStatistic::AchBuildFurnace },
- { "achievement.acquireIron", CustomStatistic::AchAcquireIron },
- { "achievement.buildHoe", CustomStatistic::AchBuildHoe },
- { "achievement.makeBread", CustomStatistic::AchMakeBread },
- { "achievement.bakeCake", CustomStatistic::AchBakeCake },
- { "achievement.buildBetterPickaxe", CustomStatistic::AchBuildBetterPickaxe },
- { "achievement.cookFish", CustomStatistic::AchCookFish },
- { "achievement.onARail", CustomStatistic::AchOnARail },
- { "achievement.buildSword", CustomStatistic::AchBuildSword },
- { "achievement.killEnemy", CustomStatistic::AchKillEnemy },
- { "achievement.killCow", CustomStatistic::AchKillCow },
- { "achievement.flyPig", CustomStatistic::AchFlyPig },
- { "achievement.snipeSkeleton", CustomStatistic::AchSnipeSkeleton },
- { "achievement.diamonds", CustomStatistic::AchDiamonds },
- { "achievement.portal", CustomStatistic::AchPortal },
- { "achievement.ghast", CustomStatistic::AchGhast },
- { "achievement.blazeRod", CustomStatistic::AchBlazeRod },
- { "achievement.potion", CustomStatistic::AchPotion },
- { "achievement.theEnd", CustomStatistic::AchTheEnd },
- { "achievement.theEnd2", CustomStatistic::AchTheEnd2 },
- { "achievement.enchantments", CustomStatistic::AchEnchantments },
- { "achievement.overkill", CustomStatistic::AchOverkill },
- { "achievement.bookcase", CustomStatistic::AchBookcase },
- { "achievement.exploreAllBiomes", CustomStatistic::AchExploreAllBiomes },
- { "achievement.spawnWither", CustomStatistic::AchSpawnWither },
- { "achievement.killWither", CustomStatistic::AchKillWither },
- { "achievement.fullBeacon", CustomStatistic::AchFullBeacon },
- { "achievement.breedCow", CustomStatistic::AchBreedCow },
- { "achievement.diamondsToYou", CustomStatistic::AchDiamondsToYou },
- { "stat.animalsBred", CustomStatistic::AnimalsBred },
- { "stat.boatOneCm", CustomStatistic::BoatOneCm },
- { "stat.climbOneCm", CustomStatistic::ClimbOneCm },
- { "stat.crouchOneCm", CustomStatistic::CrouchOneCm },
- { "stat.damageDealt", CustomStatistic::DamageDealt },
- { "stat.damageTaken", CustomStatistic::DamageTaken },
- { "stat.deaths", CustomStatistic::Deaths },
- { "stat.drop", CustomStatistic::Drop },
- { "stat.fallOneCm", CustomStatistic::FallOneCm },
- { "stat.fishCaught", CustomStatistic::FishCaught },
- { "stat.flyOneCm", CustomStatistic::FlyOneCm },
- { "stat.horseOneCm", CustomStatistic::HorseOneCm },
- { "stat.jump", CustomStatistic::Jump },
- { "stat.leaveGame", CustomStatistic::LeaveGame },
- { "stat.minecartOneCm", CustomStatistic::MinecartOneCm },
- { "stat.mobKills", CustomStatistic::MobKills },
- { "stat.pigOneCm", CustomStatistic::PigOneCm },
- { "stat.playerKills", CustomStatistic::PlayerKills },
- { "stat.playOneMinute", CustomStatistic::PlayOneMinute },
- { "stat.sprintOneCm", CustomStatistic::SprintOneCm },
- { "stat.swimOneCm", CustomStatistic::SwimOneCm },
- { "stat.talkedToVillager", CustomStatistic::TalkedToVillager },
- { "stat.timeSinceDeath", CustomStatistic::TimeSinceDeath },
- { "stat.tradedWithVillager", CustomStatistic::TradedWithVillager },
- { "stat.walkOneCm", CustomStatistic::WalkOneCm },
- { "stat.diveOneCm", CustomStatistic::WalkUnderWaterOneCm },
- { "stat.armorCleaned", CustomStatistic::CleanArmor },
- { "stat.bannerCleaned", CustomStatistic::CleanBanner },
- { "stat.cakeSlicesEaten", CustomStatistic::EatCakeSlice },
- { "stat.itemEnchanted", CustomStatistic::EnchantItem },
- { "stat.cauldronFilled", CustomStatistic::FillCauldron },
- { "stat.dispenserInspected", CustomStatistic::InspectDispenser },
- { "stat.dropperInspected", CustomStatistic::InspectDropper },
- { "stat.hopperInspected", CustomStatistic::InspectHopper },
- { "stat.beaconInteraction", CustomStatistic::InteractWithBeacon },
- { "stat.brewingstandInteraction", CustomStatistic::InteractWithBrewingstand },
- { "stat.craftingTableInteraction", CustomStatistic::InteractWithCraftingTable },
- { "stat.furnaceInteraction", CustomStatistic::InteractWithFurnace },
- { "stat.chestOpened", CustomStatistic::OpenChest },
- { "stat.enderchestOpened", CustomStatistic::OpenEnderchest },
- { "stat.noteblockPlayed", CustomStatistic::PlayNoteblock },
- { "stat.recordPlayed", CustomStatistic::PlayRecord },
- { "stat.flowerPotted", CustomStatistic::PotFlower },
- { "stat.trappedChestTriggered", CustomStatistic::TriggerTrappedChest },
- { "stat.noteblockTuned", CustomStatistic::TuneNoteblock },
- { "stat.cauldronUsed", CustomStatistic::UseCauldron },
- { "stat.aviateOneCm", CustomStatistic::AviateOneCm },
- { "stat.sleepInBed", CustomStatistic::SleepInBed },
- { "stat.sneakTime", CustomStatistic::SneakTime }
- };
-
- for (auto Entry = In.begin(); Entry != In.end(); ++Entry)
- {
- const auto & Key = Entry.key().asString();
- const auto FindResult = LegacyMapping.find(Key);
-
- if ((FindResult != LegacyMapping.end()) && Entry->isInt())
- {
- Manager.Custom[FindResult->second] = Entry->asUInt();
- }
- }
- }
-
-
-
-
-
static void LoadCustomStatFromJSON(StatisticsManager & Manager, const Json::Value & a_In)
{
for (auto it = a_In.begin(); it != a_In.end(); ++it)
@@ -194,7 +89,6 @@ namespace StatisticsSerializer
Json::Value Root;
InputFileStream(MakeStatisticsDirectory(WorldPath, std::move(FileName))) >> Root;
- LoadLegacyFromJSON(Manager, Root);
LoadCustomStatFromJSON(Manager, Root["stats"]["custom"]);
}