{"action":"created","comment":{"url":"https://api.github.com/repos/mc-server/MCServer/pulls/comments/31878056","id":31878056,"diff_hunk":"@@ -107,126 +98,171 @@ class cIncrementalRedstoneSimulator :\n \tSimulatedPlayerToggleableList * m_SimulatedPlayerToggleableBlocks;\n \tRepeatersDelayList * m_RepeatersDelayList;\n \n-\tvirtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) override { RedstoneAddBlock(a_BlockX, a_BlockY, a_BlockZ, a_Chunk); }\n-\tvoid RedstoneAddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk, cChunk * a_OtherChunk = nullptr);\n+\tvirtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) override;\n+\n+\tvoid AddBlock(const Vector3i & a_BlockPosition, cChunk * a_Chunk, cChunk * a_OtherChunk = nullptr);\n \tcChunk * m_Chunk;\n \n \t// We want a_MyState for devices needing a full FastSetBlock (as opposed to meta) because with our simulation model, we cannot keep setting the block if it is already set correctly\n \t// In addition to being non-performant, it would stop the player from actually breaking said device\n \n-\t/* ====== SOURCES ====== */\n+\t\n \t/** Handles the redstone torch */\n \tvoid HandleRedstoneTorch(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, BLOCKTYPE a_MyState);\n+\n \t/** Handles the redstone block */\n \tvoid HandleRedstoneBlock(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n+\n \t/** Handles levers */\n \tvoid HandleRedstoneLever(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n+\n \t/** Handles buttons */\n \tvoid HandleRedstoneButton(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n+\n \t/** Handles daylight sensors */\n \tvoid HandleDaylightSensor(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n+\n \t/** Handles pressure plates */\n \tvoid HandlePressurePlate(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, BLOCKTYPE a_MyType);\n+\n \t/** Handles tripwire hooks\n \tPerforms correct meta and power setting for self by going in the direction it faces and looking for a continous line of tripwire bounded by another oppositely facing hook\n \tIf this line is complete, it verifies that at least on wire reports an entity is on top (via its meta), and performs its task\n \t*/\n \tvoid HandleTripwireHook(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n+\n \t/** Handles trapped chests */\n \tvoid HandleTrappedChest(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n-\t/* ==================== */\n \n-\t/* ====== CARRIERS ====== */\n+\t\n \t/** Handles redstone wire */\n \tvoid HandleRedstoneWire(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n+\n \t/** Handles repeaters */\n \tvoid HandleRedstoneRepeater(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, BLOCKTYPE a_MyState);\n-\t/* ====================== */\n \n-\t/* ====== DEVICES ====== */\n+\t/** Handles comparators */\n+\tvoid HandleRedstoneComparator(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n+\t\n+\t\n \t/** Handles pistons */\n \tvoid HandlePiston(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n+\n \t/** Handles dispensers and droppers */\n \tvoid HandleDropSpenser(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n+\n \t/** Handles TNT (exploding) */\n \tvoid HandleTNT(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n+\n \t/** Handles redstone lamps */\n \tvoid HandleRedstoneLamp(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, BLOCKTYPE a_MyState);\n+\n \t/** Handles doords */\n \tvoid HandleDoor(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n+\n \t/** Handles command blocks */\n \tvoid HandleCommandBlock(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n+\n \t/** Handles activator, detector, and powered rails */\n \tvoid HandleRail(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, BLOCKTYPE a_MyType);\n+\n \t/** Handles trapdoors */\n \tvoid HandleTrapdoor(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n+\n \t/** Handles fence gates */\n \tvoid HandleFenceGate(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n+\n \t/** Handles noteblocks */\n \tvoid HandleNoteBlock(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n+\n \t/** Handles tripwires */\n \tvoid HandleTripwire(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ);\n-\t/* ===================== */\n \n-\t/* ====== Helper functions ====== */\n+\n \t/** Marks a block as powered */\n-\tvoid SetBlockPowered(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, int a_RelSourceX, int a_RelSourceY, int a_RelSourceZ, unsigned char a_PowerLevel = MAX_POWER_LEVEL);\n+\tvoid SetBlockPowered(Vector3i a_RelBlockPosition, Vector3i a_RelSourcePosition, unsigned char a_PowerLevel = MAX_POWER_LEVEL);\n+\tvoid SetBlockPowered(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, int a_RelSourceX, int a_RelSourceY, int a_RelSourceZ, unsigned char a_PowerLevel = MAX_POWER_LEVEL) { SetBlockPowered(Vector3i(a_RelBlockX, a_RelBlockY, a_RelBlockZ), Vector3i(a_RelSourceX, a_RelSourceY, a_RelSourceZ), a_PowerLevel); }","path":"src/Simulator/IncrementalRedstoneSimulator.h","position":195,"original_position":193,"commit_id":"061866616d44c127871e95eb8dd6c713bcd3a2c8","original_commit_id":"32a5261d6d77a7cb2afeb524a299f10e08581204","user":{"login":"tigerw","id":2939130,"avatar_url":"https://avatars.githubusercontent.com/u/2939130?v=3","gravatar_id":"","url":"https://api.github.com/users/tigerw","html_url":"https://github.com/tigerw","followers_url":"https://api.github.com/users/tigerw/followers","following_url":"https://api.github.com/users/tigerw/following{/other_user}","gists_url":"https://api.github.com/users/tigerw/gists{/gist_id}","starred_url":"https://api.github.com/users/tigerw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tigerw/subscriptions","organizations_url":"https://api.github.com/users/tigerw/orgs","repos_url":"https://api.github.com/users/tigerw/repos","events_url":"https://api.github.com/users/tigerw/events{/privacy}","received_events_url":"https://api.github.com/users/tigerw/received_events","type":"User","site_admin":false},"body":"In another PR?","created_at":"2015-06-07T16:08:30Z","updated_at":"2015-06-07T16:08:30Z","html_url":"https://github.com/mc-server/MCServer/pull/2144#discussion_r31878056","pull_request_url":"https://api.github.com/repos/mc-server/MCServer/pulls/2144","_links":{"self":{"href":"https://api.github.com/repos/mc-server/MCServer/pulls/comments/31878056"},"html":{"href":"https://github.com/mc-server/MCServer/pull/2144#discussion_r31878056"},"pull_request":{"href":"https://api.github.com/repos/mc-server/MCServer/pulls/2144"}}},"pull_request":{"url":"https://api.github.com/repos/mc-server/MCServer/pulls/2144","id":36256825,"html_url":"https://github.com/mc-server/MCServer/pull/2144","diff_url":"https://github.com/mc-server/MCServer/pull/2144.diff","patch_url":"https://github.com/mc-server/MCServer/pull/2144.patch","issue_url":"https://api.github.com/repos/mc-server/MCServer/issues/2144","number":2144,"state":"open","locked":false,"title":"Redstone improvements [SEE DESC]","user":{"login":"tigerw","id":2939130,"avatar_url":"https://avatars.githubusercontent.com/u/2939130?v=3","gravatar_id":"","url":"https://api.github.com/users/tigerw","html_url":"https://github.com/tigerw","followers_url":"https://api.github.com/users/tigerw/followers","following_url":"https://api.github.com/users/tigerw/following{/other_user}","gists_url":"https://api.github.com/users/tigerw/gists{/gist_id}","starred_url":"https://api.github.com/users/tigerw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tigerw/subscriptions","organizations_url":"https://api.github.com/users/tigerw/orgs","repos_url":"https://api.github.com/users/tigerw/repos","events_url":"https://api.github.com/users/tigerw/events{/privacy}","received_events_url":"https://api.github.com/users/tigerw/received_events","type":"User","site_admin":false},"body":"+ Partially implemented comparators\r\n+ Wires now power on/off simultaneously\r\n* Potential performance improvements\r\n* Improvements to linked powering\r\n* Fixes #1887\r\n* Fixes #1763\r\n* Fixes #1083\r\n* Fixes #2009\r\n* Fixes #2191","created_at":"2015-05-26T23:45:17Z","updated_at":"2015-06-07T16:08:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"23ecc1fa0967150b9991b420b013feac512cbe1e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mc-server/MCServer/pulls/2144/commits","review_comments_url":"https://api.github.com/repos/mc-server/MCServer/pulls/2144/comments","review_comment_url":"https://api.github.com/repos/mc-server/MCServer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mc-server/MCServer/issues/2144/comments","statuses_url":"https://api.github.com/repos/mc-server/MCServer/statuses/061866616d44c127871e95eb8dd6c713bcd3a2c8","head":{"label":"mc-server:comparators","ref":"comparators","sha":"061866616d44c127871e95eb8dd6c713bcd3a2c8","user":{"login":"mc-server","id":5096476,"avatar_url":"https://avatars.githubusercontent.com/u/5096476?v=3","gravatar_id":"","url":"https://api.github.com/users/mc-server","html_url":"https://github.com/mc-server","followers_url":"https://api.github.com/users/mc-server/followers","following_url":"https://api.github.com/users/mc-server/following{/other_user}","gists_url":"https://api.github.com/users/mc-server/gists{/gist_id}","starred_url":"https://api.github.com/users/mc-server/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mc-server/subscriptions","organizations_url":"https://api.github.com/users/mc-server/orgs","repos_url":"https://api.github.com/users/mc-server/repos","events_url":"https://api.github.com/users/mc-server/events{/privacy}","received_events_url":"https://api.github.com/users/mc-server/received_events","type":"Organization","site_admin":false},"repo":{"id":11693709,"name":"MCServer","full_name":"mc-server/MCServer","owner":{"login":"mc-server","id":5096476,"avatar_url":"https://avatars.githubusercontent.com/u/5096476?v=3","gravatar_id":"","url":"https://api.github.com/users/mc-server","html_url":"https://github.com/mc-server","followers_url":"https://api.github.com/users/mc-server/followers","following_url":"https://api.github.com/users/mc-server/following{/other_user}","gists_url":"https://api.github.com/users/mc-server/gists{/gist_id}","starred_url":"https://api.github.com/users/mc-server/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mc-server/subscriptions","organizations_url":"https://api.github.com/users/mc-server/orgs","repos_url":"https://api.github.com/users/mc-server/repos","events_url":"https://api.github.com/users/mc-server/events{/privacy}","received_events_url":"https://api.github.com/users/mc-server/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mc-server/MCServer","description":"A performant C++ Minecraft Server","fork":false,"url":"https://api.github.com/repos/mc-server/MCServer","forks_url":"https://api.github.com/repos/mc-server/MCServer/forks","keys_url":"https://api.github.com/repos/mc-server/MCServer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mc-server/MCServer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mc-server/MCServer/teams","hooks_url":"https://api.github.com/repos/mc-server/MCServer/hooks","issue_events_url":"https://api.github.com/repos/mc-server/MCServer/issues/events{/number}","events_url":"https://api.github.com/repos/mc-server/MCServer/events","assignees_url":"https://api.github.com/repos/mc-server/MCServer/assignees{/user}","branches_url":"https://api.github.com/repos/mc-server/MCServer/branches{/branch}","tags_url":"https://api.github.com/repos/mc-server/MCServer/tags","blobs_url":"https://api.github.com/repos/mc-server/MCServer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mc-server/MCServer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mc-server/MCServer/git/refs{/sha}","trees_url":"https://api.github.com/repos/mc-server/MCServer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mc-server/MCServer/statuses/{sha}","languages_url":"https://api.github.com/repos/mc-server/MCServer/languages","stargazers_url":"https://api.github.com/repos/mc-server/MCServer/stargazers","contributors_url":"https://api.github.com/repos/mc-server/MCServer/contributors","subscribers_url":"https://api.github.com/repos/mc-server/MCServer/subscribers","subscription_url":"https://api.github.com/repos/mc-server/MCServer/subscription","commits_url":"https://api.github.com/repos/mc-server/MCServer/commits{/sha}","git_commits_url":"https://api.github.com/repos/mc-server/MCServer/git/commits{/sha}","comments_url":"https://api.github.com/repos/mc-server/MCServer/comments{/number}","issue_comment_url":"https://api.github.com/repos/mc-server/MCServer/issues/comments{/number}","contents_url":"https://api.github.com/repos/mc-server/MCServer/contents/{+path}","compare_url":"https://api.github.com/repos/mc-server/MCServer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mc-server/MCServer/merges","archive_url":"https://api.github.com/repos/mc-server/MCServer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mc-server/MCServer/downloads","issues_url":"https://api.github.com/repos/mc-server/MCServer/issues{/number}","pulls_url":"https://api.github.com/repos/mc-server/MCServer/pulls{/number}","milestones_url":"https://api.github.com/repos/mc-server/MCServer/milestones{/number}","notifications_url":"https://api.github.com/repos/mc-server/MCServer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mc-server/MCServer/labels{/name}","releases_url":"https://api.github.com/repos/mc-server/MCServer/releases{/id}","created_at":"2013-07-26T19:56:59Z","updated_at":"2015-06-05T10:07:52Z","pushed_at":"2015-06-07T13:43:17Z","git_url":"git://github.com/mc-server/MCServer.git","ssh_url":"git@github.com:mc-server/MCServer.git","clone_url":"https://github.com/mc-server/MCServer.git","svn_url":"https://github.com/mc-server/MCServer","homepage":"mc-server.org","size":164463,"stargazers_count":668,"watchers_count":668,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":195,"mirror_url":null,"open_issues_count":325,"forks":195,"open_issues":325,"watchers":668,"default_branch":"master"}},"base":{"label":"mc-server:master","ref":"master","sha":"4ece4a61f6a616797af7bfb7539cc0c0cc7afd5a","user":{"login":"mc-server","id":5096476,"avatar_url":"https://avatars.githubusercontent.com/u/5096476?v=3","gravatar_id":"","url":"https://api.github.com/users/mc-server","html_url":"https://github.com/mc-server","followers_url":"https://api.github.com/users/mc-server/followers","following_url":"https://api.github.com/users/mc-server/following{/other_user}","gists_url":"https://api.github.com/users/mc-server/gists{/gist_id}","starred_url":"https://api.github.com/users/mc-server/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mc-server/subscriptions","organizations_url":"https://api.github.com/users/mc-server/orgs","repos_url":"https://api.github.com/users/mc-server/repos","events_url":"https://api.github.com/users/mc-server/events{/privacy}","received_events_url":"https://api.github.com/users/mc-server/received_events","type":"Organization","site_admin":false},"repo":{"id":11693709,"name":"MCServer","full_name":"mc-server/MCServer","owner":{"login":"mc-server","id":5096476,"avatar_url":"https://avatars.githubusercontent.com/u/5096476?v=3","gravatar_id":"","url":"https://api.github.com/users/mc-server","html_url":"https://github.com/mc-server","followers_url":"https://api.github.com/users/mc-server/followers","following_url":"https://api.github.com/users/mc-server/following{/other_user}","gists_url":"https://api.github.com/users/mc-server/gists{/gist_id}","starred_url":"https://api.github.com/users/mc-server/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mc-server/subscriptions","organizations_url":"https://api.github.com/users/mc-server/orgs","repos_url":"https://api.github.com/users/mc-server/repos","events_url":"https://api.github.com/users/mc-server/events{/privacy}","received_events_url":"https://api.github.com/users/mc-server/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mc-server/MCServer","description":"A performant C++ Minecraft Server","fork":false,"url":"https://api.github.com/repos/mc-server/MCServer","forks_url":"https://api.github.com/repos/mc-server/MCServer/forks","keys_url":"https://api.github.com/repos/mc-server/MCServer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mc-server/MCServer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mc-server/MCServer/teams","hooks_url":"https://api.github.com/repos/mc-server/MCServer/hooks","issue_events_url":"https://api.github.com/repos/mc-server/MCServer/issues/events{/number}","events_url":"https://api.github.com/repos/mc-server/MCServer/events","assignees_url":"https://api.github.com/repos/mc-server/MCServer/assignees{/user}","branches_url":"https://api.github.com/repos/mc-server/MCServer/branches{/branch}","tags_url":"https://api.github.com/repos/mc-server/MCServer/tags","blobs_url":"https://api.github.com/repos/mc-server/MCServer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mc-server/MCServer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mc-server/MCServer/git/refs{/sha}","trees_url":"https://api.github.com/repos/mc-server/MCServer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mc-server/MCServer/statuses/{sha}","languages_url":"https://api.github.com/repos/mc-server/MCServer/languages","stargazers_url":"https://api.github.com/repos/mc-server/MCServer/stargazers","contributors_url":"https://api.github.com/repos/mc-server/MCServer/contributors","subscribers_url":"https://api.github.com/repos/mc-server/MCServer/subscribers","subscription_url":"https://api.github.com/repos/mc-server/MCServer/subscription","commits_url":"https://api.github.com/repos/mc-server/MCServer/commits{/sha}","git_commits_url":"https://api.github.com/repos/mc-server/MCServer/git/commits{/sha}","comments_url":"https://api.github.com/repos/mc-server/MCServer/comments{/number}","issue_comment_url":"https://api.github.com/repos/mc-server/MCServer/issues/comments{/number}","contents_url":"https://api.github.com/repos/mc-server/MCServer/contents/{+path}","compare_url":"https://api.github.com/repos/mc-server/MCServer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mc-server/MCServer/merges","archive_url":"https://api.github.com/repos/mc-server/MCServer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mc-server/MCServer/downloads","issues_url":"https://api.github.com/repos/mc-server/MCServer/issues{/number}","pulls_url":"https://api.github.com/repos/mc-server/MCServer/pulls{/number}","milestones_url":"https://api.github.com/repos/mc-server/MCServer/milestones{/number}","notifications_url":"https://api.github.com/repos/mc-server/MCServer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mc-server/MCServer/labels{/name}","releases_url":"https://api.github.com/repos/mc-server/MCServer/releases{/id}","created_at":"2013-07-26T19:56:59Z","updated_at":"2015-06-05T10:07:52Z","pushed_at":"2015-06-07T13:43:17Z","git_url":"git://github.com/mc-server/MCServer.git","ssh_url":"git@github.com:mc-server/MCServer.git","clone_url":"https://github.com/mc-server/MCServer.git","svn_url":"https://github.com/mc-server/MCServer","homepage":"mc-server.org","size":164463,"stargazers_count":668,"watchers_count":668,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":195,"mirror_url":null,"open_issues_count":325,"forks":195,"open_issues":325,"watchers":668,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mc-server/MCServer/pulls/2144"},"html":{"href":"https://github.com/mc-server/MCServer/pull/2144"},"issue":{"href":"https://api.github.com/repos/mc-server/MCServer/issues/2144"},"comments":{"href":"https://api.github.com/repos/mc-server/MCServer/issues/2144/comments"},"review_comments":{"href":"https://api.github.com/repos/mc-server/MCServer/pulls/2144/comments"},"review_comment":{"href":"https://api.github.com/repos/mc-server/MCServer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mc-server/MCServer/pulls/2144/commits"},"statuses":{"href":"https://api.github.com/repos/mc-server/MCServer/statuses/061866616d44c127871e95eb8dd6c713bcd3a2c8"}}}}