diff options
author | QUSpilPrgm <QUSpilPrgm@users.noreply.github.com> | 2016-05-29 22:10:35 +0200 |
---|---|---|
committer | QUSpilPrgm <QUSpilPrgm@users.noreply.github.com> | 2016-06-03 15:45:49 +0200 |
commit | f1192c6860fc209509a414beaa4bbeaf87cfcb8d (patch) | |
tree | d299b6e8cd24f087f8bf5047cde858d4bcedbcf5 /src/ChunkMap.cpp | |
parent | Update Dispensers and let them act more like in Vanilla (diff) | |
download | cuberite-f1192c6860fc209509a414beaa4bbeaf87cfcb8d.tar cuberite-f1192c6860fc209509a414beaa4bbeaf87cfcb8d.tar.gz cuberite-f1192c6860fc209509a414beaa4bbeaf87cfcb8d.tar.bz2 cuberite-f1192c6860fc209509a414beaa4bbeaf87cfcb8d.tar.lz cuberite-f1192c6860fc209509a414beaa4bbeaf87cfcb8d.tar.xz cuberite-f1192c6860fc209509a414beaa4bbeaf87cfcb8d.tar.zst cuberite-f1192c6860fc209509a414beaa4bbeaf87cfcb8d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ChunkMap.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index be22244ad..55cabaa67 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -2651,6 +2651,24 @@ int cChunkMap::GrowCactus(int a_BlockX, int a_BlockY, int a_BlockZ, int a_NumBlo +bool cChunkMap::GrowTallGrass(int a_BlockX, int a_BlockY, int a_BlockZ) +{ + int ChunkX, ChunkZ; + cChunkDef::AbsoluteToRelative(a_BlockX, a_BlockY, a_BlockZ, ChunkX, ChunkZ); + + cCSLock Lock(m_CSLayers); + cChunkPtr Chunk = GetChunkNoLoad(ChunkX, ChunkZ); + if (Chunk != nullptr) + { + return Chunk->GrowTallGrass(a_BlockX, a_BlockY, a_BlockZ); + } + return 0; +} + + + + + void cChunkMap::SetNextBlockTick(int a_BlockX, int a_BlockY, int a_BlockZ) { int ChunkX, ChunkZ; |