diff options
author | madmaxoft <github@xoft.cz> | 2013-08-25 16:11:19 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-08-25 16:11:19 +0200 |
commit | 104a31e23d146fe69fed78932e442f4894af2a86 (patch) | |
tree | b9b2f6ffd83d1fba85361e66955673bf322d94e8 /source/Simulator/RedstoneSimulator.cpp | |
parent | Fixed logging in cTracer. (diff) | |
parent | Fixed iron door opening by hand (diff) | |
download | cuberite-104a31e23d146fe69fed78932e442f4894af2a86.tar cuberite-104a31e23d146fe69fed78932e442f4894af2a86.tar.gz cuberite-104a31e23d146fe69fed78932e442f4894af2a86.tar.bz2 cuberite-104a31e23d146fe69fed78932e442f4894af2a86.tar.lz cuberite-104a31e23d146fe69fed78932e442f4894af2a86.tar.xz cuberite-104a31e23d146fe69fed78932e442f4894af2a86.tar.zst cuberite-104a31e23d146fe69fed78932e442f4894af2a86.zip |
Diffstat (limited to 'source/Simulator/RedstoneSimulator.cpp')
-rw-r--r-- | source/Simulator/RedstoneSimulator.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/Simulator/RedstoneSimulator.cpp b/source/Simulator/RedstoneSimulator.cpp index 615e36a49..8526a888e 100644 --- a/source/Simulator/RedstoneSimulator.cpp +++ b/source/Simulator/RedstoneSimulator.cpp @@ -53,6 +53,10 @@ void cRedstoneSimulator::WakeUp(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk } switch (BlockType) { + case E_BLOCK_PISTON: + case E_BLOCK_STICKY_PISTON: + case E_BLOCK_DISPENSER: + case E_BLOCK_DROPPER: case E_BLOCK_REDSTONE_LAMP_OFF: case E_BLOCK_REDSTONE_LAMP_ON: case E_BLOCK_REDSTONE_REPEATER_OFF: @@ -514,6 +518,20 @@ bool cRedstoneSimulator::PowerBlock(const Vector3i & a_BlockPos, const Vector3i break; } + case E_BLOCK_REDSTONE_LAMP_OFF: + { + m_World.FastSetBlock(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, E_BLOCK_REDSTONE_LAMP_ON, 0); + break; + } + + case E_BLOCK_TNT: + { + m_World.BroadcastSoundEffect("random.fuse", a_BlockPos.x * 8, a_BlockPos.y * 8, a_BlockPos.z * 8, 0.5f, 0.6f); + m_World.SpawnPrimedTNT(a_BlockPos.x + 0.5, a_BlockPos.y + 0.5, a_BlockPos.z + 0.5, 4); // 4 seconds to boom + m_World.SetBlock(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, E_BLOCK_AIR, 0); + break; + } + default: { if ( @@ -614,6 +632,12 @@ int cRedstoneSimulator::UnPowerBlock(const Vector3i & a_BlockPos, const Vector3i } break; } + + case E_BLOCK_REDSTONE_LAMP_ON: + { + m_World.FastSetBlock(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, E_BLOCK_REDSTONE_LAMP_OFF, 0); + break; + } default: { |