{"action":"created","comment":{"url":"https://api.github.com/repos/TeamLapen/Vampirism/pulls/comments/215785046","pull_request_review_id":153125119,"id":215785046,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTc4NTA0Ng==","diff_hunk":"@@ -1065,69 +1099,134 @@ private void biteBlock(@Nonnull BlockPos pos, @Nonnull IBlockState blockState, @\n             NBTTagCompound updatePacket = bloodStats.writeUpdate(new NBTTagCompound());\n             sync(updatePacket, true);\n \n-            biteCooldown = Balance.vp.BITE_COOLDOWN;\n \n         }\n \n     }\n \n+    /**\n+     * Bite the entity with the given id.\n+     * Checks reach distance\n+     *\n+     * @param entityId The id of the entity to start biting\n+     */\n+    public void biteEntity(int entityId) {\n+        Entity e = player.getEntityWorld().getEntityByID(entityId);\n+        if (player.isSpectator()) {\n+            VampirismMod.log.w(TAG, \"Player can't bite in spectator mode\");\n+            return;\n+        }\n+        if (e != null && e instanceof EntityLivingBase) {\n+            if (e.getDistance(player) <= player.getEntityAttribute(EntityPlayer.REACH_DISTANCE).getAttributeValue() + 1) {\n+                victim_bite_type = determineBiteType((EntityLivingBase) e);\n+                if (victim_bite_type == BITE_TYPE.ATTACK || victim_bite_type == BITE_TYPE.ATTACK_HUNTER) {\n+                    biteAttack((EntityLivingBase) e, victim_bite_type == BITE_TYPE.ATTACK_HUNTER);\n+                } else if (victim_bite_type == BITE_TYPE.NONE) {\n+                    return;\n+                } else {\n+                    if (victim == -1) biteTickCounter = 0;\n+\n+                    victim = e.getEntityId();\n+                    PotionEffect effect = new PotionEffect(PotionBloodLoss.POTION, 20, 7, false, false);\n+                    ((EntityLivingBase) e).addPotionEffect(effect);\n+\n+                    PotionEffect feedingEffect = new PotionEffect(PotionFeeding.POTION, 25, 1, false, false);\n+                    player.addPotionEffect(feedingEffect);\n+\n+                    NBTTagCompound nbt = new NBTTagCompound();\n+                    nbt.setInteger(KEY_VICTIM_ID, victim);\n+                    sync(nbt, true);\n+\n+                }\n+            } else {\n+                VampirismMod.log.w(TAG, \"Entity sent by client is not in reach \" + entityId);\n+            }\n+        }\n+    }\n+\n+\n+    /**\n+     * This is called every 20 ticks in onUpdate() to run the continuous feeding effect\n+     */\n+    public void biteVictim() {","path":"src/main/java/de/teamlapen/vampirism/player/vampire/VampirePlayer.java","position":313,"original_position":313,"commit_id":"c71d999bd3c7e1c72bef59a509cf02bbfd7ad971","original_commit_id":"c71d999bd3c7e1c72bef59a509cf02bbfd7ad971","user":{"login":"maxanier","id":3747729,"node_id":"MDQ6VXNlcjM3NDc3Mjk=","avatar_url":"https://avatars2.githubusercontent.com/u/3747729?v=4","gravatar_id":"","url":"https://api.github.com/users/maxanier","html_url":"https://github.com/maxanier","followers_url":"https://api.github.com/users/maxanier/followers","following_url":"https://api.github.com/users/maxanier/following{/other_user}","gists_url":"https://api.github.com/users/maxanier/gists{/gist_id}","starred_url":"https://api.github.com/users/maxanier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxanier/subscriptions","organizations_url":"https://api.github.com/users/maxanier/orgs","repos_url":"https://api.github.com/users/maxanier/repos","events_url":"https://api.github.com/users/maxanier/events{/privacy}","received_events_url":"https://api.github.com/users/maxanier/received_events","type":"User","site_admin":false},"body":"Should be private I think.\r\nWe could also consider renaming this to something like `updateFeeding` and the endBite to `endFeeding` or `stopFeeding`.  Thereby it is more recognizable as a method which is called regularly and clearly separated from the biteAttack / biteFeed.","created_at":"2018-09-06T21:30:15Z","updated_at":"2018-09-06T21:45:33Z","html_url":"https://github.com/TeamLapen/Vampirism/pull/355#discussion_r215785046","pull_request_url":"https://api.github.com/repos/TeamLapen/Vampirism/pulls/355","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/TeamLapen/Vampirism/pulls/comments/215785046"},"html":{"href":"https://github.com/TeamLapen/Vampirism/pull/355#discussion_r215785046"},"pull_request":{"href":"https://api.github.com/repos/TeamLapen/Vampirism/pulls/355"}}},"pull_request":{"url":"https://api.github.com/repos/TeamLapen/Vampirism/pulls/355","id":211175284,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExMTc1Mjg0","html_url":"https://github.com/TeamLapen/Vampirism/pull/355","diff_url":"https://github.com/TeamLapen/Vampirism/pull/355.diff","patch_url":"https://github.com/TeamLapen/Vampirism/pull/355.patch","issue_url":"https://api.github.com/repos/TeamLapen/Vampirism/issues/355","number":355,"state":"open","locked":false,"title":"[WIP] Feed over time","user":{"login":"Skyshayde","id":1759360,"node_id":"MDQ6VXNlcjE3NTkzNjA=","avatar_url":"https://avatars2.githubusercontent.com/u/1759360?v=4","gravatar_id":"","url":"https://api.github.com/users/Skyshayde","html_url":"https://github.com/Skyshayde","followers_url":"https://api.github.com/users/Skyshayde/followers","following_url":"https://api.github.com/users/Skyshayde/following{/other_user}","gists_url":"https://api.github.com/users/Skyshayde/gists{/gist_id}","starred_url":"https://api.github.com/users/Skyshayde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skyshayde/subscriptions","organizations_url":"https://api.github.com/users/Skyshayde/orgs","repos_url":"https://api.github.com/users/Skyshayde/repos","events_url":"https://api.github.com/users/Skyshayde/events{/privacy}","received_events_url":"https://api.github.com/users/Skyshayde/received_events","type":"User","site_admin":false},"body":"As discussed in issue #312 i've been working on a continuous feeding effect.  This PR is a work in progress and I just made it so we can discuss it.  ","created_at":"2018-08-27T17:26:52Z","updated_at":"2018-09-06T21:45:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c746e3a8050ee4dffb4d5c471bbc16220f7df9d5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/TeamLapen/Vampirism/pulls/355/commits","review_comments_url":"https://api.github.com/repos/TeamLapen/Vampirism/pulls/355/comments","review_comment_url":"https://api.github.com/repos/TeamLapen/Vampirism/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TeamLapen/Vampirism/issues/355/comments","statuses_url":"https://api.github.com/repos/TeamLapen/Vampirism/statuses/c71d999bd3c7e1c72bef59a509cf02bbfd7ad971","head":{"label":"Skyshayde:1.12","ref":"1.12","sha":"c71d999bd3c7e1c72bef59a509cf02bbfd7ad971","user":{"login":"Skyshayde","id":1759360,"node_id":"MDQ6VXNlcjE3NTkzNjA=","avatar_url":"https://avatars2.githubusercontent.com/u/1759360?v=4","gravatar_id":"","url":"https://api.github.com/users/Skyshayde","html_url":"https://github.com/Skyshayde","followers_url":"https://api.github.com/users/Skyshayde/followers","following_url":"https://api.github.com/users/Skyshayde/following{/other_user}","gists_url":"https://api.github.com/users/Skyshayde/gists{/gist_id}","starred_url":"https://api.github.com/users/Skyshayde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skyshayde/subscriptions","organizations_url":"https://api.github.com/users/Skyshayde/orgs","repos_url":"https://api.github.com/users/Skyshayde/repos","events_url":"https://api.github.com/users/Skyshayde/events{/privacy}","received_events_url":"https://api.github.com/users/Skyshayde/received_events","type":"User","site_admin":false},"repo":{"id":146054791,"node_id":"MDEwOlJlcG9zaXRvcnkxNDYwNTQ3OTE=","name":"Vampirism","full_name":"Skyshayde/Vampirism","owner":{"login":"Skyshayde","id":1759360,"node_id":"MDQ6VXNlcjE3NTkzNjA=","avatar_url":"https://avatars2.githubusercontent.com/u/1759360?v=4","gravatar_id":"","url":"https://api.github.com/users/Skyshayde","html_url":"https://github.com/Skyshayde","followers_url":"https://api.github.com/users/Skyshayde/followers","following_url":"https://api.github.com/users/Skyshayde/following{/other_user}","gists_url":"https://api.github.com/users/Skyshayde/gists{/gist_id}","starred_url":"https://api.github.com/users/Skyshayde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skyshayde/subscriptions","organizations_url":"https://api.github.com/users/Skyshayde/orgs","repos_url":"https://api.github.com/users/Skyshayde/repos","events_url":"https://api.github.com/users/Skyshayde/events{/privacy}","received_events_url":"https://api.github.com/users/Skyshayde/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Skyshayde/Vampirism","description":"A Minecraft mod called Vampirism","fork":true,"url":"https://api.github.com/repos/Skyshayde/Vampirism","forks_url":"https://api.github.com/repos/Skyshayde/Vampirism/forks","keys_url":"https://api.github.com/repos/Skyshayde/Vampirism/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Skyshayde/Vampirism/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Skyshayde/Vampirism/teams","hooks_url":"https://api.github.com/repos/Skyshayde/Vampirism/hooks","issue_events_url":"https://api.github.com/repos/Skyshayde/Vampirism/issues/events{/number}","events_url":"https://api.github.com/repos/Skyshayde/Vampirism/events","assignees_url":"https://api.github.com/repos/Skyshayde/Vampirism/assignees{/user}","branches_url":"https://api.github.com/repos/Skyshayde/Vampirism/branches{/branch}","tags_url":"https://api.github.com/repos/Skyshayde/Vampirism/tags","blobs_url":"https://api.github.com/repos/Skyshayde/Vampirism/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Skyshayde/Vampirism/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Skyshayde/Vampirism/git/refs{/sha}","trees_url":"https://api.github.com/repos/Skyshayde/Vampirism/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Skyshayde/Vampirism/statuses/{sha}","languages_url":"https://api.github.com/repos/Skyshayde/Vampirism/languages","stargazers_url":"https://api.github.com/repos/Skyshayde/Vampirism/stargazers","contributors_url":"https://api.github.com/repos/Skyshayde/Vampirism/contributors","subscribers_url":"https://api.github.com/repos/Skyshayde/Vampirism/subscribers","subscription_url":"https://api.github.com/repos/Skyshayde/Vampirism/subscription","commits_url":"https://api.github.com/repos/Skyshayde/Vampirism/commits{/sha}","git_commits_url":"https://api.github.com/repos/Skyshayde/Vampirism/git/commits{/sha}","comments_url":"https://api.github.com/repos/Skyshayde/Vampirism/comments{/number}","issue_comment_url":"https://api.github.com/repos/Skyshayde/Vampirism/issues/comments{/number}","contents_url":"https://api.github.com/repos/Skyshayde/Vampirism/contents/{+path}","compare_url":"https://api.github.com/repos/Skyshayde/Vampirism/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Skyshayde/Vampirism/merges","archive_url":"https://api.github.com/repos/Skyshayde/Vampirism/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Skyshayde/Vampirism/downloads","issues_url":"https://api.github.com/repos/Skyshayde/Vampirism/issues{/number}","pulls_url":"https://api.github.com/repos/Skyshayde/Vampirism/pulls{/number}","milestones_url":"https://api.github.com/repos/Skyshayde/Vampirism/milestones{/number}","notifications_url":"https://api.github.com/repos/Skyshayde/Vampirism/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Skyshayde/Vampirism/labels{/name}","releases_url":"https://api.github.com/repos/Skyshayde/Vampirism/releases{/id}","deployments_url":"https://api.github.com/repos/Skyshayde/Vampirism/deployments","created_at":"2018-08-25T01:30:03Z","updated_at":"2018-09-06T17:37:32Z","pushed_at":"2018-09-06T17:37:30Z","git_url":"git://github.com/Skyshayde/Vampirism.git","ssh_url":"git@github.com:Skyshayde/Vampirism.git","clone_url":"https://github.com/Skyshayde/Vampirism.git","svn_url":"https://github.com/Skyshayde/Vampirism","homepage":"","size":18952,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":0,"open_issues":3,"watchers":0,"default_branch":"1.12"}},"base":{"label":"TeamLapen:1.12","ref":"1.12","sha":"9a4438f89f9336d83b38538f168c2133f0853e4c","user":{"login":"TeamLapen","id":8417769,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTc3Njk=","avatar_url":"https://avatars0.githubusercontent.com/u/8417769?v=4","gravatar_id":"","url":"https://api.github.com/users/TeamLapen","html_url":"https://github.com/TeamLapen","followers_url":"https://api.github.com/users/TeamLapen/followers","following_url":"https://api.github.com/users/TeamLapen/following{/other_user}","gists_url":"https://api.github.com/users/TeamLapen/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamLapen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamLapen/subscriptions","organizations_url":"https://api.github.com/users/TeamLapen/orgs","repos_url":"https://api.github.com/users/TeamLapen/repos","events_url":"https://api.github.com/users/TeamLapen/events{/privacy}","received_events_url":"https://api.github.com/users/TeamLapen/received_events","type":"Organization","site_admin":false},"repo":{"id":22843037,"node_id":"MDEwOlJlcG9zaXRvcnkyMjg0MzAzNw==","name":"Vampirism","full_name":"TeamLapen/Vampirism","owner":{"login":"TeamLapen","id":8417769,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTc3Njk=","avatar_url":"https://avatars0.githubusercontent.com/u/8417769?v=4","gravatar_id":"","url":"https://api.github.com/users/TeamLapen","html_url":"https://github.com/TeamLapen","followers_url":"https://api.github.com/users/TeamLapen/followers","following_url":"https://api.github.com/users/TeamLapen/following{/other_user}","gists_url":"https://api.github.com/users/TeamLapen/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamLapen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamLapen/subscriptions","organizations_url":"https://api.github.com/users/TeamLapen/orgs","repos_url":"https://api.github.com/users/TeamLapen/repos","events_url":"https://api.github.com/users/TeamLapen/events{/privacy}","received_events_url":"https://api.github.com/users/TeamLapen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TeamLapen/Vampirism","description":"A Minecraft mod called Vampirism","fork":false,"url":"https://api.github.com/repos/TeamLapen/Vampirism","forks_url":"https://api.github.com/repos/TeamLapen/Vampirism/forks","keys_url":"https://api.github.com/repos/TeamLapen/Vampirism/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TeamLapen/Vampirism/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TeamLapen/Vampirism/teams","hooks_url":"https://api.github.com/repos/TeamLapen/Vampirism/hooks","issue_events_url":"https://api.github.com/repos/TeamLapen/Vampirism/issues/events{/number}","events_url":"https://api.github.com/repos/TeamLapen/Vampirism/events","assignees_url":"https://api.github.com/repos/TeamLapen/Vampirism/assignees{/user}","branches_url":"https://api.github.com/repos/TeamLapen/Vampirism/branches{/branch}","tags_url":"https://api.github.com/repos/TeamLapen/Vampirism/tags","blobs_url":"https://api.github.com/repos/TeamLapen/Vampirism/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TeamLapen/Vampirism/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TeamLapen/Vampirism/git/refs{/sha}","trees_url":"https://api.github.com/repos/TeamLapen/Vampirism/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TeamLapen/Vampirism/statuses/{sha}","languages_url":"https://api.github.com/repos/TeamLapen/Vampirism/languages","stargazers_url":"https://api.github.com/repos/TeamLapen/Vampirism/stargazers","contributors_url":"https://api.github.com/repos/TeamLapen/Vampirism/contributors","subscribers_url":"https://api.github.com/repos/TeamLapen/Vampirism/subscribers","subscription_url":"https://api.github.com/repos/TeamLapen/Vampirism/subscription","commits_url":"https://api.github.com/repos/TeamLapen/Vampirism/commits{/sha}","git_commits_url":"https://api.github.com/repos/TeamLapen/Vampirism/git/commits{/sha}","comments_url":"https://api.github.com/repos/TeamLapen/Vampirism/comments{/number}","issue_comment_url":"https://api.github.com/repos/TeamLapen/Vampirism/issues/comments{/number}","contents_url":"https://api.github.com/repos/TeamLapen/Vampirism/contents/{+path}","compare_url":"https://api.github.com/repos/TeamLapen/Vampirism/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TeamLapen/Vampirism/merges","archive_url":"https://api.github.com/repos/TeamLapen/Vampirism/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TeamLapen/Vampirism/downloads","issues_url":"https://api.github.com/repos/TeamLapen/Vampirism/issues{/number}","pulls_url":"https://api.github.com/repos/TeamLapen/Vampirism/pulls{/number}","milestones_url":"https://api.github.com/repos/TeamLapen/Vampirism/milestones{/number}","notifications_url":"https://api.github.com/repos/TeamLapen/Vampirism/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TeamLapen/Vampirism/labels{/name}","releases_url":"https://api.github.com/repos/TeamLapen/Vampirism/releases{/id}","deployments_url":"https://api.github.com/repos/TeamLapen/Vampirism/deployments","created_at":"2014-08-11T15:00:25Z","updated_at":"2018-09-06T21:21:14Z","pushed_at":"2018-09-06T21:21:12Z","git_url":"git://github.com/TeamLapen/Vampirism.git","ssh_url":"git@github.com:TeamLapen/Vampirism.git","clone_url":"https://github.com/TeamLapen/Vampirism.git","svn_url":"https://github.com/TeamLapen/Vampirism","homepage":"","size":18943,"stargazers_count":27,"watchers_count":27,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":55,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":22,"open_issues":55,"watchers":27,"default_branch":"1.12"}},"_links":{"self":{"href":"https://api.github.com/repos/TeamLapen/Vampirism/pulls/355"},"html":{"href":"https://github.com/TeamLapen/Vampirism/pull/355"},"issue":{"href":"https://api.github.com/repos/TeamLapen/Vampirism/issues/355"},"comments":{"href":"https://api.github.com/repos/TeamLapen/Vampirism/issues/355/comments"},"review_comments":{"href":"https://api.github.com/repos/TeamLapen/Vampirism/pulls/355/comments"},"review_comment":{"href":"https://api.github.com/repos/TeamLapen/Vampirism/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TeamLapen/Vampirism/pulls/355/commits"},"statuses":{"href":"https://api.github.com/repos/TeamLapen/Vampirism/statuses/c71d999bd3c7e1c72bef59a509cf02bbfd7ad971"}},"author_association":"NONE"}}
{"actor":{"display_login":"maxanier"}}