mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-31 04:12:58 +00:00
refactor: relocate ConsoleSchematicFile into minecraft/world/level/levelgen
This commit is contained in:
parent
684b55c260
commit
650c81db3d
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
#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"
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "ConsoleSchematicFile.h"
|
||||
#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
|
@ -8,10 +8,10 @@
|
|||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#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);
|
||||
Loading…
Reference in a new issue