remove a bunch of linux ifdefs

This commit is contained in:
Tropical 2026-04-09 22:57:31 -05:00
parent 9e74005af7
commit c4bbf6cf1f
6 changed files with 1 additions and 37 deletions

View file

@ -59,9 +59,6 @@
class AttributeInstance;
class MobEffectInstance;
#ifndef __linux__
#include <qnet.h>
#endif // __linux__
TrackedEntity::TrackedEntity(std::shared_ptr<Entity> e, int range,
int updateInterval, bool trackDelta) {

View file

@ -45,29 +45,17 @@ void ChunkStorageProfilerDecorator::tick() {
if (counter > 500) {
if (loadCount > 0) {
#if !defined(_CONTENT_PACKAGE)
#if defined(__linux__)
sprintf(buf, "Average load time: %f (%lld)",
0.000001 * (double)timeSpentLoading / (double)loadCount,
(long long)loadCount);
#else
sprintf(buf, "Average load time: %f (%I64d)",
0.000001 * (double)timeSpentLoading / (double)loadCount,
loadCount);
#endif
Log::info("%s", buf);
#endif
}
if (saveCount > 0) {
#if !defined(_CONTENT_PACKAGE)
#if defined(__linux__)
sprintf(buf, "Average save time: %f (%lld)",
0.000001 * (double)timeSpentSaving / (double)loadCount,
(long long)loadCount);
#else
sprintf(buf, "Average save time: %f (%I64d)",
0.000001 * (double)timeSpentSaving / (double)loadCount,
loadCount);
#endif
Log::info("%s", buf);
#endif
}

View file

@ -10,8 +10,6 @@
#include "minecraft/world/level/biome/Biome.h"
#include "minecraft/world/level/chunk/ChunkSource.h"
#include "platform/fs/fs.h"
#if defined(__linux__)
#endif
#include "java/Random.h"
#include "minecraft/world/entity/MobCategory.h"
#include "minecraft/world/level/Level.h"

View file

@ -6,8 +6,6 @@
#include "minecraft/util/Log.h"
#include "minecraft/world/level/newbiome/layer/Layer.h"
#include "platform/fs/fs.h"
#if defined(__linux__)
#endif
#include "minecraft/world/level/biome/Biome.h"
BiomeOverrideLayer::BiomeOverrideLayer(int seedMixup) : Layer(seedMixup) {

View file

@ -280,17 +280,8 @@ LevelData* DirectoryLevelStorage::prepareLevel() {
Log::info("Loading %d mappings\n", count);
for (unsigned int i = 0; i < count; ++i) {
PlayerUID playerUid = dis.readPlayerUID();
#if defined(_WINDOWS64) || defined(__linux__)
Log::info(" -- %llu\n",
static_cast<unsigned long long>(playerUid));
#else
#if defined(__linux__)
Log::info(" -- %llu\n",
static_cast<unsigned long long>(playerUid));
#else
Log::info(" -- %s\n", playerUid.toWString().c_str());
#endif
#endif
m_playerMappings[playerUid].readMappings(&dis);
}
dis.readFully(m_usedMappings);
@ -641,16 +632,8 @@ void DirectoryLevelStorage::saveMapIdLookup() {
Log::info("Saving %zu mappings\n", m_playerMappings.size());
for (auto it = m_playerMappings.begin(); it != m_playerMappings.end();
++it) {
#if defined(_WINDOWS64) || defined(__linux__)
Log::info(" -- %llu\n",
static_cast<unsigned long long>(it->first));
#else
#if defined(__linux__)
Log::info(" -- %d\n", it->first);
#else
Log::info(" -- %s\n", it->first.toWString().c_str());
#endif
#endif
dos.writePlayerUID(it->first);
it->second.writeMappings(&dos);
}

View file

@ -2737,7 +2737,7 @@ int Tile::SoundType::getPlaceSound() const { return iPlaceSound; }
4J: These are necessary on the PS3.
(and 4 and Vita).
*/
#if (0 || 0 || 0 || defined __linux__)
#if 1
const int Tile::stone_Id;
const int Tile::grass_Id;
const int Tile::dirt_Id;