nuke Minecraft.World stdafx.h

This commit is contained in:
Tropical 2026-03-31 17:58:27 -05:00
parent 70e93e57c3
commit 1ce8413cfa
108 changed files with 318 additions and 291 deletions

View file

@ -48,6 +48,8 @@
#include "Minecraft.Client/Common/Source Files/Localisation/StringTable.h"
#include "Minecraft.Client/Common/Source Files/UI/All Platforms/ArchiveFile.h"
#include "Minecraft.Client/net/minecraft/client/Minecraft.h"
#include "Minecraft.Client/Common/Source Files/Leaderboards/LeaderboardManager.h"
#include "Minecraft.Client/Common/Source Files/Colours/ColourTable.h"
#include "4J_Input.h"
#include "Minecraft.Client/net/minecraft/client/gui/Gui.h"
@ -63,7 +65,6 @@
#include <thread>
#include <chrono>
#include "Minecraft.Client/Common/Source Files/Leaderboards/LeaderboardManager.h"
// CMinecraftApp app;
unsigned int CMinecraftApp::m_uiLastSignInData = 0;

View file

@ -23,6 +23,7 @@
#include "Minecraft.World/net/minecraft/world/entity/Mob.h"
#include "java/Random.h"
#include "Minecraft.Client/net/minecraft/client/Minecraft.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
#if defined(__linux__)
#define STB_VORBIS_HEADER_ONLY

View file

@ -82,18 +82,18 @@ void ApplySchematicRuleDefinition::addAttribute(
}
} else if (attributeName.compare(L"x") == 0) {
m_location.x = _fromString<int>(attributeValue);
if (((int)abs(m_location.x)) % 2 != 0) m_location.x -= 1;
if (((int)std::abs(m_location.x)) % 2 != 0) m_location.x -= 1;
// app.DebugPrintf("ApplySchematicRuleDefinition: Adding parameter
// x=%f\n",m_location->x);
} else if (attributeName.compare(L"y") == 0) {
m_location.y = _fromString<int>(attributeValue);
if (((int)abs(m_location.y)) % 2 != 0) m_location.y -= 1;
if (((int)std::abs(m_location.y)) % 2 != 0) m_location.y -= 1;
if (m_location.y < 0) m_location.y = 0;
// app.DebugPrintf("ApplySchematicRuleDefinition: Adding parameter
// y=%f\n",m_location->y);
} else if (attributeName.compare(L"z") == 0) {
m_location.z = _fromString<int>(attributeValue);
if (((int)abs(m_location.z)) % 2 != 0) m_location.z -= 1;
if (((int)std::abs(m_location.z)) % 2 != 0) m_location.z -= 1;
// app.DebugPrintf("ApplySchematicRuleDefinition: Adding parameter
// z=%f\n",m_location->z);
} else if (attributeName.compare(L"rot") == 0) {

View file

@ -5,9 +5,12 @@
#include <cstdint>
#include "Minecraft.Client/Common/Source Files/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
#include "Minecraft.World/net/minecraft/world/level/levelgen/structure/StructureFeature.h"
#include "Minecraft.Client/Common/Source Files/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
#include "Minecraft.Client/Common/Source Files/Localisation/StringTable.h"
#include "Minecraft.Client/Common/Source Files/DLC/DLCPack.h"
class ApplySchematicRuleDefinition;
class LevelChunk;
class ConsoleGenerateStructure;

View file

@ -10,6 +10,7 @@
#include "Minecraft.Client/Common/Source Files/Tutorial/Hints/AreaHint.h"
#include "FullTutorial.h"
#include "Minecraft.Client/Common/Source Files/Tutorial/Constraints/TutorialConstraints.h"
#include "Minecraft.Client/Common/Potion_Macros.h"
FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
: Tutorial(iPad, true) {

View file

@ -18,6 +18,7 @@
#include "Minecraft.Client/Common/Source Files/Tutorial/Tasks/TutorialTasks.h"
#include "Minecraft.Client/Common/Source Files/Tutorial/Constraints/TutorialConstraints.h"
#include "Minecraft.Client/Common/Source Files/Tutorial/Hints/TutorialHints.h"
#include "Minecraft.World/ConsoleHelpers/StringHelpers.h"
std::vector<int> Tutorial::s_completableTasks;

View file

@ -5,6 +5,7 @@
#include "Minecraft.World/net/minecraft/stats/net.minecraft.stats.h"
#include "Minecraft.Client/net/minecraft/client/player/LocalPlayer.h"
#include "IUIScene_CraftingMenu.h"
#include "Minecraft.Client/Common/Source Files/Console_Debug_enum.h"
Recipy::_eGroupType IUIScene_CraftingMenu::m_GroupTypeMapping4GridA
[IUIScene_CraftingMenu::m_iMaxGroup2x2] = {

View file

@ -10,6 +10,7 @@
#include "Minecraft.World/net/minecraft/world/item/enchantment/net.minecraft.world.item.enchantment.h"
#include "Minecraft.World/net/minecraft/world/entity/net.minecraft.world.entity.h"
#include "Minecraft.World/net/minecraft/world/entity/animal/net.minecraft.world.entity.animal.h"
#include "Minecraft.Client/Common/Potion_Macros.h"
#include "java/JavaMath.h"
// 4J JEV - Images for each tab.

View file

@ -340,7 +340,7 @@ void UIScene_MainMenu::customDrawSplash(IggyCustomDrawCallbackRegion* region) {
glTranslatef(xo, yo, 0);
glRotatef(-17, 0, 0, 1);
float sss = 1.8f - Mth::abs(sinf(System::currentTimeMillis() % 1000 /
float sss = 1.8f - std::abs(sinf(System::currentTimeMillis() % 1000 /
1000.0f * std::numbers::pi * 2) *
0.1f);
sss *= (m_fScreenWidth / m_fRawWidth);

View file

@ -12,6 +12,7 @@
#include "Minecraft.Client/net/minecraft/client/renderer/entity/EnderDragonRenderer.h"
#include "Minecraft.Client/net/minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
#include "Minecraft.Client/net/minecraft/client/title/TitleScreen.h"
#include "Minecraft.World/ConsoleHelpers/PerformanceTimer.h"
#include "UIFontData.h"
#include "4J_Input.h"

View file

@ -83,6 +83,10 @@
#include "Minecraft.Client/net/minecraft/client/multiplayer/MultiPlayerGameMode.h"
#include "Minecraft.Client/Common/Source Files/DLC/DLCPack.h"
#include "Minecraft.Client/Common/Source Files/ConsoleGameMode.h"
#include "Minecraft.World/ConsoleHelpers/StringHelpers.h"
#include "Minecraft.Client/Common/Potion_Macros.h"
#include "Minecraft.Client/Common/Minecraft_Macros.h"
#include "Minecraft.Client/Common/Source Files/Colours/ColourTable.h"
#include "4J_Input.h"
// #define DISABLE_SPU_CODE
@ -3557,9 +3561,9 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) {
// Level::animateTickDoWork() so we can take into account multiple
// players in the one level.
if (!pause && levels[i] != nullptr)
levels[i]->animateTick(Mth::floor(player->x),
Mth::floor(player->y),
Mth::floor(player->z));
levels[i]->animateTick(std::floor(player->x),
std::floor(player->y),
std::floor(player->z));
if (levelsTickedFlags & (1 << i))
continue; // Don't tick further if we've already ticked this

View file

@ -34,6 +34,7 @@
#include "Minecraft.Client/net/minecraft/client/gui/ScreenSizeCalculator.h"
#include "Minecraft.Client/net/minecraft/client/ClientConstants.h"
#include "Minecraft.Client/net/minecraft/client/multiplayer/MultiPlayerGameMode.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
ResourceLocation Gui::PUMPKIN_BLUR_LOCATION =
ResourceLocation(TN__BLUR__MISC_PUMPKINBLUR);

View file

@ -331,7 +331,7 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot,
is = is * is * is;
is = is * is * is;
float iss = 1 - is;
arm0->xRot = -Mth::abs(cosf(eating_t / 4.0f * std::numbers::pi) * 0.1f) *
arm0->xRot = -std::abs(cosf(eating_t / 4.0f * std::numbers::pi) * 0.1f) *
(eating_swing > 0.2 ? 1.0f : 0.0f) *
2.0f; // This factor is the chomping bit (conditional
// factor is so that he doesn't eat whilst the

View file

@ -11,6 +11,7 @@
#include "Minecraft.World/net/minecraft/world/entity/LivingEntity.h"
#include "Minecraft.World/net/minecraft/world/entity/animal/EntityHorse.h"
#include "Minecraft.Client/net/minecraft/client/model/geom/Model.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
ModelHorse::ModelHorse() {
texWidth = 128;

View file

@ -7,6 +7,7 @@
#include "VillagerModel.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
#include "Minecraft.World/net/minecraft/world/entity/Entity.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
WitchModel::WitchModel(float g) : VillagerModel(g, 0, 64, 128) {
mole = (new ModelPart(this))->setTexSize(64, 128);

View file

@ -55,6 +55,7 @@
#include "Minecraft.Client/Common/Source Files/Tutorial/TutorialMode.h"
#include "Minecraft.Client/Common/Source Files/Tutorial/FullTutorialMode.h"
#include "Minecraft.Client/Common/Source Files/DLC/DLCPack.h"
#include "Minecraft.World/ConsoleHelpers/StringHelpers.h"
#include "4J_Input.h"
ClientConnection::ClientConnection(Minecraft* minecraft, const std::wstring& ip,
@ -2579,9 +2580,9 @@ void ClientConnection::handleContainerOpen(
}
} break;
case ContainerOpenPacket::WORKBENCH: {
if (player->startCrafting(Mth::floor(player->x),
Mth::floor(player->y),
Mth::floor(player->z))) {
if (player->startCrafting(std::floor(player->x),
std::floor(player->y),
std::floor(player->z))) {
player->containerMenu->containerId = packet->containerId;
} else {
failed = true;
@ -2589,8 +2590,8 @@ void ClientConnection::handleContainerOpen(
} break;
case ContainerOpenPacket::ENCHANTMENT: {
if (player->startEnchanting(
Mth::floor(player->x), Mth::floor(player->y),
Mth::floor(player->z),
std::floor(player->x), std::floor(player->y),
std::floor(player->z),
packet->customName ? packet->title : L"")) {
player->containerMenu->containerId = packet->containerId;
} else {
@ -2621,9 +2622,9 @@ void ClientConnection::handleContainerOpen(
}
} break;
case ContainerOpenPacket::REPAIR_TABLE: {
if (player->startRepairing(Mth::floor(player->x),
Mth::floor(player->y),
Mth::floor(player->z))) {
if (player->startRepairing(std::floor(player->x),
std::floor(player->y),
std::floor(player->z))) {
player->containerMenu->containerId = packet->containerId;
} else {
failed = true;
@ -2655,9 +2656,9 @@ void ClientConnection::handleContainerOpen(
}
} break;
case ContainerOpenPacket::FIREWORKS: {
if (player->openFireworks(Mth::floor(player->x),
Mth::floor(player->y),
Mth::floor(player->z))) {
if (player->openFireworks(std::floor(player->x),
std::floor(player->y),
std::floor(player->z))) {
player->containerMenu->containerId = packet->containerId;
} else {
failed = true;

View file

@ -80,7 +80,7 @@ void MultiplayerLocalPlayer::tick() {
);
}*/
if (!level->hasChunkAt(Mth::floor(x), 0, Mth::floor(z))) return;
if (!level->hasChunkAt(std::floor(x), 0, std::floor(z))) return;
double tempX = x, tempY = y, tempZ = z;

View file

@ -35,7 +35,7 @@ void BubbleParticle::tick() {
yd *= 0.85f;
zd *= 0.85f;
if (level->getMaterial(Mth::floor(x), Mth::floor(y), Mth::floor(z)) !=
if (level->getMaterial(std::floor(x), std::floor(y), std::floor(z)) !=
Material::water)
remove();

View file

@ -123,11 +123,11 @@ void DripParticle::tick() {
}
Material* m =
level->getMaterial(Mth::floor(x), Mth::floor(y), Mth::floor(z));
level->getMaterial(std::floor(x), std::floor(y), std::floor(z));
if (m->isLiquid() || m->isSolid()) {
double y0 = Mth::floor(y) + 1 -
double y0 = std::floor(y) + 1 -
LiquidTile::getHeight(level->getData(
Mth::floor(x), Mth::floor(y), Mth::floor(z)));
std::floor(x), std::floor(y), std::floor(z)));
if (y < y0) {
remove();
}

View file

@ -42,7 +42,7 @@ void FootstepParticle::render(Tesselator* t, float a, float xa, float ya,
float zz = (float)(z - zOff);
float br =
level->getBrightness(Mth::floor(x), Mth::floor(y), Mth::floor(z));
level->getBrightness(std::floor(x), std::floor(y), std::floor(z));
textures->bindTexture(&FOOTPRINT_LOCATION);
glEnable(GL_BLEND);

View file

@ -64,7 +64,7 @@ Particle::Particle(Level* level, double x, double y, double z, double xa,
zd = za + (float)(Math::random() * 2 - 1) * 0.4f;
float speed = (float)(Math::random() + Math::random() + 1) * 0.15f;
float dd = (float)(Mth::sqrt(xd * xd + yd * yd + zd * zd));
float dd = (float)(std::sqrt(xd * xd + yd * yd + zd * zd));
xd = xd / dd * speed * 0.4f;
yd = yd / dd * speed * 0.4f + 0.1f;
zd = zd / dd * speed * 0.4f;

View file

@ -41,7 +41,7 @@ void SuspendedParticle::tick() {
move(xd, yd, zd);
if (level->getMaterial(Mth::floor(x), Mth::floor(y), Mth::floor(z)) !=
if (level->getMaterial(std::floor(x), std::floor(y), std::floor(z)) !=
Material::water)
remove();

View file

@ -45,9 +45,9 @@ void TakeAnimationParticle::render(Tesselator* t, float a, float xa, float ya,
double yy = yo + (yt - yo) * time;
double zz = zo + (zt - zo) * time;
int xTile = Mth::floor(xx);
int yTile = Mth::floor(yy + heightOffset / 2.0f);
int zTile = Mth::floor(zz);
int xTile = std::floor(xx);
int yTile = std::floor(yy + heightOffset / 2.0f);
int zTile = std::floor(zz);
// 4J - change brought forward from 1.8.2
if (SharedConstants::TEXTURE_LIGHTING) {

View file

@ -45,11 +45,11 @@ void WaterDropParticle::tick() {
}
Material* m =
level->getMaterial(Mth::floor(x), Mth::floor(y), Mth::floor(z));
level->getMaterial(std::floor(x), std::floor(y), std::floor(z));
if (m->isLiquid() || m->isSolid()) {
double y0 = Mth::floor(y) + 1 -
double y0 = std::floor(y) + 1 -
LiquidTile::getHeight(level->getData(
Mth::floor(x), Mth::floor(y), Mth::floor(z)));
std::floor(x), std::floor(y), std::floor(z)));
if (y < y0) {
remove();
}

View file

@ -1097,9 +1097,9 @@ bool LocalPlayer::isSolidBlock(int x, int y, int z) {
}
bool LocalPlayer::checkInTile(double x, double y, double z) {
int xTile = Mth::floor(x);
int yTile = Mth::floor(y);
int zTile = Mth::floor(z);
int xTile = std::floor(x);
int yTile = std::floor(y);
int zTile = std::floor(z);
double xd = x - xTile;
double zd = z - zTile;

View file

@ -54,7 +54,7 @@ void RemotePlayer::tick() {
walkAnimSpeedO = walkAnimSpeed;
double xxd = x - xo;
double zzd = z - zo;
float wst = Mth::sqrt(xxd * xxd + zzd * zzd) * 4;
float wst = std::sqrt(xxd * xxd + zzd * zzd) * 4;
if (wst > 1) wst = 1;
walkAnimSpeed += (wst - walkAnimSpeed) * 0.4f;
walkAnimPos += walkAnimSpeed;
@ -106,7 +106,7 @@ void RemotePlayer::aiStep() {
}
oBob = bob;
float tBob = (float)Mth::sqrt(xd * xd + zd * zd);
float tBob = (float)std::sqrt(xd * xd + zd * zd);
float tTilt = (float)atan(-yd * 0.2f) * 15.0f;
if (tBob > 0.1f) tBob = 0.1f;
if (!onGround || getHealth() <= 0) tBob = 0;

View file

@ -243,9 +243,9 @@ void GameRenderer::tick(bool first) // 4J - add bFirst
mc->cameraTargetPlayer = std::dynamic_pointer_cast<Mob>(mc->player);
}
float brr = mc->level->getBrightness(Mth::floor(mc->cameraTargetPlayer->x),
Mth::floor(mc->cameraTargetPlayer->y),
Mth::floor(mc->cameraTargetPlayer->z));
float brr = mc->level->getBrightness(std::floor(mc->cameraTargetPlayer->x),
std::floor(mc->cameraTargetPlayer->y),
std::floor(mc->cameraTargetPlayer->z));
float whiteness = (3 - mc->options->viewDistance) / 3.0f;
float fogBrT = brr * (1 - whiteness) + whiteness;
fogBr += (fogBrT - fogBr) * 0.1f;
@ -479,12 +479,12 @@ void GameRenderer::moveCameraToPlayer(float a) {
glTranslatef(0.0f, 0.3f, 0);
if (!mc->options->fixedCamera) {
int t =
mc->level->getTile(Mth::floor(player->x), Mth::floor(player->y),
Mth::floor(player->z));
mc->level->getTile(std::floor(player->x), std::floor(player->y),
std::floor(player->z));
if (t == Tile::bed_Id) {
int data = mc->level->getData(Mth::floor(player->x),
Mth::floor(player->y),
Mth::floor(player->z));
int data = mc->level->getData(std::floor(player->x),
std::floor(player->y),
std::floor(player->z));
int direction = data & 3;
glRotatef((float)direction * 90, 0.0f, 1.0f, 0.0f);
@ -1545,9 +1545,9 @@ void GameRenderer::tickRain() {
std::shared_ptr<LivingEntity> player = mc->cameraTargetPlayer;
Level* level = mc->level;
int x0 = Mth::floor(player->x);
int y0 = Mth::floor(player->y);
int z0 = Mth::floor(player->z);
int x0 = std::floor(player->x);
int y0 = std::floor(player->y);
int z0 = std::floor(player->z);
int r = 10;
@ -1597,9 +1597,9 @@ void GameRenderer::tickRain() {
if (rainPosSamples > 0 && random->nextInt(3) < rainSoundTime++) {
rainSoundTime = 0;
if (rainPosY > player->y + 1 &&
level->getTopRainBlock(Mth::floor(player->x),
Mth::floor(player->z)) >
Mth::floor(player->y)) {
level->getTopRainBlock(std::floor(player->x),
std::floor(player->z)) >
std::floor(player->y)) {
mc->level->playLocalSound(rainPosX, rainPosY, rainPosZ,
eSoundType_AMBIENT_WEATHER_RAIN, 0.1f,
0.5f);
@ -1629,7 +1629,7 @@ void GameRenderer::renderSnowAndRain(float a) {
for (int x = 0; x < 32; x++) {
float xa = x - 16;
float za = z - 16;
float d = Mth::sqrt(xa * xa + za * za);
float d = std::sqrt(xa * xa + za * za);
rainXa[z << 5 | x] = -za / d;
rainZa[z << 5 | x] = xa / d;
}
@ -1639,9 +1639,9 @@ void GameRenderer::renderSnowAndRain(float a) {
std::shared_ptr<LivingEntity> player = mc->cameraTargetPlayer;
Level* level = mc->level;
int x0 = Mth::floor(player->x);
int y0 = Mth::floor(player->y);
int z0 = Mth::floor(player->z);
int x0 = std::floor(player->x);
int y0 = std::floor(player->y);
int z0 = std::floor(player->z);
Tesselator* t = Tesselator::getInstance();
glDisable(GL_CULL_FACE);
@ -1657,7 +1657,7 @@ void GameRenderer::renderSnowAndRain(float a) {
double yo = player->yOld + (player->y - player->yOld) * a;
double zo = player->zOld + (player->z - player->zOld) * a;
int yMin = Mth::floor(yo);
int yMin = std::floor(yo);
int r = 5;
// 4J - was if(mc.options.fancyGraphics) r = 10;
@ -1722,7 +1722,7 @@ void GameRenderer::renderSnowAndRain(float a) {
double xd = (x + 0.5f) - player->x;
double zd = (z + 0.5f) - player->z;
float dd = (float)Mth::sqrt(xd * xd + zd * zd) / r;
float dd = (float)std::sqrt(xd * xd + zd * zd) / r;
float br = 1.0f;
float s = 1.0f;

View file

@ -452,13 +452,13 @@ void ItemInHandRenderer::render(float a) {
std::shared_ptr<ItemInstance> item = selectedItem;
float br = minecraft->level->getBrightness(
Mth::floor(player->x), Mth::floor(player->y), Mth::floor(player->z));
std::floor(player->x), std::floor(player->y), std::floor(player->z));
// 4J - change brought forward from 1.8.2
if (SharedConstants::TEXTURE_LIGHTING) {
br = 1;
int col = minecraft->level->getLightColor(Mth::floor(player->x),
Mth::floor(player->y),
Mth::floor(player->z), 0);
int col = minecraft->level->getLightColor(std::floor(player->x),
std::floor(player->y),
std::floor(player->z), 0);
int u = col % 65536;
int v = col / 65536;
#if defined(__linux__)
@ -621,7 +621,7 @@ void ItemInHandRenderer::render(float a) {
is = is * is * is;
float iss = 1 - is;
glTranslatef(0,
Mth::abs(cosf(t / 4 * std::numbers::pi) * 0.1f) *
std::abs(cosf(t / 4 * std::numbers::pi) * 0.1f) *
(swing > 0.2 ? 1 : 0),
0);
glTranslatef(iss * 0.6f, -iss * 0.5f, 0);
@ -783,9 +783,9 @@ void ItemInHandRenderer::renderScreenEffect(float a) {
if (minecraft->player->isInWall()) // Inside a tile
{
int x = Mth::floor(minecraft->player->x);
int y = Mth::floor(minecraft->player->y);
int z = Mth::floor(minecraft->player->z);
int x = std::floor(minecraft->player->x);
int y = std::floor(minecraft->player->y);
int z = std::floor(minecraft->player->z);
int tile = minecraft->level->getTile(x, y, z);
if (minecraft->level->isSolidBlockingTile(x, y, z)) {
@ -798,9 +798,9 @@ void ItemInHandRenderer::renderScreenEffect(float a) {
((i >> 1) % 2 - 0.5f) * minecraft->player->bbHeight * 0.2f;
float zo =
((i >> 2) % 2 - 0.5f) * minecraft->player->bbWidth * 0.9f;
int xt = Mth::floor(x + xo);
int yt = Mth::floor(y + yo);
int zt = Mth::floor(z + zo);
int xt = std::floor(x + xo);
int yt = std::floor(y + yo);
int zt = std::floor(z + zo);
if (minecraft->level->isSolidBlockingTile(xt, yt, zt)) {
tile = minecraft->level->getTile(xt, yt, zt);
}

View file

@ -104,6 +104,7 @@
#include "Minecraft.Client/net/minecraft/client/resources/ResourceLocation.h"
#include "Minecraft.Client/Header Files/stubs.h"
#include "4J_Input.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
class Icon;
class ItemInstance;
@ -540,8 +541,8 @@ void LevelRenderer::allChanged(int playerIndex) {
if (level[playerIndex] != nullptr) {
std::shared_ptr<Entity> player = mc->cameraTargetPlayer;
if (player != nullptr) {
this->resortChunks(Mth::floor(player->x), Mth::floor(player->y),
Mth::floor(player->z));
this->resortChunks(std::floor(player->x), std::floor(player->y),
std::floor(player->z));
// sort(sortedChunks[playerIndex]->begin(),sortedChunks[playerIndex]->end(),
// DistanceChunkSorter(player)); // 4J - removed - not sorting
// our chunks anymore
@ -638,8 +639,8 @@ void LevelRenderer::renderEntities(Vec3* cam, Culler* culler, float a) {
!mc->cameraTargetPlayer->isSleeping())
continue;
if (!level[playerIndex]->hasChunkAt(Mth::floor(entity->x), 0,
Mth::floor(entity->z))) {
if (!level[playerIndex]->hasChunkAt(std::floor(entity->x), 0,
std::floor(entity->z))) {
continue;
}
renderedEntities++;
@ -772,8 +773,8 @@ int LevelRenderer::render(std::shared_ptr<LivingEntity> player, int layer,
yOld[playerIndex] = player->y;
zOld[playerIndex] = player->z;
resortChunks(Mth::floor(player->x), Mth::floor(player->y),
Mth::floor(player->z));
resortChunks(std::floor(player->x), std::floor(player->y),
std::floor(player->z));
// sort(sortedChunks[playerIndex]->begin(),sortedChunks[playerIndex]->end(),
// DistanceChunkSorter(player)); // 4J - removed - not sorting
// our chunks anymore
@ -1215,8 +1216,8 @@ void LevelRenderer::renderClouds(float alpha) {
double zo =
mc->cameraTargetPlayer->zo +
(mc->cameraTargetPlayer->z - mc->cameraTargetPlayer->zo) * alpha;
int xOffs = Mth::floor(xo / 2048);
int zOffs = Mth::floor(zo / 2048);
int xOffs = std::floor(xo / 2048);
int zOffs = std::floor(zo / 2048);
xo -= xOffs * 2048;
zo -= zOffs * 2048;
@ -1458,8 +1459,8 @@ void LevelRenderer::renderAdvancedClouds(float alpha) {
0.33f;
float yy = (float)(level[playerIndex]->dimension->getCloudHeight() - yOffs +
0.33f);
int xOffs = Mth::floor(xo / 2048);
int zOffs = Mth::floor(zo / 2048);
int xOffs = std::floor(xo / 2048);
int zOffs = std::floor(zo / 2048);
xo -= xOffs * 2048;
zo -= zOffs * 2048;
@ -1505,16 +1506,16 @@ void LevelRenderer::renderAdvancedClouds(float alpha) {
float scale = 1 / 256.0f;
uo = (float)(Mth::floor(xo)) * scale;
vo = (float)(Mth::floor(zo)) * scale;
uo = (float)(std::floor(xo)) * scale;
vo = (float)(std::floor(zo)) * scale;
// 4J - keep our UVs +ve - there's a small bug in the xbox GPU that
// incorrectly rounds small -ve UVs (between -1/(64*size) and 0) up to 0,
// which leaves gaps in our clouds...
while (uo < 1.0f) uo += 1.0f;
while (vo < 1.0f) vo += 1.0f;
float xoffs = (float)(xo - Mth::floor(xo));
float zoffs = (float)(zo - Mth::floor(zo));
float xoffs = (float)(xo - std::floor(xo));
float zoffs = (float)(zo - std::floor(zo));
int D = 8;

View file

@ -224,12 +224,12 @@ void EntityRenderDispatcher::prepare(
this->crosshairPickMob = crosshairPickMob;
if (player->isSleeping()) {
int t = level->getTile(Mth::floor(player->x), Mth::floor(player->y),
Mth::floor(player->z));
int t = level->getTile(std::floor(player->x), std::floor(player->y),
std::floor(player->z));
if (t == Tile::bed_Id) {
int data =
level->getData(Mth::floor(player->x), Mth::floor(player->y),
Mth::floor(player->z));
level->getData(std::floor(player->x), std::floor(player->y),
std::floor(player->z));
int direction = data & 3;
playerRotY = (float)(direction * 90 + 180);

View file

@ -178,12 +178,12 @@ void EntityRenderer::renderShadow(std::shared_ptr<Entity> e, double x, double y,
}
double ez = e->zOld + (e->z - e->zOld) * a;
int x0 = Mth::floor(ex - r);
int x1 = Mth::floor(ex + r);
int y0 = Mth::floor(ey - r);
int y1 = Mth::floor(ey);
int z0 = Mth::floor(ez - r);
int z1 = Mth::floor(ez + r);
int x0 = std::floor(ex - r);
int x1 = std::floor(ex + r);
int y0 = std::floor(ey - r);
int y1 = std::floor(ey);
int z0 = std::floor(ez - r);
int z1 = std::floor(ez + r);
double xo = x - ex;
double yo = y - ey;

View file

@ -47,28 +47,28 @@ void FallingTileRenderer::render(std::shared_ptr<Entity> _tile, double x,
tileRenderer->level = level;
Tesselator* t = Tesselator::getInstance();
t->begin();
t->offset(-Mth::floor(tile->x) - 0.5f, -Mth::floor(tile->y) - 0.5f,
-Mth::floor(tile->z) - 0.5f);
t->offset(-std::floor(tile->x) - 0.5f, -std::floor(tile->y) - 0.5f,
-std::floor(tile->z) - 0.5f);
tileRenderer->tesselateAnvilInWorld(
(AnvilTile*)tt, Mth::floor(tile->x), Mth::floor(tile->y),
Mth::floor(tile->z), tile->data);
(AnvilTile*)tt, std::floor(tile->x), std::floor(tile->y),
std::floor(tile->z), tile->data);
t->offset(0, 0, 0);
t->end();
} else if (tt == Tile::dragonEgg) {
tileRenderer->level = level;
Tesselator* t = Tesselator::getInstance();
t->begin();
t->offset(-Mth::floor(tile->x) - 0.5f, -Mth::floor(tile->y) - 0.5f,
-Mth::floor(tile->z) - 0.5f);
tileRenderer->tesselateInWorld(tt, Mth::floor(tile->x),
Mth::floor(tile->y),
Mth::floor(tile->z));
t->offset(-std::floor(tile->x) - 0.5f, -std::floor(tile->y) - 0.5f,
-std::floor(tile->z) - 0.5f);
tileRenderer->tesselateInWorld(tt, std::floor(tile->x),
std::floor(tile->y),
std::floor(tile->z));
t->offset(0, 0, 0);
t->end();
} else if (tt != nullptr) {
tileRenderer->setShape(tt);
tileRenderer->renderBlock(tt, level, Mth::floor(tile->x),
Mth::floor(tile->y), Mth::floor(tile->z),
tileRenderer->renderBlock(tt, level, std::floor(tile->x),
std::floor(tile->y), std::floor(tile->z),
tile->data);
}
glEnable(GL_LIGHTING);

View file

@ -26,6 +26,7 @@
#include "Minecraft.Client/net/minecraft/client/renderer/Tesselator.h"
#include "Minecraft.Client/net/minecraft/client/renderer/Textures.h"
#include "Minecraft.Client/net/minecraft/client/resources/ResourceLocation.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
class MapItemSavedData;

View file

@ -29,6 +29,7 @@
#include "Minecraft.Client/net/minecraft/client/renderer/Tesselator.h"
#include "Minecraft.Client/net/minecraft/client/renderer/Textures.h"
#include "Minecraft.Client/net/minecraft/client/renderer/entity/EntityRenderer.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
class ResourceLocation;

View file

@ -25,6 +25,7 @@
#include "Minecraft.Client/net/minecraft/client/renderer/Tesselator.h"
#include "Minecraft.Client/net/minecraft/client/renderer/Textures.h"
#include "Minecraft.Client/net/minecraft/client/resources/ResourceLocation.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
ResourceLocation LivingEntityRenderer::ENCHANT_GLINT_LOCATION =
ResourceLocation(TN__BLUR__MISC_GLINT);

View file

@ -15,6 +15,7 @@
#include "java/Class.h"
#include "Minecraft.Client/net/minecraft/client/Minecraft.h"
#include "Minecraft.Client/net/minecraft/client/renderer/Tesselator.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
class Model;

View file

@ -124,13 +124,13 @@ void PaintingRenderer::renderPainting(std::shared_ptr<Painting> painting, int w,
void PaintingRenderer::setBrightness(std::shared_ptr<Painting> painting,
float ss, float ya) {
int x = Mth::floor(painting->x);
int y = Mth::floor(painting->y + ya / 16.0f);
int z = Mth::floor(painting->z);
if (painting->dir == 0) x = Mth::floor(painting->x + ss / 16.0f);
if (painting->dir == 1) z = Mth::floor(painting->z - ss / 16.0f);
if (painting->dir == 2) x = Mth::floor(painting->x - ss / 16.0f);
if (painting->dir == 3) z = Mth::floor(painting->z + ss / 16.0f);
int x = std::floor(painting->x);
int y = std::floor(painting->y + ya / 16.0f);
int z = std::floor(painting->z);
if (painting->dir == 0) x = std::floor(painting->x + ss / 16.0f);
if (painting->dir == 1) z = std::floor(painting->z - ss / 16.0f);
if (painting->dir == 2) x = std::floor(painting->x - ss / 16.0f);
if (painting->dir == 3) z = std::floor(painting->z + ss / 16.0f);
int col = this->entityRenderDispatcher->level->getLightColor(x, y, z, 0);
int u = col % 65536;

View file

@ -11,6 +11,7 @@
#include "Minecraft.World/net/minecraft/world/level/tile/entity/TileEntity.h"
#include "Minecraft.Client/net/minecraft/client/renderer/Textures.h"
#include "Minecraft.Client/net/minecraft/client/resources/ResourceLocation.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
ResourceLocation EnchantTableRenderer::BOOK_LOCATION =
ResourceLocation(TN_ITEM_BOOK);

View file

@ -11,7 +11,7 @@
#include "Minecraft.World/net/minecraft/world/level/tile/net.minecraft.world.level.tile.h"
#include "Minecraft.World/net/minecraft/world/entity/Entity.h"
#include "Minecraft.World/net/minecraft/world/level/Level.h"
#include "Minecraft.Client/Common/Source Files/Colours/ColourTable.h"
ResourceLocation SignRenderer::SIGN_LOCATION = ResourceLocation(TN_ITEM_SIGN);

View file

@ -396,7 +396,7 @@ void TitleScreen::render(int xm, int ym, float a) {
glTranslatef((float)width / 2 + 90, 70, 0);
glRotatef(-20, 0, 0, 1);
float sss = 1.8f - Mth::abs(sinf(System::currentTimeMillis() % 1000 /
float sss = 1.8f - std::abs(sinf(System::currentTimeMillis() % 1000 /
1000.0f * std::numbers::pi * 2) *
0.1f);

View file

@ -44,12 +44,14 @@
#include "Minecraft.World/net/minecraft/world/level/chunk/SparseLightStorage.h"
#include "Minecraft.World/net/minecraft/world/level/chunk/SparseDataStorage.h"
#include "Minecraft.World/Header Files/compression.h"
#include "Minecraft.World/net/minecraft/world/level/biome/BiomeSource.h"
#include "Minecraft.Client/Common/ShutdownManager.h"
#include "Minecraft.Client/Common/Source Files/UI/All Platforms/UIStructs.h"
#include "Minecraft.Client/net/minecraft/server/commands/ServerCommandDispatcher.h"
#include "Minecraft.World/net/minecraft/world/level/biome/BiomeSource.h"
#include "Minecraft.Client/net/minecraft/server/level/PlayerChunkMap.h"
#include "Minecraft.Client/Common/Source Files/GameRules/LevelGeneration/ConsoleSchematicFile.h"
#include "4J_Input.h"
#include "Minecraft.World/net/minecraft/world/level/Level.h"
#define DEBUG_SERVER_DONT_SPAWN_MOBS 0
@ -208,7 +210,7 @@ bool MinecraftServer::initServer(int64_t seed, NetworkGameInitData* initData,
settings->getInt(L"max-build-height", Level::maxBuildHeight));
setMaxBuildHeight(((getMaxBuildHeight() + 8) / 16) * 16);
setMaxBuildHeight(
Mth::clamp(getMaxBuildHeight(), 64, Level::maxBuildHeight));
std::clamp(getMaxBuildHeight(), 64, Level::maxBuildHeight));
// settings->setProperty(L"max-build-height", maxBuildHeight);
// logger.info("Preparing level \"" + levelName + "\"");
@ -1012,8 +1014,8 @@ bool MinecraftServer::isUnderSpawnProtection(Level* level, int x, int y, int z,
if (getSpawnProtectionRadius() <= 0) return false;
Pos* spawnPos = level->getSharedSpawnPos();
int xd = Mth::abs(x - spawnPos->x);
int zd = Mth::abs(z - spawnPos->z);
int xd = std::abs(x - spawnPos->x);
int zd = std::abs(z - spawnPos->z);
int dist = std::max(xd, zd);
return dist <= getSpawnProtectionRadius();

View file

@ -27,6 +27,7 @@
#include "java/JavaMath.h"
#include "Minecraft.World/net/minecraft/world/entity/EntityIO.h"
#include "Minecraft.Client/net/minecraft/client/multiplayer/MultiPlayerGameMode.h"
#include "Minecraft.Client/Common/Source Files/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h"
#include "Minecraft.Client/Common/Source Files/Tutorial/Tutorial.h"
// 4J - this class is fairly substantially altered as there didn't seem any
@ -374,17 +375,17 @@ void PlayerList::validatePlayerSpawnPosition(
double targetX = 0;
if (player->x < 0)
targetX = Mth::ceil(player->x) - 0.5;
targetX = std::ceil(player->x) - 0.5;
else
targetX = Mth::floor(player->x) + 0.5;
targetX = std::floor(player->x) + 0.5;
double targetY = floor(player->y);
double targetZ = 0;
if (player->z < 0)
targetZ = Mth::ceil(player->z) - 0.5;
targetZ = std::ceil(player->z) - 0.5;
else
targetZ = Mth::floor(player->z) + 0.5;
targetZ = std::floor(player->z) + 0.5;
player->setPos(targetX, targetY, targetZ);
@ -957,9 +958,9 @@ void PlayerList::repositionAcrossDimension(std::shared_ptr<Entity> entity,
}
if (lastDimension != 1) {
xt = (double)Mth::clamp((int)xt, -Level::MAX_LEVEL_SIZE + 128,
xt = (double)std::clamp((int)xt, -Level::MAX_LEVEL_SIZE + 128,
Level::MAX_LEVEL_SIZE - 128);
zt = (double)Mth::clamp((int)zt, -Level::MAX_LEVEL_SIZE + 128,
zt = (double)std::clamp((int)zt, -Level::MAX_LEVEL_SIZE + 128,
Level::MAX_LEVEL_SIZE - 128);
if (entity->isAlive()) {
newLevel->addEntity(entity);

View file

@ -15,6 +15,7 @@ class TileEntity;
class ProgressListener;
class GameType;
class LoginPacket;
class Connection;
class ServerScoreboard;
class PlayerList {

View file

@ -43,6 +43,7 @@
#include "Minecraft.Client/net/minecraft/client/Minecraft.h"
#include "PlayerChunkMap.h"
#include "Minecraft.Client/Common/Source Files/DLC/DLCPack.h"
#include "Minecraft.Client/Common/Source Files/Console_Debug_enum.h"
#include "4J_Input.h"
std::vector<WeighedTreasure*> ServerLevel::RANDOM_BONUS_ITEMS;

View file

@ -1,14 +1,17 @@
#pragma once
#include <list>
#include <set>
#include <mutex>
#include "Minecraft.World/net/minecraft/world/level/net.minecraft.world.level.h"
#include "java/JavaIntHash.h"
class ServerChunkCache;
class MinecraftServer;
class Node;
class EntityTracker;
class PlayerChunkMap;
class WeighedTreasure;
class ServerLevel : public Level {
private:

View file

@ -8,6 +8,7 @@
#include "Minecraft.Client/net/minecraft/server/Settings.h"
#include "Minecraft.Client/net/minecraft/server/PlayerList.h"
#include "Minecraft.Client/net/minecraft/client/multiplayer/MultiPlayerLevel.h"
#include "Minecraft.Client/Common/Source Files/Console_Debug_enum.h"
#include "Minecraft.World/net/minecraft/network/packet/net.minecraft.network.packet.h"
#include "Minecraft.World/net/minecraft/world/damageSource/net.minecraft.world.damagesource.h"
@ -1663,7 +1664,7 @@ int ServerPlayer::getViewDistance() { return viewDistance; }
// }
Pos* ServerPlayer::getCommandSenderWorldPosition() {
return new Pos(Mth::floor(x), Mth::floor(y + .5), Mth::floor(z));
return new Pos(std::floor(x), std::floor(y + .5), std::floor(z));
}
void ServerPlayer::resetLastActionTime() {

View file

@ -78,13 +78,13 @@ TrackedEntity::TrackedEntity(std::shared_ptr<Entity> e, int range,
this->updateInterval = updateInterval;
this->trackDelta = trackDelta;
xp = Mth::floor(e->x * 32);
yp = Mth::floor(e->y * 32);
zp = Mth::floor(e->z * 32);
xp = std::floor(e->x * 32);
yp = std::floor(e->y * 32);
zp = std::floor(e->z * 32);
yRotp = Mth::floor(e->yRot * 256 / 360);
xRotp = Mth::floor(e->xRot * 256 / 360);
yHeadRotp = Mth::floor(e->getYHeadRot() * 256 / 360);
yRotp = std::floor(e->yRot * 256 / 360);
xRotp = std::floor(e->xRot * 256 / 360);
yHeadRotp = std::floor(e->getYHeadRot() * 256 / 360);
}
int c0a = 0, c0b = 0, c1a = 0, c1b = 0, c1c = 0, c2a = 0, c2b = 0;
@ -141,8 +141,8 @@ void TrackedEntity::tick(EntityTracker* tracker,
} else if (tickCount % updateInterval == 0 || e->hasImpulse ||
e->getEntityData()->isDirty()) {
// 4J: Moved this as it's shared
int yRotn = Mth::floor(e->yRot * 256 / 360);
int xRotn = Mth::floor(e->xRot * 256 / 360);
int yRotn = std::floor(e->yRot * 256 / 360);
int xRotn = std::floor(e->xRot * 256 / 360);
// 4J: Changed rotation to be generally sent as a delta as well as
// position
@ -152,9 +152,9 @@ void TrackedEntity::tick(EntityTracker* tracker,
if (e->riding == nullptr) {
teleportDelay++;
int xn = Mth::floor(e->x * 32.0);
int yn = Mth::floor(e->y * 32.0);
int zn = Mth::floor(e->z * 32.0);
int xn = std::floor(e->x * 32.0);
int yn = std::floor(e->y * 32.0);
int zn = std::floor(e->z * 32.0);
int xa = xn - xp;
int ya = yn - yp;
@ -349,16 +349,16 @@ void TrackedEntity::tick(EntityTracker* tracker,
xRotp = xRotn;
}
xp = Mth::floor(e->x * 32.0);
yp = Mth::floor(e->y * 32.0);
zp = Mth::floor(e->z * 32.0);
xp = std::floor(e->x * 32.0);
yp = std::floor(e->y * 32.0);
zp = std::floor(e->z * 32.0);
sendDirtyEntityData();
wasRiding = true;
}
int yHeadRot = Mth::floor(e->getYHeadRot() * 256 / 360);
int yHeadRot = std::floor(e->getYHeadRot() * 256 / 360);
if (abs(yHeadRot - yHeadRotp) >= TOLERANCE_LEVEL) {
broadcast(std::shared_ptr<RotateHeadPacket>(
new RotateHeadPacket(e->entityId, (uint8_t)yHeadRot)));
@ -664,8 +664,8 @@ void TrackedEntity::updatePlayer(EntityTracker* tracker,
std::shared_ptr<EntityActionAtPositionPacket>(
new EntityActionAtPositionPacket(
e, EntityActionAtPositionPacket::START_SLEEP,
Mth::floor(e->x), Mth::floor(e->y),
Mth::floor(e->z))));
std::floor(e->x), std::floor(e->y),
std::floor(e->z))));
}
}
@ -720,7 +720,7 @@ std::shared_ptr<Packet> TrackedEntity::getAddEntityPacket() {
// 4J-PB - replacing with a switch, rather than tons of ifs
if (std::dynamic_pointer_cast<Creature>(e) != nullptr) {
yHeadRotp = Mth::floor(e->getYHeadRot() * 256 / 360);
yHeadRotp = std::floor(e->getYHeadRot() * 256 / 360);
return std::shared_ptr<AddMobPacket>(
new AddMobPacket(std::dynamic_pointer_cast<Mob>(e), yRotp, xRotp,
xp, yp, zp, yHeadRotp));
@ -756,7 +756,7 @@ std::shared_ptr<Packet> TrackedEntity::getAddEntityPacket() {
return std::make_shared<AddEntityPacket>(
e, AddEntityPacket::BOAT, yRotp, xRotp, xp, yp, zp);
} else if (e->instanceof(eTYPE_ENDERDRAGON)) {
yHeadRotp = Mth::floor(e->getYHeadRot() * 256 / 360);
yHeadRotp = std::floor(e->getYHeadRot() * 256 / 360);
return std::shared_ptr<AddMobPacket>(
new AddMobPacket(std::dynamic_pointer_cast<LivingEntity>(e), yRotp,
xRotp, xp, yp, zp, yHeadRotp));
@ -851,9 +851,9 @@ std::shared_ptr<Packet> TrackedEntity::getAddEntityPacket() {
std::shared_ptr<AddEntityPacket>(
new AddEntityPacket(e, AddEntityPacket::ITEM_FRAME, frame->dir,
yRotp, xRotp, xp, yp, zp));
packet->x = Mth::floor(frame->xTile * 32.0f);
packet->y = Mth::floor(frame->yTile * 32.0f);
packet->z = Mth::floor(frame->zTile * 32.0f);
packet->x = std::floor(frame->xTile * 32.0f);
packet->y = std::floor(frame->yTile * 32.0f);
packet->z = std::floor(frame->zTile * 32.0f);
return packet;
} else if (e->instanceof(eTYPE_LEASHFENCEKNOT)) {
std::shared_ptr<LeashFenceKnotEntity> knot =
@ -861,9 +861,9 @@ std::shared_ptr<Packet> TrackedEntity::getAddEntityPacket() {
std::shared_ptr<AddEntityPacket> packet =
std::make_shared<AddEntityPacket>(
e, AddEntityPacket::LEASH_KNOT, yRotp, xRotp, xp, yp, zp);
packet->x = Mth::floor((float)knot->xTile * 32);
packet->y = Mth::floor((float)knot->yTile * 32);
packet->z = Mth::floor((float)knot->zTile * 32);
packet->x = std::floor((float)knot->xTile * 32);
packet->y = std::floor((float)knot->yTile * 32);
packet->z = std::floor((float)knot->zTile * 32);
return packet;
} else if (e->instanceof(eTYPE_EXPERIENCEORB)) {
return std::shared_ptr<AddExperienceOrbPacket>(

View file

@ -19,6 +19,7 @@
#include "Minecraft.World/net/minecraft/network/packet/LoginPacket.h"
#include "Minecraft.World/net/minecraft/network/packet/PreLoginPacket.h"
#include "Minecraft.World/x64headers/extraX64.h"
#include "Minecraft.Client/Common/Source Files/BuildVer/BuildVer.h"
#include "java/Random.h"
class Packet;

View file

@ -292,7 +292,7 @@ void PlayerConnection::handleMovePlayer(
// stance: " + yd);
return;
}
if (abs(packet->x) > 32000000 || abs(packet->z) > 32000000) {
if (std::abs(packet->x) > 32000000 || std::abs(packet->z) > 32000000) {
disconnect(DisconnectPacket::eDisconnect_IllegalPosition);
return;
}

View file

@ -31,6 +31,7 @@
#include "java/System.h"
#include "Minecraft.World/net/minecraft/world/level/chunk/storage/RegionFile.h"
#include "Minecraft.World/x64headers/extraX64.h"
#include "platform/PlatformServices.h"
#define RESERVE_ALLOCATION MEM_RESERVE
#define COMMIT_ALLOCATION MEM_COMMIT

View file

@ -35,6 +35,7 @@
#include "java/System.h"
#include "Minecraft.World/net/minecraft/world/level/chunk/storage/RegionFile.h"
#include "Minecraft.World/x64headers/extraX64.h"
#include "platform/PlatformServices.h"
class ProgressListener;

View file

@ -66,8 +66,8 @@ private:
int32_t DecompressWithType(void* pDestination, unsigned int* pDestSize,
void* pSource, unsigned int SrcSize);
XMEMCOMPRESSION_CONTEXT compressionContext;
XMEMDECOMPRESSION_CONTEXT decompressionContext;
void* compressionContext;
void* decompressionContext;
std::mutex rleCompressLock;
std::mutex rleDecompressLock;

View file

@ -4,97 +4,10 @@
//
#pragma once
#ifdef _WINDOWS64
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include <malloc.h>
#include <tchar.h>
#include <d3d11.h>
#endif
#ifdef __linux__
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "Minecraft.Client/Linux/Stubs/LinuxStubs.h"
#else
#include <unordered_map>
#include <unordered_set>
#include <sal.h>
#include <vector>
#endif
#include <memory>
#include "Minecraft.World/x64headers/extraX64.h"
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <math.h>
#include <numbers>
#include <limits>
#include <string>
#include <sstream>
#include <iostream>
#include <exception>
#include <assert.h>
#include "Minecraft.World/ConsoleHelpers/Definitions.h"
#include "java/Class.h"
#include "java/Exceptions.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
#include "Minecraft.World/ConsoleHelpers/StringHelpers.h"
#include "Minecraft.World/ConsoleHelpers/ArrayWithLength.h"
#include "java/Random.h"
#include "Minecraft.World/net/minecraft/world/level/TilePos.h"
#include "Minecraft.World/net/minecraft/world/level/ChunkPos.h"
#include "Minecraft.World/Header Files/compression.h"
#include "Minecraft.World/ConsoleHelpers/PerformanceTimer.h"
#ifdef _FINAL_BUILD
#define printf BREAKTHECOMPILE
#define wprintf BREAKTHECOMPILE
#undef OutputDebugString
#define OutputDebugString BREAKTHECOMPILE
#define OutputDebugStringA BREAKTHECOMPILE
#define OutputDebugStringW BREAKTHECOMPILE
#endif
#include "platform/PlatformServices.h"
#include "Minecraft.Client/Common/Source Files/Network/GameNetworkManager.h"
#include "Minecraft.Client/Common/Source Files/UI/All Platforms/UIEnums.h"
#include "Minecraft.Client/Common/App_Defines.h"
#include "Minecraft.Client/Common/App_enums.h"
#include "Minecraft.Client/Common/Source Files/Tutorial/TutorialEnum.h"
#include "Minecraft.Client/Common/App_structs.h"
#include "Minecraft.Client/Common/Consoles_App.h"
#include "Minecraft.Client/Common/Minecraft_Macros.h"
#include "Minecraft.Client/Common/Source Files/Colours/ColourTable.h"
#include "Minecraft.Client/Common/Source Files/BuildVer/BuildVer.h"
// This is generated at build time via scripts/pack_loc.py
#include "strings.h"
#ifdef _WINDOWS64
#include "Minecraft.Client/Windows64/Windows64_App.h"
#else
// Use the Linux runtime path with supported metadata/config headers only.
#include "Minecraft.Client/Linux/Linux_App.h"
// #include "Minecraft.Client/Linux/Stubs/LinuxStubs.h"
#endif
#include "Minecraft.Client/Common/Source Files/DLC/DLCSkinFile.h"
#include "Minecraft.Client/Common/Source Files/Console_Awards_enum.h"
#include "Minecraft.Client/Common/Potion_Macros.h"
#include "Minecraft.Client/Common/Source Files/Console_Debug_enum.h"
#include "Minecraft.Client/Common/Source Files/GameRules/ConsoleGameRulesConstants.h"
#include "Minecraft.Client/Common/Source Files/GameRules/ConsoleGameRules.h"

View file

@ -40,9 +40,7 @@ lib_world = static_library('Minecraft.World',
simdutf_dep,
],
include_directories : include_directories('Header Files', '..'),
cpp_args : global_cpp_args + global_cpp_defs + [
'-include', 'Header Files/stdafx.h',
],
cpp_args : global_cpp_args + global_cpp_defs,
)
zlib_dep = dependency('zlib')

View file

@ -1,5 +1,7 @@
#pragma once
#include <string>
#include "java/Class.h"
class SharedConstants {

View file

@ -8,6 +8,7 @@
#include "Minecraft.Client/Linux/Stubs/winapi_stubs.h"
#include "java/InputOutputStream/DataInputStream.h"
#include "java/InputOutputStream/DataOutputStream.h"
#include "Minecraft.Client/Common/Source Files/BuildVer/BuildVer.h"
PreLoginPacket::PreLoginPacket() {
loginKey = L"";

View file

@ -1,6 +1,7 @@
#pragma once
#include <format>
#include <vector>
class Achievement;

View file

@ -1,6 +1,8 @@
#pragma once
#include <cmath>
#include <algorithm>
#include <string>
class Random;

View file

@ -1,5 +1,7 @@
#pragma once
#include <vector>
#include "java/Random.h"
// 4J - this WeighedRandomItem class was a nested static class within

View file

@ -1,5 +1,8 @@
#pragma once
#include <vector>
#include <memory>
class ItemInstance;
class Player;

View file

@ -366,7 +366,7 @@ std::wstring MobEffect::formatDuration(MobEffectInstance* instance) {
seconds %= 60;
wchar_t temp[8];
ZeroMemory(&temp, 8 * (sizeof(wchar_t)));
memset(&temp, 0, 8 * (sizeof(wchar_t)));
if (seconds < 10) {
swprintf(temp, 8, L"%d:0%d", minutes, seconds);

View file

@ -3,9 +3,13 @@
#include "Minecraft.World/net/minecraft/world/entity/ai/attributes/AttributeModifier.h"
#include "Minecraft.Client/Common/App_enums.h"
#include <unordered_map>
class Mob;
class MobEffectInstance;
class Attribute;
class LivingEntity;
class BaseAttributeMap;
class MobEffect {
public:

View file

@ -1,6 +1,8 @@
#pragma once
class AttributeModifier;
#include <unordered_map>
// 4J: This ID is serialised into save data so new attributes must always be
// added after existing ones
enum eATTRIBUTE_ID {

View file

@ -1,6 +1,8 @@
#pragma once
#include "AttributeModifier.h"
#include <unordered_set>
class AttributeInstance {
public:
virtual ~AttributeInstance() {}

View file

@ -30,7 +30,7 @@ void BodyControl::clientTick() {
// Body will align to head after looking long enough in a direction
float clampAngle = maxClampAngle;
if (abs(mob->yHeadRot - lastHeadY) > 15) {
if (std::abs(mob->yHeadRot - lastHeadY) > 15) {
timeStill = 0;
lastHeadY = mob->yHeadRot;
} else {

View file

@ -48,8 +48,8 @@ bool TemptGoal::canContinueToUse() {
if (mob->distanceToSqr(player.lock()) < 6 * 6) {
if (player.lock()->distanceToSqr(px, py, pz) > 0.1 * 0.1)
return false;
if (abs(player.lock()->xRot - pRotX) > 5 ||
abs(player.lock()->yRot - pRotY) > 5)
if (std::abs(player.lock()->xRot - pRotX) > 5 ||
std::abs(player.lock()->yRot - pRotY) > 5)
return false;
} else {
px = player.lock()->x;

View file

@ -46,6 +46,7 @@
#include "Minecraft.World/net/minecraft/world/level/Level.h"
#include "Minecraft.World/net/minecraft/world/level/tile/Tile.h"
#include "Minecraft.World/net/minecraft/world/phys/AABB.h"
#include "platform/PlatformServices.h"
const double Ocelot::SNEAK_SPEED_MOD = 0.6;
const double Ocelot::WALK_SPEED_MOD = 0.8;

View file

@ -1,6 +1,10 @@
#pragma once
#include <memory>
class Level;
class MultiEntityMobPart;
class DamageSource;
class MultiEntityMob {
public:

View file

@ -14,6 +14,7 @@
#include "Minecraft.World/net/minecraft/world/item/trading/net.minecraft.world.item.trading.h"
#include "Minecraft.World/net/minecraft/world/level/tile/net.minecraft.world.level.tile.h"
#include "Minecraft.World/net/minecraft/world/level/net.minecraft.world.level.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
#include "Minecraft.Client/net/minecraft/client/renderer/Textures.h"
#include "Villager.h"

View file

@ -4,6 +4,7 @@
#include "Minecraft.World/net/minecraft/world/level/net.minecraft.world.level.h"
#include "Minecraft.World/net/minecraft/world/item/net.minecraft.world.item.h"
#include "Minecraft.World/net/minecraft/world/item/enchantment/net.minecraft.world.item.enchantment.h"
#include "Minecraft.World/ConsoleHelpers/StringHelpers.h"
#include "AnvilMenu.h"
AnvilMenu::AnvilMenu(std::shared_ptr<Inventory> inventory, Level* level, int xt,

View file

@ -4,6 +4,7 @@
#include "Minecraft.World/net/minecraft/world/level/net.minecraft.world.level.h"
#include "Minecraft.World/net/minecraft/world/level/tile/net.minecraft.world.level.tile.h"
#include "Minecraft.World/net/minecraft/world/phys/net.minecraft.world.phys.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
#include "ItemInstance.h"
#include "Minecraft.World/net/minecraft/world/phys/Vec3.h"
#include "BoatItem.h"

View file

@ -12,6 +12,7 @@
#include "Minecraft.World/net/minecraft/world/net.minecraft.world.h"
#include "Minecraft.World/net/minecraft/world/level/material/Material.h"
#include "DyePowderItem.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
DyePowderItem::DyePowderItem(int id) : Item(id) {
setStackedByData(true);

View file

@ -4,6 +4,7 @@
#include "net.minecraft.world.item.h"
#include "Minecraft.World/net/minecraft/world/level/net.minecraft.world.level.h"
#include "FireworksItem.h"
#include "Minecraft.World/ConsoleHelpers/StringHelpers.h"
const std::wstring FireworksItem::TAG_FIREWORKS = L"Fireworks";
const std::wstring FireworksItem::TAG_EXPLOSION = L"Explosion";

View file

@ -101,7 +101,7 @@ void HangingEntityItem::appendHoverText(
int motive = itemInstance->getAuxValue() - 1;
wchar_t formatted[256];
ZeroMemory(formatted, 256 * sizeof(wchar_t));
memset(formatted, 0, 256 * sizeof(wchar_t));
swprintf(formatted, 256, L"** %ls %dx%d",
Painting::Motive::values[motive]->name.c_str(),
Painting::Motive::values[motive]->w / 16,

View file

@ -16,6 +16,7 @@
#include "HangingEntityItem.h"
#include "Minecraft.World/net/minecraft/util/HtmlString.h"
#include "Minecraft.World/net/minecraft/world/phys/Vec3.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
typedef Item::Tier _Tier;

View file

@ -22,6 +22,8 @@ class EnchantedBookItem;
class EmptyMapItem;
class LivingEntity;
class HtmlString;
class Tile;
class Entity;
#define ITEM_ICON_COLUMNS 16

View file

@ -12,6 +12,7 @@
#include "Minecraft.World/net/minecraft/SharedConstants.h"
#include "PotionItem.h"
#include "Minecraft.World/Header Files/SoundTypes.h"
#include "Minecraft.Client/Common/Potion_Macros.h"
const std::wstring PotionItem::DEFAULT_ICON = L"potion";
const std::wstring PotionItem::THROWABLE_ICON = L"potion_splash";

View file

@ -6,6 +6,7 @@
#include "Minecraft.World/net/minecraft/net.minecraft.h"
#include "Minecraft.World/net/minecraft/world/net.minecraft.world.h"
#include "SkullItem.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
const unsigned int SkullItem::NAMES[SKULL_COUNT] = {
IDS_ITEM_SKULL_SKELETON, IDS_ITEM_SKULL_WITHER, IDS_ITEM_SKULL_ZOMBIE,

View file

@ -10,6 +10,8 @@
#include "Minecraft.World/net/minecraft/world/phys/HitResult.h"
#include "SpawnEggItem.h"
#include "Minecraft.World/net/minecraft/world/Difficulty.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
#include "Minecraft.Client/Common/Source Files/Colours/ColourTable.h"
SpawnEggItem::SpawnEggItem(int id) : Item(id) {
setMaxStackSize(16); // 4J-PB brought forward. It is 64 on PC, but we'll

View file

@ -4,6 +4,7 @@
#include "java/JavaMath.h"
#include "Minecraft.World/net/minecraft/SharedConstants.h"
#include "PotionBrewing.h"
#include "Minecraft.Client/Common/Source Files/Colours/ColourTable.h"
const int PotionBrewing::DEFAULT_APPEARANCES[] = {
IDS_POTION_PREFIX_MUNDANE, IDS_POTION_PREFIX_UNINTERESTING,

View file

@ -6,6 +6,7 @@
#pragma once
#include "Minecraft.World/net/minecraft/world/inventory/CraftingContainer.h"
#include "4J.Common/4J_Compat.h"
#define RECIPE_TYPE_2x2 0
#define RECIPE_TYPE_3x3 1

View file

@ -88,7 +88,7 @@ void Enchantment::_init(int id) {
if (enchantments[id] != nullptr) {
app.DebugPrintf("Duplicate enchantment id!");
#ifndef _CONTENT_PACKAGE
__debugbreak();
assert(0);
#endif
// throw new IllegalArgumentException("Duplicate enchantment id!");
}

View file

@ -1,8 +1,14 @@
#pragma once
#include <memory>
#include <string>
#include "EnchantmentCategory.h"
#include "Minecraft.World/net/minecraft/util/HtmlString.h"
class DamageSource;
class LivingEntity;
class ItemInstance;
class Mob;
class Enchantment // implements Descriptive<Enchantment> {

View file

@ -2,6 +2,7 @@
#include "Minecraft.World/net/minecraft/world/damageSource/net.minecraft.world.damagesource.h"
#include "net.minecraft.world.item.enchantment.h"
#include "Minecraft.World/net/minecraft/world/entity/net.minecraft.world.entity.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
#include "ProtectionEnchantment.h"
const int ProtectionEnchantment::names[] = {

View file

@ -65,6 +65,7 @@
#include "net/minecraft/world/phys/Vec3.h"
#include "net/minecraft/world/scores/Scoreboard.h"
#include "Minecraft.World/x64headers/extraX64.h"
#include "platform/PlatformServices.h"
class CompoundTag;
class ItemInstance;

View file

@ -74,33 +74,33 @@ public:
using lightCache_t = unsigned int;
#endif
static const int MAX_TICK_TILES_PER_TICK = 1000;
static constexpr int MAX_TICK_TILES_PER_TICK = 1000;
// 4J Added
static const int MAX_GRASS_TICKS = 100;
static const int MAX_LAVA_TICKS = 100;
static constexpr int MAX_GRASS_TICKS = 100;
static constexpr int MAX_LAVA_TICKS = 100;
public:
static const int MAX_XBOX_BOATS = 40; // Max number of boats
static const int MAX_CONSOLE_MINECARTS = 40;
static const int MAX_DISPENSABLE_FIREBALLS = 200;
static const int MAX_DISPENSABLE_PROJECTILES = 300;
static constexpr int MAX_XBOX_BOATS = 40; // Max number of boats
static constexpr int MAX_CONSOLE_MINECARTS = 40;
static constexpr int MAX_DISPENSABLE_FIREBALLS = 200;
static constexpr int MAX_DISPENSABLE_PROJECTILES = 300;
static const int MAX_LEVEL_SIZE = 30000000;
static const int maxMovementHeight = 512; // 4J added
static constexpr int MAX_LEVEL_SIZE = 30000000;
static constexpr int maxMovementHeight = 512; // 4J added
static const int minBuildHeight = 0; // 4J - brought forward from 1.2.3
static const int maxBuildHeight = 256; // 4J - brought forward from 1.2.3
static const int genDepthBits = 7;
static const int genDepthBitsPlusFour = genDepthBits + 4;
static const int genDepth = 1 << genDepthBits;
static const int genDepthMinusOne = genDepth - 1;
static const int constSeaLevel = genDepth / 2 - 1;
static constexpr int minBuildHeight = 0; // 4J - brought forward from 1.2.3
static constexpr int maxBuildHeight = 256; // 4J - brought forward from 1.2.3
static constexpr int genDepthBits = 7;
static constexpr int genDepthBitsPlusFour = genDepthBits + 4;
static constexpr int genDepth = 1 << genDepthBits;
static constexpr int genDepthMinusOne = genDepth - 1;
static constexpr int constSeaLevel = genDepth / 2 - 1;
static const int CHUNK_TILE_COUNT = maxBuildHeight * 16 * 16;
static const int HALF_CHUNK_TILE_COUNT = CHUNK_TILE_COUNT / 2;
static const int COMPRESSED_CHUNK_SECTION_HEIGHT = 128;
static const int COMPRESSED_CHUNK_SECTION_TILES =
static constexpr int CHUNK_TILE_COUNT = maxBuildHeight * 16 * 16;
static constexpr int HALF_CHUNK_TILE_COUNT = CHUNK_TILE_COUNT / 2;
static constexpr int COMPRESSED_CHUNK_SECTION_HEIGHT = 128;
static constexpr int COMPRESSED_CHUNK_SECTION_TILES =
COMPRESSED_CHUNK_SECTION_HEIGHT * 16 * 16; // 4J Stu - Fixed size
int seaLevel;
@ -116,8 +116,8 @@ public:
static void setInstaTick(bool enable);
// bool instaTick; // 4J - removed
static const int MAX_BRIGHTNESS = 15;
static const int TICKS_PER_DAY = 20 * 60 * 20; // ORG:20*60*20
static constexpr int MAX_BRIGHTNESS = 15;
static constexpr int TICKS_PER_DAY = 20 * 60 * 20; // ORG:20*60*20
public:
std::recursive_mutex m_entitiesCS; // 4J added
@ -307,21 +307,21 @@ public:
LightLayer::variety layer);
bool cachewritten;
static const int LIGHTING_SHIFT = 24;
static const int BLOCKING_SHIFT = 20;
static const int EMISSION_SHIFT = 16;
static constexpr int LIGHTING_SHIFT = 24;
static constexpr int BLOCKING_SHIFT = 20;
static constexpr int EMISSION_SHIFT = 16;
#if defined(_LARGE_WORLDS)
static const int64_t LIGHTING_WRITEBACK = 0x80000000LL;
static const int64_t EMISSION_VALID = 0x40000000LL;
static const int64_t BLOCKING_VALID = 0x20000000LL;
static const int64_t LIGHTING_VALID = 0x10000000LL;
static const lightCache_t POSITION_MASK = 0xffffffff0000ffffLL;
static constexpr int64_t LIGHTING_WRITEBACK = 0x80000000LL;
static constexpr int64_t EMISSION_VALID = 0x40000000LL;
static constexpr int64_t BLOCKING_VALID = 0x20000000LL;
static constexpr int64_t LIGHTING_VALID = 0x10000000LL;
static constexpr lightCache_t POSITION_MASK = 0xffffffff0000ffffLL;
#else
static const int LIGHTING_WRITEBACK = 0x80000000;
static const int EMISSION_VALID = 0x40000000;
static const int BLOCKING_VALID = 0x20000000;
static const int LIGHTING_VALID = 0x10000000;
static const lightCache_t POSITION_MASK = 0x0000ffff;
static constexpr int LIGHTING_WRITEBACK = 0x80000000;
static constexpr int EMISSION_VALID = 0x40000000;
static constexpr int BLOCKING_VALID = 0x20000000;
static constexpr int LIGHTING_VALID = 0x10000000;
static constexpr lightCache_t POSITION_MASK = 0x0000ffff;
#endif
int cacheminx, cachemaxx, cacheminy, cachemaxy, cacheminz, cachemaxz;
@ -472,9 +472,9 @@ protected:
private:
int delayUntilNextMoodSound;
static const int CHUNK_POLL_RANGE = 9;
static const int CHUNK_TILE_TICK_COUNT = 80;
static const int CHUNK_SECTION_TILE_TICK_COUNT =
static constexpr int CHUNK_POLL_RANGE = 9;
static constexpr int CHUNK_TILE_TICK_COUNT = 80;
static constexpr int CHUNK_SECTION_TILE_TICK_COUNT =
(CHUNK_TILE_TICK_COUNT / 8) + 1;
protected:

View file

@ -1,8 +1,11 @@
#pragma once
#include <memory>
class BiomeSource;
class Material;
class TileEntity;
class Biome;
#include "LightLayer.h"

View file

@ -7,6 +7,8 @@
#include "BiomeSource.h"
#include "Minecraft.Client/net/minecraft/client/Minecraft.h"
#include "Minecraft.Client/net/minecraft/client/ProgressRenderer.h"
#include "Minecraft.Client/Common/Source Files/Console_Debug_enum.h"
#include "platform/PlatformServices.h"
// 4J - removal of separate temperature & downfall layers brought forward
// from 1.2.3
@ -151,7 +153,7 @@ void BiomeSource::getRawBiomeBlock(std::vector<Biome*>& biomes, int x, int z, in
#if !defined(_CONTENT_PACKAGE)
if (biomes[i] == nullptr) {
app.DebugPrintf("Tried to assign null biome %d\n", result[i]);
__debugbreak();
assert(0);
}
#endif
}

View file

@ -29,6 +29,7 @@
#include "Minecraft.World/net/minecraft/world/level/chunk/storage/OldChunkStorage.h"
#include "Minecraft.World/net/minecraft/world/level/chunk/storage/RegionFileCache.h"
#include "Minecraft.World/x64headers/extraX64.h"
#include "platform/PlatformServices.h"
class DataInput;

View file

@ -29,6 +29,7 @@
#include "Minecraft.World/net/minecraft/world/level/storage/LevelData.h"
#include "Minecraft.World/net/minecraft/world/level/tile/entity/TileEntity.h"
#include "Minecraft.World/x64headers/extraX64.h"
#include "platform/PlatformServices.h"
thread_local OldChunkStorage::ThreadStorage* OldChunkStorage::m_tlsStorage =
nullptr;

View file

@ -22,6 +22,7 @@
#include "Minecraft.World/net/minecraft/world/level/levelgen/flat/FlatGeneratorInfo.h"
#include "Minecraft.World/net/minecraft/world/level/storage/LevelData.h"
#include "Minecraft.World/net/minecraft/world/level/tile/Tile.h"
#include "platform/PlatformServices.h"
class Pos;

View file

@ -14,6 +14,7 @@
#include "Minecraft.World/net/minecraft/world/level/levelgen/HellRandomLevelSource.h"
#include "Minecraft.World/net/minecraft/world/level/storage/LevelData.h"
#include "Minecraft.World/net/minecraft/world/phys/Vec3.h"
#include "platform/PlatformServices.h"
void HellDimension::init() {
biomeSource = new FixedBiomeSource(Biome::hell, 1, 0);

View file

@ -1,6 +1,7 @@
#pragma once
#include "Minecraft.World/ConsoleHelpers/ArrayWithLength.h"
#include "nbt/IntArrayTag.h"
class BoundingBox {
public:

View file

@ -6,6 +6,7 @@
#include "StructurePiece.h"
#include "Minecraft.World/net/minecraft/world/level/levelgen/structure/StructureFeatureIO.h"
#include "Minecraft.World/net/minecraft/world/level/levelgen/structure/StructurePiece.h"
#include "nbt/CompoundTag.h"
class BoundingBox;
class Random;

View file

@ -1,5 +1,9 @@
#pragma once
#include <unordered_map>
#include "nbt/CompoundTag.h"
class StructurePiece;
class StructureStart;

View file

@ -5,6 +5,7 @@
#include "Minecraft.World/net/minecraft/util/WeighedRandom.h"
#include "BoundingBox.h"
#include "StructureFeatureIO.h"
#include "nbt/CompoundTag.h"
class Level;
class Random;

View file

@ -23,6 +23,7 @@
#include "Minecraft.World/net/minecraft/world/level/newbiome/layer/SwampRiversLayer.h"
#include "Minecraft.World/net/minecraft/world/level/newbiome/layer/VoronoiZoom.h"
#include "Minecraft.World/net/minecraft/world/level/newbiome/layer/ZoomLayer.h"
#include "platform/PlatformServices.h"
std::vector<std::shared_ptr<Layer>> Layer::getDefaultLayers(int64_t seed, LevelType* levelType) {
// 4J - Some changes moved here from 1.2.3. Temperature & downfall layers

View file

@ -38,6 +38,7 @@
#include "Minecraft.World/net/minecraft/world/level/storage/LevelStorage.h"
#include "Minecraft.World/net/minecraft/world/level/storage/PlayerIO.h"
#include "Minecraft.World/x64headers/extraX64.h"
#include "platform/PlatformServices.h"
const std::wstring DirectoryLevelStorage::sc_szPlayerDir(L"players/");

View file

@ -6,6 +6,7 @@
#include "Minecraft.World/net/minecraft/world/net.minecraft.world.h"
#include "Minecraft.World/net/minecraft/net.minecraft.h"
#include "AnvilTile.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
const unsigned int AnvilTile::ANVIL_NAMES[ANVIL_NAMES_LENGTH] = {
IDS_TILE_ANVIL_INTACT,

View file

@ -10,6 +10,7 @@
#include "Minecraft.World/net/minecraft/world/phys/net.minecraft.world.phys.h"
#include "ChestTile.h"
#include "Minecraft.World/net/minecraft/Facing.h"
#include "Minecraft.World/net/minecraft/util/Mth.h"
ChestTile::ChestTile(int id, int type)
: BaseEntityTile(id, Material::wood, false) {

Some files were not shown because too many files have changed in this diff Show more