{"action":"created","comment":{"url":"https://api.github.com/repos/CovertJaguar/Railcraft/pulls/comments/57975245","id":57975245,"diff_hunk":"@@ -155,55 +163,55 @@ public void onBlockRemoved() {\n         ((RailcraftTileEntity) tileEntity).notifyBlocksOfNeighborChange();\n     }\n \n-    protected void determineTrackMeta() {\n-        int x = tileEntity.xCoord;\n-        int y = tileEntity.yCoord;\n-        int z = tileEntity.zCoord;\n-        int meta = tileEntity.getBlockMetadata();\n-        if (TrackTools.isRailBlockAt(getWorld(), x + 1, y, z) && TrackTools.isRailBlockAt(getWorld(), x - 1, y, z)) {\n-            if (meta != EnumTrackMeta.EAST_WEST.ordinal())\n-                getWorld().setBlockMetadataWithNotify(x, y, z, EnumTrackMeta.EAST_WEST.ordinal(), 3);\n-        } else if (TrackTools.isRailBlockAt(getWorld(), x, y, z + 1) && TrackTools.isRailBlockAt(getWorld(), x, y, z - 1)) {\n-            if (meta != EnumTrackMeta.NORTH_SOUTH.ordinal())\n-                getWorld().setBlockMetadataWithNotify(x, y, z, EnumTrackMeta.NORTH_SOUTH.ordinal(), 3);\n-        } else if (meta != EnumTrackMeta.NORTH_SOUTH.ordinal())\n-            getWorld().setBlockMetadataWithNotify(x, y, z, EnumTrackMeta.NORTH_SOUTH.ordinal(), 3);\n+    protected void determineRailDirection() {\n+        IBlockState current = getWorld().getBlockState(getPos());\n+        IProperty<EnumRailDirection> shapeProp = ((BlockRailBase) current.getBlock()).getShapeProperty();\n+        EnumRailDirection dir = current.getValue(shapeProp);\n+        if (TrackTools.isRailBlockAt(getWorld(), getPos().east()) && TrackTools.isRailBlockAt(getWorld(), getPos().west())) {\n+            if (dir != EnumRailDirection.EAST_WEST)\n+                getWorld().setBlockState(getPos(), current.withProperty(shapeProp, EnumRailDirection.EAST_WEST));\n+//        } else if (TrackTools.isRailBlockAt(getWorld(), getPos().north()) && TrackTools.isRailBlockAt(getWorld(), getPos().south())) {\n+//            if (dir != EnumRailDirection.NORTH_SOUTH)","path":"src/main/java/mods/railcraft/common/blocks/tracks/instances/TrackSwitchBase.java","position":78,"original_position":78,"commit_id":"db89e7e3bdf99f611bc38e2cbac055e2b284142f","original_commit_id":"cf54f756a327a00d088dea9cad81a41f9ce5f0f8","user":{"login":"CovertJaguar","id":1521970,"avatar_url":"https://avatars.githubusercontent.com/u/1521970?v=3","gravatar_id":"","url":"https://api.github.com/users/CovertJaguar","html_url":"https://github.com/CovertJaguar","followers_url":"https://api.github.com/users/CovertJaguar/followers","following_url":"https://api.github.com/users/CovertJaguar/following{/other_user}","gists_url":"https://api.github.com/users/CovertJaguar/gists{/gist_id}","starred_url":"https://api.github.com/users/CovertJaguar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CovertJaguar/subscriptions","organizations_url":"https://api.github.com/users/CovertJaguar/orgs","repos_url":"https://api.github.com/users/CovertJaguar/repos","events_url":"https://api.github.com/users/CovertJaguar/events{/privacy}","received_events_url":"https://api.github.com/users/CovertJaguar/received_events","type":"User","site_admin":false},"body":"Todo: inspect more thoroughly. ","created_at":"2016-03-30T22:31:44Z","updated_at":"2016-03-30T22:31:44Z","html_url":"https://github.com/CovertJaguar/Railcraft/pull/798#discussion_r57975245","pull_request_url":"https://api.github.com/repos/CovertJaguar/Railcraft/pulls/798","_links":{"self":{"href":"https://api.github.com/repos/CovertJaguar/Railcraft/pulls/comments/57975245"},"html":{"href":"https://github.com/CovertJaguar/Railcraft/pull/798#discussion_r57975245"},"pull_request":{"href":"https://api.github.com/repos/CovertJaguar/Railcraft/pulls/798"}}},"pull_request":{"url":"https://api.github.com/repos/CovertJaguar/Railcraft/pulls/798","id":64665385,"html_url":"https://github.com/CovertJaguar/Railcraft/pull/798","diff_url":"https://github.com/CovertJaguar/Railcraft/pull/798.diff","patch_url":"https://github.com/CovertJaguar/Railcraft/pull/798.patch","issue_url":"https://api.github.com/repos/CovertJaguar/Railcraft/issues/798","number":798,"state":"open","locked":false,"title":"[1.8.9] Fix a lot of track logic","user":{"login":"AlexIIL","id":3751138,"avatar_url":"https://avatars.githubusercontent.com/u/3751138?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexIIL","html_url":"https://github.com/AlexIIL","followers_url":"https://api.github.com/users/AlexIIL/followers","following_url":"https://api.github.com/users/AlexIIL/following{/other_user}","gists_url":"https://api.github.com/users/AlexIIL/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexIIL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexIIL/subscriptions","organizations_url":"https://api.github.com/users/AlexIIL/orgs","repos_url":"https://api.github.com/users/AlexIIL/repos","events_url":"https://api.github.com/users/AlexIIL/events{/privacy}","received_events_url":"https://api.github.com/users/AlexIIL/received_events","type":"User","site_admin":false},"body":"[ [api](https://github.com/CovertJaguar/Railcraft-API/pull/11) | main ]\r\n\r\nThis PR is compatible with my other PR's (You can merge them in any order, or reject any of them and all the others will still function)","created_at":"2016-03-30T17:26:27Z","updated_at":"2016-03-30T22:31:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bca831f9a1e25c2d274aa2209c803548a333bd34","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CovertJaguar/Railcraft/pulls/798/commits","review_comments_url":"https://api.github.com/repos/CovertJaguar/Railcraft/pulls/798/comments","review_comment_url":"https://api.github.com/repos/CovertJaguar/Railcraft/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CovertJaguar/Railcraft/issues/798/comments","statuses_url":"https://api.github.com/repos/CovertJaguar/Railcraft/statuses/db89e7e3bdf99f611bc38e2cbac055e2b284142f","head":{"label":"AlexIIL:update-1.8.9-alexiil-fix-track","ref":"update-1.8.9-alexiil-fix-track","sha":"db89e7e3bdf99f611bc38e2cbac055e2b284142f","user":{"login":"AlexIIL","id":3751138,"avatar_url":"https://avatars.githubusercontent.com/u/3751138?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexIIL","html_url":"https://github.com/AlexIIL","followers_url":"https://api.github.com/users/AlexIIL/followers","following_url":"https://api.github.com/users/AlexIIL/following{/other_user}","gists_url":"https://api.github.com/users/AlexIIL/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexIIL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexIIL/subscriptions","organizations_url":"https://api.github.com/users/AlexIIL/orgs","repos_url":"https://api.github.com/users/AlexIIL/repos","events_url":"https://api.github.com/users/AlexIIL/events{/privacy}","received_events_url":"https://api.github.com/users/AlexIIL/received_events","type":"User","site_admin":false},"repo":{"id":54845330,"name":"Railcraft","full_name":"AlexIIL/Railcraft","owner":{"login":"AlexIIL","id":3751138,"avatar_url":"https://avatars.githubusercontent.com/u/3751138?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexIIL","html_url":"https://github.com/AlexIIL","followers_url":"https://api.github.com/users/AlexIIL/followers","following_url":"https://api.github.com/users/AlexIIL/following{/other_user}","gists_url":"https://api.github.com/users/AlexIIL/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexIIL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexIIL/subscriptions","organizations_url":"https://api.github.com/users/AlexIIL/orgs","repos_url":"https://api.github.com/users/AlexIIL/repos","events_url":"https://api.github.com/users/AlexIIL/events{/privacy}","received_events_url":"https://api.github.com/users/AlexIIL/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlexIIL/Railcraft","description":"The Railcraft Mod for Minecraft, source and development.","fork":true,"url":"https://api.github.com/repos/AlexIIL/Railcraft","forks_url":"https://api.github.com/repos/AlexIIL/Railcraft/forks","keys_url":"https://api.github.com/repos/AlexIIL/Railcraft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlexIIL/Railcraft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlexIIL/Railcraft/teams","hooks_url":"https://api.github.com/repos/AlexIIL/Railcraft/hooks","issue_events_url":"https://api.github.com/repos/AlexIIL/Railcraft/issues/events{/number}","events_url":"https://api.github.com/repos/AlexIIL/Railcraft/events","assignees_url":"https://api.github.com/repos/AlexIIL/Railcraft/assignees{/user}","branches_url":"https://api.github.com/repos/AlexIIL/Railcraft/branches{/branch}","tags_url":"https://api.github.com/repos/AlexIIL/Railcraft/tags","blobs_url":"https://api.github.com/repos/AlexIIL/Railcraft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlexIIL/Railcraft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlexIIL/Railcraft/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlexIIL/Railcraft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlexIIL/Railcraft/statuses/{sha}","languages_url":"https://api.github.com/repos/AlexIIL/Railcraft/languages","stargazers_url":"https://api.github.com/repos/AlexIIL/Railcraft/stargazers","contributors_url":"https://api.github.com/repos/AlexIIL/Railcraft/contributors","subscribers_url":"https://api.github.com/repos/AlexIIL/Railcraft/subscribers","subscription_url":"https://api.github.com/repos/AlexIIL/Railcraft/subscription","commits_url":"https://api.github.com/repos/AlexIIL/Railcraft/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlexIIL/Railcraft/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlexIIL/Railcraft/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlexIIL/Railcraft/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlexIIL/Railcraft/contents/{+path}","compare_url":"https://api.github.com/repos/AlexIIL/Railcraft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlexIIL/Railcraft/merges","archive_url":"https://api.github.com/repos/AlexIIL/Railcraft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlexIIL/Railcraft/downloads","issues_url":"https://api.github.com/repos/AlexIIL/Railcraft/issues{/number}","pulls_url":"https://api.github.com/repos/AlexIIL/Railcraft/pulls{/number}","milestones_url":"https://api.github.com/repos/AlexIIL/Railcraft/milestones{/number}","notifications_url":"https://api.github.com/repos/AlexIIL/Railcraft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlexIIL/Railcraft/labels{/name}","releases_url":"https://api.github.com/repos/AlexIIL/Railcraft/releases{/id}","deployments_url":"https://api.github.com/repos/AlexIIL/Railcraft/deployments","created_at":"2016-03-27T19:48:20Z","updated_at":"2016-03-27T19:48:25Z","pushed_at":"2016-03-30T22:27:27Z","git_url":"git://github.com/AlexIIL/Railcraft.git","ssh_url":"git@github.com:AlexIIL/Railcraft.git","clone_url":"https://github.com/AlexIIL/Railcraft.git","svn_url":"https://github.com/AlexIIL/Railcraft","homepage":"http://www.railcraft.info/","size":4052,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"update-1.8.9"}},"base":{"label":"CovertJaguar:update-1.8.9","ref":"update-1.8.9","sha":"c8cf2618e2cc5e34fd38ae924a12ed75b7b699c0","user":{"login":"CovertJaguar","id":1521970,"avatar_url":"https://avatars.githubusercontent.com/u/1521970?v=3","gravatar_id":"","url":"https://api.github.com/users/CovertJaguar","html_url":"https://github.com/CovertJaguar","followers_url":"https://api.github.com/users/CovertJaguar/followers","following_url":"https://api.github.com/users/CovertJaguar/following{/other_user}","gists_url":"https://api.github.com/users/CovertJaguar/gists{/gist_id}","starred_url":"https://api.github.com/users/CovertJaguar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CovertJaguar/subscriptions","organizations_url":"https://api.github.com/users/CovertJaguar/orgs","repos_url":"https://api.github.com/users/CovertJaguar/repos","events_url":"https://api.github.com/users/CovertJaguar/events{/privacy}","received_events_url":"https://api.github.com/users/CovertJaguar/received_events","type":"User","site_admin":false},"repo":{"id":7177096,"name":"Railcraft","full_name":"CovertJaguar/Railcraft","owner":{"login":"CovertJaguar","id":1521970,"avatar_url":"https://avatars.githubusercontent.com/u/1521970?v=3","gravatar_id":"","url":"https://api.github.com/users/CovertJaguar","html_url":"https://github.com/CovertJaguar","followers_url":"https://api.github.com/users/CovertJaguar/followers","following_url":"https://api.github.com/users/CovertJaguar/following{/other_user}","gists_url":"https://api.github.com/users/CovertJaguar/gists{/gist_id}","starred_url":"https://api.github.com/users/CovertJaguar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CovertJaguar/subscriptions","organizations_url":"https://api.github.com/users/CovertJaguar/orgs","repos_url":"https://api.github.com/users/CovertJaguar/repos","events_url":"https://api.github.com/users/CovertJaguar/events{/privacy}","received_events_url":"https://api.github.com/users/CovertJaguar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CovertJaguar/Railcraft","description":"The Railcraft Mod for Minecraft, source and development.","fork":false,"url":"https://api.github.com/repos/CovertJaguar/Railcraft","forks_url":"https://api.github.com/repos/CovertJaguar/Railcraft/forks","keys_url":"https://api.github.com/repos/CovertJaguar/Railcraft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CovertJaguar/Railcraft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CovertJaguar/Railcraft/teams","hooks_url":"https://api.github.com/repos/CovertJaguar/Railcraft/hooks","issue_events_url":"https://api.github.com/repos/CovertJaguar/Railcraft/issues/events{/number}","events_url":"https://api.github.com/repos/CovertJaguar/Railcraft/events","assignees_url":"https://api.github.com/repos/CovertJaguar/Railcraft/assignees{/user}","branches_url":"https://api.github.com/repos/CovertJaguar/Railcraft/branches{/branch}","tags_url":"https://api.github.com/repos/CovertJaguar/Railcraft/tags","blobs_url":"https://api.github.com/repos/CovertJaguar/Railcraft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CovertJaguar/Railcraft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CovertJaguar/Railcraft/git/refs{/sha}","trees_url":"https://api.github.com/repos/CovertJaguar/Railcraft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CovertJaguar/Railcraft/statuses/{sha}","languages_url":"https://api.github.com/repos/CovertJaguar/Railcraft/languages","stargazers_url":"https://api.github.com/repos/CovertJaguar/Railcraft/stargazers","contributors_url":"https://api.github.com/repos/CovertJaguar/Railcraft/contributors","subscribers_url":"https://api.github.com/repos/CovertJaguar/Railcraft/subscribers","subscription_url":"https://api.github.com/repos/CovertJaguar/Railcraft/subscription","commits_url":"https://api.github.com/repos/CovertJaguar/Railcraft/commits{/sha}","git_commits_url":"https://api.github.com/repos/CovertJaguar/Railcraft/git/commits{/sha}","comments_url":"https://api.github.com/repos/CovertJaguar/Railcraft/comments{/number}","issue_comment_url":"https://api.github.com/repos/CovertJaguar/Railcraft/issues/comments{/number}","contents_url":"https://api.github.com/repos/CovertJaguar/Railcraft/contents/{+path}","compare_url":"https://api.github.com/repos/CovertJaguar/Railcraft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CovertJaguar/Railcraft/merges","archive_url":"https://api.github.com/repos/CovertJaguar/Railcraft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CovertJaguar/Railcraft/downloads","issues_url":"https://api.github.com/repos/CovertJaguar/Railcraft/issues{/number}","pulls_url":"https://api.github.com/repos/CovertJaguar/Railcraft/pulls{/number}","milestones_url":"https://api.github.com/repos/CovertJaguar/Railcraft/milestones{/number}","notifications_url":"https://api.github.com/repos/CovertJaguar/Railcraft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CovertJaguar/Railcraft/labels{/name}","releases_url":"https://api.github.com/repos/CovertJaguar/Railcraft/releases{/id}","deployments_url":"https://api.github.com/repos/CovertJaguar/Railcraft/deployments","created_at":"2012-12-15T07:42:00Z","updated_at":"2016-03-29T18:55:16Z","pushed_at":"2016-03-30T22:24:32Z","git_url":"git://github.com/CovertJaguar/Railcraft.git","ssh_url":"git@github.com:CovertJaguar/Railcraft.git","clone_url":"https://github.com/CovertJaguar/Railcraft.git","svn_url":"https://github.com/CovertJaguar/Railcraft","homepage":"http://www.railcraft.info/","size":5020,"stargazers_count":183,"watchers_count":183,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":69,"mirror_url":null,"open_issues_count":99,"forks":69,"open_issues":99,"watchers":183,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CovertJaguar/Railcraft/pulls/798"},"html":{"href":"https://github.com/CovertJaguar/Railcraft/pull/798"},"issue":{"href":"https://api.github.com/repos/CovertJaguar/Railcraft/issues/798"},"comments":{"href":"https://api.github.com/repos/CovertJaguar/Railcraft/issues/798/comments"},"review_comments":{"href":"https://api.github.com/repos/CovertJaguar/Railcraft/pulls/798/comments"},"review_comment":{"href":"https://api.github.com/repos/CovertJaguar/Railcraft/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CovertJaguar/Railcraft/pulls/798/commits"},"statuses":{"href":"https://api.github.com/repos/CovertJaguar/Railcraft/statuses/db89e7e3bdf99f611bc38e2cbac055e2b284142f"}}}}