diff --git a/targets/app/common/GameRules/GameRuleManager.cpp b/targets/app/common/GameRules/GameRuleManager.cpp index c86544f6a..b80f37c19 100644 --- a/targets/app/common/GameRules/GameRuleManager.cpp +++ b/targets/app/common/GameRules/GameRuleManager.cpp @@ -12,7 +12,7 @@ #include "app/common/DLC/DLCLocalisationFile.h" #include "app/common/DLC/DLCManager.h" #include "app/common/DLC/DLCPack.h" -#include "app/common/GameRules/LevelGeneration/ConsoleSchematicFile.h" +#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" #include "app/common/GameRules/LevelGeneration/LevelGenerators.h" #include "app/common/GameRules/LevelRules/LevelRules.h" #include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h" diff --git a/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.cpp b/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.cpp index 3ace1743e..38d1afb6b 100644 --- a/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.cpp +++ b/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.cpp @@ -3,8 +3,8 @@ #include #include -#include "ConsoleSchematicFile.h" #include "app/linux/LinuxGame.h" +#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/world/level/ConsoleGameRulesConstants.h" #include "minecraft/world/level/GameRules/GameRuleDefinition.h" diff --git a/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h b/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h index b65aa9012..cc5073a35 100644 --- a/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h +++ b/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h @@ -4,8 +4,8 @@ #include #include -#include "ConsoleSchematicFile.h" #include "minecraft/world/level/ConsoleGameRulesConstants.h" +#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" #include "minecraft/world/level/GameRules/GameRuleDefinition.h" #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/Vec3.h" diff --git a/targets/app/common/GameRules/LevelGeneration/LevelGenerationOptions.cpp b/targets/app/common/GameRules/LevelGeneration/LevelGenerationOptions.cpp index d92c82e0f..8351c4328 100644 --- a/targets/app/common/GameRules/LevelGeneration/LevelGenerationOptions.cpp +++ b/targets/app/common/GameRules/LevelGeneration/LevelGenerationOptions.cpp @@ -13,7 +13,7 @@ #include "app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h" #include "app/common/GameRules/LevelGeneration/BiomeOverride.h" #include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructure.h" -#include "app/common/GameRules/LevelGeneration/ConsoleSchematicFile.h" +#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" #include "app/common/GameRules/LevelGeneration/StartFeature.h" #include "app/linux/LinuxGame.h" #include "java/File.h" diff --git a/targets/app/common_sources.txt b/targets/app/common_sources.txt index b2f71748c..3a499968a 100644 --- a/targets/app/common_sources.txt +++ b/targets/app/common_sources.txt @@ -24,7 +24,6 @@ common/GameRules/GameRuleManager.cpp common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.cpp common/GameRules/LevelGeneration/BiomeOverride.cpp common/GameRules/LevelGeneration/ConsoleGenerateStructure.cpp -common/GameRules/LevelGeneration/ConsoleSchematicFile.cpp common/GameRules/LevelGeneration/LevelGenerationOptions.cpp common/GameRules/LevelGeneration/LevelGenerators.cpp common/GameRules/LevelGeneration/StartFeature.cpp diff --git a/targets/minecraft/server/MinecraftServer.cpp b/targets/minecraft/server/MinecraftServer.cpp index 3805deda5..fc80d358e 100644 --- a/targets/minecraft/server/MinecraftServer.cpp +++ b/targets/minecraft/server/MinecraftServer.cpp @@ -65,7 +65,7 @@ #if defined(SPLIT_SAVES) #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileSplit.h" #endif -#include "app/common/GameRules/LevelGeneration/ConsoleSchematicFile.h" +#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" #include "minecraft/network/Socket.h" #include "minecraft/Console_Debug_enum.h" #include "minecraft/client/Minecraft.h" diff --git a/targets/minecraft/sources.txt b/targets/minecraft/sources.txt index a4f4996a2..bffb978e4 100644 --- a/targets/minecraft/sources.txt +++ b/targets/minecraft/sources.txt @@ -772,6 +772,7 @@ world/level/dimension/Dimension.cpp world/level/dimension/HellDimension.cpp world/level/dimension/TheEndDimension.cpp world/level/levelgen/CanyonFeature.cpp +world/level/levelgen/ConsoleSchematicFile.cpp world/level/levelgen/CustomLevelSource.cpp world/level/levelgen/DungeonFeature.cpp world/level/levelgen/FlatLevelSource.cpp diff --git a/targets/app/common/GameRules/LevelGeneration/ConsoleSchematicFile.cpp b/targets/minecraft/world/level/levelgen/ConsoleSchematicFile.cpp similarity index 99% rename from targets/app/common/GameRules/LevelGeneration/ConsoleSchematicFile.cpp rename to targets/minecraft/world/level/levelgen/ConsoleSchematicFile.cpp index ccac746a8..a70a8e6f2 100644 --- a/targets/app/common/GameRules/LevelGeneration/ConsoleSchematicFile.cpp +++ b/targets/minecraft/world/level/levelgen/ConsoleSchematicFile.cpp @@ -1,4 +1,4 @@ -#include "ConsoleSchematicFile.h" +#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" #include #include @@ -8,10 +8,10 @@ #include #include -#include "app/linux/LinuxGame.h" #include "java/Class.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" +#include "minecraft/util/Log.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/EntityIO.h" #include "minecraft/world/entity/ItemFrame.h" @@ -38,7 +38,7 @@ ConsoleSchematicFile::ConsoleSchematicFile() { } ConsoleSchematicFile::~ConsoleSchematicFile() { - app.DebugPrintf("Deleting schematic file\n"); + Log::info("Deleting schematic file\n"); } void ConsoleSchematicFile::save(DataOutputStream* dos) { @@ -111,7 +111,7 @@ void ConsoleSchematicFile::load(DataInputStream* dis) { m_data.resize(m_dataSize); break; default: - app.DebugPrintf( + Log::info( "Unrecognized compression type for Schematic file " "(%d)\n", (int)compressionType); @@ -138,7 +138,7 @@ void ConsoleSchematicFile::load(DataInputStream* dis) { if (te == nullptr) { #ifndef _CONTENT_PACKAGE - app.DebugPrintf( + Log::info( "ConsoleSchematicFile has read a nullptr tile " "entity\n"); assert(0); @@ -215,7 +215,7 @@ int64_t ConsoleSchematicFile::applyBlocksAndData(LevelChunk* chunk, int zEnd = std::min(destinationBox->z1, (double)(zStart & ~15) + 16); #ifdef _DEBUG - app.DebugPrintf("Range is (%d,%d,%d) to (%d,%d,%d)\n", xStart, yStart, + Log::info("Range is (%d,%d,%d) to (%d,%d,%d)\n", xStart, yStart, zStart, xEnd - 1, yEnd - 1, zEnd - 1); #endif @@ -290,7 +290,7 @@ int64_t ConsoleSchematicFile::applyBlocksAndData(LevelChunk* chunk, dataP += (rowBlockCount - rowBlocksIncluded) / 2; } } else { - app.DebugPrintf( + Log::info( "ERROR: Rotation of block and data not implemented!!\n"); } @@ -555,7 +555,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk* chunk, AABB* chunkBox, e->absMoveTo(targetX, targetY, targetZ, e->yRot, e->xRot); } #ifdef _DEBUG - app.DebugPrintf("Adding entity type %d at (%f,%f,%f)\n", e->GetType(), + Log::info("Adding entity type %d at (%f,%f,%f)\n", e->GetType(), e->x, e->y, e->z); #endif e->setLevel(chunk->level); @@ -616,7 +616,7 @@ void ConsoleSchematicFile::generateSchematicFile( int ySize = yEnd - yStart + 1; int zSize = zEnd - zStart + 1; - app.DebugPrintf( + Log::info( "Generating schematic file for area (%d,%d,%d) to (%d,%d,%d), " "%dx%dx%d\n", xStart, yStart, zStart, xEnd, yEnd, zEnd, xSize, ySize, zSize); diff --git a/targets/app/common/GameRules/LevelGeneration/ConsoleSchematicFile.h b/targets/minecraft/world/level/levelgen/ConsoleSchematicFile.h similarity index 100% rename from targets/app/common/GameRules/LevelGeneration/ConsoleSchematicFile.h rename to targets/minecraft/world/level/levelgen/ConsoleSchematicFile.h