summaryrefslogtreecommitdiffstats
path: root/src/Simulator/RedstoneSimulator.h
diff options
context:
space:
mode:
authorTycho Bickerstaff <work.tycho@gmail.com>2013-12-18 20:06:11 +0100
committerTycho Bickerstaff <work.tycho@gmail.com>2013-12-18 20:06:11 +0100
commite627f2f98cb9a2ec7cddcaac779350abcbae414a (patch)
tree6101aa8aa5a0152c278e129a26ba7ca26172597c /src/Simulator/RedstoneSimulator.h
parentadded zlib (diff)
parentMerge pull request #440 from mc-server/repeaterfixes (diff)
downloadcuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar
cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar.gz
cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar.bz2
cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar.lz
cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar.xz
cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar.zst
cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.zip
Diffstat (limited to 'src/Simulator/RedstoneSimulator.h')
-rw-r--r--src/Simulator/RedstoneSimulator.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Simulator/RedstoneSimulator.h b/src/Simulator/RedstoneSimulator.h
index 23ac510fc..d40d88342 100644
--- a/src/Simulator/RedstoneSimulator.h
+++ b/src/Simulator/RedstoneSimulator.h
@@ -62,6 +62,7 @@ private:
Vector3i a_BlockPos;
short a_DelayTicks;
short a_ElapsedTicks;
+ bool ShouldPowerOn;
};
typedef std::vector <sPoweredBlocks> PoweredBlocksList;
@@ -112,6 +113,8 @@ private:
void HandleRail(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_MyType);
/// <summary>Handles trapdoors</summary>
void HandleTrapdoor(int a_BlockX, int a_BlockY, int a_BlockZ);
+ /// <summary>Handles noteblocks</summary>
+ void HandleNoteBlock(int a_BlockX, int a_BlockY, int a_BlockZ);
/* ===================== */
/* ====== Helper functions ====== */
@@ -125,6 +128,8 @@ private:
void SetDirectionLinkedPowered(int a_BlockX, int a_BlockY, int a_BlockZ, char a_Direction, BLOCKTYPE a_SourceBlock);
/// <summary>Marks all blocks immediately surrounding a coordinate as powered</summary>
void SetAllDirsAsPowered(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_SourceBlock);
+ /// <summary>Queues a repeater to be powered or unpowered</summary>
+ void QueueRepeaterPowerChange(int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_Meta, short a_ElapsedTicks, bool ShouldPowerOn);
/// <summary>Returns if a coordinate is powered or linked powered</summary>
bool AreCoordsPowered(int a_BlockX, int a_BlockY, int a_BlockZ) { return AreCoordsDirectlyPowered(a_BlockX, a_BlockY, a_BlockZ) || AreCoordsLinkedPowered(a_BlockX, a_BlockY, a_BlockZ); }