mirror of
https://git.neolegacy.dev/neoStudiosLCE/neoLegacy.git
synced 2026-12-02 22:18:09 +01:00
linux (compat): Add linux to most Win64 guards
This commit is contained in:
1 parent
8cf5675892
commit
9626065598
180 files changed
+941
-935
No files matched your search
@@ -40,7 +40,7 @@
|
||||
#include "../Minecraft.World/ProgressListener.h"
|
||||
#include "PS3/PS3Extras/ShutdownManager.h"
|
||||
#include "PlayerChunkMap.h"
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#include "../Minecraft.Server/FourKitBridge.h"
|
||||
#include "../Minecraft.Server/ServerLogger.h"
|
||||
#endif
|
||||
@@ -199,7 +199,7 @@ ServerLevel::~ServerLevel()
|
||||
|
||||
void ServerLevel::tick()
|
||||
{
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
// ts[N] = wall-clock at substep N. Logged when level total exceeds
|
||||
// LEVEL_SLOW_THRESHOLD_MS to pinpoint the dominant substep.
|
||||
const int64_t LEVEL_SLOW_THRESHOLD_MS = 50;
|
||||
@@ -231,7 +231,7 @@ void ServerLevel::tick()
|
||||
}
|
||||
awakenAllPlayers();
|
||||
}
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
ts[1] = System::currentTimeMillis();
|
||||
#endif
|
||||
|
||||
@@ -249,7 +249,7 @@ void ServerLevel::tick()
|
||||
mobSpawner->tick(this, finalSpawnEnemies, finalSpawnFriendlies, finalSpawnPersistent);
|
||||
}
|
||||
PIXEndNamedEvent();
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
ts[2] = System::currentTimeMillis();
|
||||
#endif
|
||||
PIXBeginNamedEvent(0,"Chunk source tick");
|
||||
@@ -267,7 +267,7 @@ void ServerLevel::tick()
|
||||
}
|
||||
}
|
||||
}
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
ts[3] = System::currentTimeMillis();
|
||||
#endif
|
||||
|
||||
@@ -283,12 +283,12 @@ void ServerLevel::tick()
|
||||
{
|
||||
PIXBeginNamedEvent(0,"Incremental save");
|
||||
// @3makJoud
|
||||
// commenting this line of code, as it were commited by the Smartcmd or shall i say Dumpcmd,
|
||||
// commenting this line of code, as it were commited by the Smartcmd or shall i say Dumpcmd,
|
||||
// as it saves entities every single tick which kills performance on low end devices
|
||||
//save(false, nullptr);
|
||||
PIXEndNamedEvent();
|
||||
}
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
ts[4] = System::currentTimeMillis();
|
||||
#endif
|
||||
|
||||
@@ -306,7 +306,7 @@ void ServerLevel::tick()
|
||||
setDayTime(levelData->getDayTime() + 1);
|
||||
}
|
||||
}
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
ts[5] = System::currentTimeMillis();
|
||||
#endif
|
||||
|
||||
@@ -314,7 +314,7 @@ void ServerLevel::tick()
|
||||
// if (tickCount % 5 == 0) {
|
||||
tickPendingTicks(false);
|
||||
PIXEndNamedEvent();
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
ts[6] = System::currentTimeMillis();
|
||||
#endif
|
||||
|
||||
@@ -323,12 +323,12 @@ void ServerLevel::tick()
|
||||
tickTiles();
|
||||
MemSect(0);
|
||||
PIXEndNamedEvent();
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
ts[7] = System::currentTimeMillis();
|
||||
#endif
|
||||
|
||||
chunkMap->tick();
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
ts[8] = System::currentTimeMillis();
|
||||
#endif
|
||||
|
||||
@@ -338,14 +338,14 @@ void ServerLevel::tick()
|
||||
villageSiege->tick();
|
||||
//MemSect(0);
|
||||
PIXEndNamedEvent();
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
ts[9] = System::currentTimeMillis();
|
||||
#endif
|
||||
|
||||
PIXBeginNamedEvent(0,"Tick portal forcer");
|
||||
portalForcer->tick(getGameTime());
|
||||
PIXEndNamedEvent();
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
ts[10] = System::currentTimeMillis();
|
||||
#endif
|
||||
|
||||
@@ -353,13 +353,13 @@ void ServerLevel::tick()
|
||||
PIXBeginNamedEvent(0,"runTileEvents");
|
||||
runTileEvents();
|
||||
PIXEndNamedEvent();
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
ts[11] = System::currentTimeMillis();
|
||||
#endif
|
||||
|
||||
// 4J Added
|
||||
runQueuedSendTileUpdates();
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
ts[12] = System::currentTimeMillis();
|
||||
int64_t levelTotal = ts[12] - ts[0];
|
||||
if (levelTotal > LEVEL_SLOW_THRESHOLD_MS)
|
||||
@@ -592,14 +592,14 @@ void ServerLevel::tickTiles()
|
||||
int yy = getTopRainBlock(x + xo, z + zo);
|
||||
if (shouldFreeze(x + xo, yy - 1, z + zo))
|
||||
{
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
if (!FourKitBridge::FireBlockForm(dimension->id, x + xo, yy - 1, z + zo, Tile::ice_Id, 0))
|
||||
#endif
|
||||
setTileAndUpdate(x + xo, yy - 1, z + zo, Tile::ice_Id);
|
||||
}
|
||||
if (isRaining() && getGameRules()->getBoolean(GameRules::RULE_WEATHER_CYCLE) && shouldSnow(x + xo, yy, z + zo))
|
||||
{
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64 || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
if (!FourKitBridge::FireBlockForm(dimension->id, x + xo, yy, z + zo, Tile::snow_layer_Id, 0))
|
||||
#endif
|
||||
setTileAndUpdate(x + xo, yy, z + zo, Tile::snow_layer_Id);
|
||||
@@ -1739,4 +1739,3 @@ void ServerLevel::sendParticles(const ParticleType* type, double x, double y, do
|
||||
{
|
||||
this->sendParticles(type, false, x, y, z, count, dx, dy, dz, speed, data);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user