diff options
-rw-r--r-- | MCServer/README.txt | 4 | ||||
-rw-r--r-- | src/Blocks/BlockHandler.cpp | 1 | ||||
-rw-r--r-- | src/Protocol/ProtocolRecognizer.h | 2 | ||||
-rw-r--r-- | src/SetChunkData.cpp | 8 | ||||
-rw-r--r-- | src/SetChunkData.h | 10 | ||||
-rw-r--r-- | src/World.cpp | 2 | ||||
-rwxr-xr-x | src/WorldStorage/WSSAnvil.cpp | 2 |
7 files changed, 16 insertions, 13 deletions
diff --git a/MCServer/README.txt b/MCServer/README.txt index f2611fd04..3cddc37d2 100644 --- a/MCServer/README.txt +++ b/MCServer/README.txt @@ -16,5 +16,5 @@ | Mail: faketruth@gmail.com | \============================/ -Compatible clients: 1.2.4, 1.2.5, 1.3.1, 1.3.2, 1.4.2, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.5, 1.5.1, 1.5.2, 1.6.1, 1.6.2, 1.6.3, 1.6.4 -Compatible protocol versions: 29, 39, 47, 49, 51, 60, 61, 73, 74, 77, 78 +Compatible clients: 1.7.x and 1.8.x +Compatible protocol versions: 4, 5, 47 diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp index 6fff4c18f..452cc94a5 100644 --- a/src/Blocks/BlockHandler.cpp +++ b/src/Blocks/BlockHandler.cpp @@ -198,6 +198,7 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType) case E_BLOCK_CARPET: return new cBlockCarpetHandler (a_BlockType); case E_BLOCK_CAULDRON: return new cBlockCauldronHandler (a_BlockType); case E_BLOCK_CHEST: return new cBlockChestHandler (a_BlockType); + case E_BLOCK_CLAY: return new cBlockOreHandler (a_BlockType); case E_BLOCK_COAL_ORE: return new cBlockOreHandler (a_BlockType); case E_BLOCK_COCOA_POD: return new cBlockCocoaPodHandler (a_BlockType); case E_BLOCK_COMMAND_BLOCK: return new cBlockCommandBlockHandler (a_BlockType); diff --git a/src/Protocol/ProtocolRecognizer.h b/src/Protocol/ProtocolRecognizer.h index d46d31cb1..13be9478f 100644 --- a/src/Protocol/ProtocolRecognizer.h +++ b/src/Protocol/ProtocolRecognizer.h @@ -18,7 +18,7 @@ // Adjust these if a new protocol is added or an old one is removed: -#define MCS_CLIENT_VERSIONS "1.7.x, 1.8" +#define MCS_CLIENT_VERSIONS "1.7.x, 1.8.x" #define MCS_PROTOCOL_VERSIONS "4, 5, 47" diff --git a/src/SetChunkData.cpp b/src/SetChunkData.cpp index 5a0bea980..f2b58570d 100644 --- a/src/SetChunkData.cpp +++ b/src/SetChunkData.cpp @@ -33,8 +33,8 @@ cSetChunkData::cSetChunkData( const NIBBLETYPE * a_SkyLight, const cChunkDef::HeightMap * a_HeightMap, const cChunkDef::BiomeMap * a_Biomes, - cEntityList & a_Entities, - cBlockEntityList & a_BlockEntities, + cEntityList && a_Entities, + cBlockEntityList && a_BlockEntities, bool a_ShouldMarkDirty ) : m_ChunkX(a_ChunkX), @@ -84,8 +84,8 @@ cSetChunkData::cSetChunkData( } // Move entities and blockentities: - std::swap(m_Entities, a_Entities); - std::swap(m_BlockEntities, a_BlockEntities); + m_Entities = std::move(a_Entities); + m_BlockEntities = std::move(a_BlockEntities); } diff --git a/src/SetChunkData.h b/src/SetChunkData.h index 1eeb75ca9..bf5283569 100644 --- a/src/SetChunkData.h +++ b/src/SetChunkData.h @@ -24,8 +24,10 @@ public: /** Constructs a new instance based on data existing elsewhere, will copy all the memory. Prefer to use the other constructor as much as possible. - Will move the entity and blockentity lists into the internal storage, and empty the a_Entities and - a_BlockEntities lists. + Will move the entity and blockentity lists into the internal storage, and invalidate a_Entities and + a_BlockEntities. + When passing an lvalue, a_Entities and a_BlockEntities must be explicitly converted to an rvalue beforehand + with std::move(). a_BlockTypes and a_BlockMetas must always be valid. If either of the light arrays are nullptr, the chunk data will be marked as not having any light at all and will be scheduled for re-lighting once it is set into the chunkmap. @@ -41,8 +43,8 @@ public: const NIBBLETYPE * a_SkyLight, const cChunkDef::HeightMap * a_HeightMap, const cChunkDef::BiomeMap * a_Biomes, - cEntityList & a_Entities, - cBlockEntityList & a_BlockEntities, + cEntityList && a_Entities, + cBlockEntityList && a_BlockEntities, bool a_ShouldMarkDirty ); diff --git a/src/World.cpp b/src/World.cpp index a088f6eb1..8e1d0b33e 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -3712,7 +3712,7 @@ void cWorld::cChunkGeneratorCallbacks::OnChunkGenerated(cChunkDesc & a_ChunkDesc a_ChunkDesc.GetBlockTypes(), BlockMetas, nullptr, nullptr, // We don't have lighting, chunk will be lighted when needed &a_ChunkDesc.GetHeightMap(), &a_ChunkDesc.GetBiomeMap(), - a_ChunkDesc.GetEntities(), a_ChunkDesc.GetBlockEntities(), + std::move(a_ChunkDesc.GetEntities()), std::move(a_ChunkDesc.GetBlockEntities()), true )); SetChunkData->RemoveInvalidBlockEntities(); diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp index 7244bcb73..948a0c9a0 100755 --- a/src/WorldStorage/WSSAnvil.cpp +++ b/src/WorldStorage/WSSAnvil.cpp @@ -431,7 +431,7 @@ bool cWSSAnvil::LoadChunkFromNBT(const cChunkCoords & a_Chunk, const cParsedNBT IsLightValid ? BlockLight : nullptr, IsLightValid ? SkyLight : nullptr, nullptr, Biomes, - Entities, BlockEntities, + std::move(Entities), std::move(BlockEntities), false )); m_World->QueueSetChunkData(SetChunkData); |