summaryrefslogtreecommitdiffstats
path: root/src/Simulator/SandSimulator.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-12 20:57:44 +0200
committerGitHub <noreply@github.com>2020-09-12 20:57:44 +0200
commit93adbdce9a769b42baeb70f9ead5c7c6a35834b5 (patch)
treee0116770113a78af0d2d1c4d44a3878f551f0703 /src/Simulator/SandSimulator.cpp
parentfixed missing include for FreeBSD. (#4852) (diff)
downloadcuberite-93adbdce9a769b42baeb70f9ead5c7c6a35834b5.tar
cuberite-93adbdce9a769b42baeb70f9ead5c7c6a35834b5.tar.gz
cuberite-93adbdce9a769b42baeb70f9ead5c7c6a35834b5.tar.bz2
cuberite-93adbdce9a769b42baeb70f9ead5c7c6a35834b5.tar.lz
cuberite-93adbdce9a769b42baeb70f9ead5c7c6a35834b5.tar.xz
cuberite-93adbdce9a769b42baeb70f9ead5c7c6a35834b5.tar.zst
cuberite-93adbdce9a769b42baeb70f9ead5c7c6a35834b5.zip
Diffstat (limited to 'src/Simulator/SandSimulator.cpp')
-rw-r--r--src/Simulator/SandSimulator.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/Simulator/SandSimulator.cpp b/src/Simulator/SandSimulator.cpp
index 95f514cc9..72b1a8378 100644
--- a/src/Simulator/SandSimulator.cpp
+++ b/src/Simulator/SandSimulator.cpp
@@ -74,29 +74,6 @@ void cSandSimulator::SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX,
-bool cSandSimulator::IsAllowedBlock(BLOCKTYPE a_BlockType)
-{
- switch (a_BlockType)
- {
- case E_BLOCK_ANVIL:
- case E_BLOCK_CONCRETE_POWDER:
- case E_BLOCK_DRAGON_EGG:
- case E_BLOCK_GRAVEL:
- case E_BLOCK_SAND:
- {
- return true;
- }
- default:
- {
- return false;
- }
- }
-}
-
-
-
-
-
void cSandSimulator::AddBlock(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block)
{
if (!IsAllowedBlock(a_Block))
@@ -286,6 +263,29 @@ void cSandSimulator::FinishFalling(
+bool cSandSimulator::IsAllowedBlock(BLOCKTYPE a_BlockType)
+{
+ switch (a_BlockType)
+ {
+ case E_BLOCK_ANVIL:
+ case E_BLOCK_CONCRETE_POWDER:
+ case E_BLOCK_DRAGON_EGG:
+ case E_BLOCK_GRAVEL:
+ case E_BLOCK_SAND:
+ {
+ return true;
+ }
+ default:
+ {
+ return false;
+ }
+ }
+}
+
+
+
+
+
void cSandSimulator::DoInstantFall(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ)
{
// Remove the original block: