{"action":"created","issue":{"url":"https://api.github.com/repos/cuberite/cuberite/issues/3798","repository_url":"https://api.github.com/repos/cuberite/cuberite","labels_url":"https://api.github.com/repos/cuberite/cuberite/issues/3798/labels{/name}","comments_url":"https://api.github.com/repos/cuberite/cuberite/issues/3798/comments","events_url":"https://api.github.com/repos/cuberite/cuberite/issues/3798/events","html_url":"https://github.com/cuberite/cuberite/pull/3798","id":237632126,"number":3798,"title":"Leads, leashed mobs and leash knots on fences","user":{"login":"spekdrum","id":3244109,"avatar_url":"https://avatars0.githubusercontent.com/u/3244109?v=4","gravatar_id":"","url":"https://api.github.com/users/spekdrum","html_url":"https://github.com/spekdrum","followers_url":"https://api.github.com/users/spekdrum/followers","following_url":"https://api.github.com/users/spekdrum/following{/other_user}","gists_url":"https://api.github.com/users/spekdrum/gists{/gist_id}","starred_url":"https://api.github.com/users/spekdrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spekdrum/subscriptions","organizations_url":"https://api.github.com/users/spekdrum/orgs","repos_url":"https://api.github.com/users/spekdrum/repos","events_url":"https://api.github.com/users/spekdrum/events{/privacy}","received_events_url":"https://api.github.com/users/spekdrum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":25,"created_at":"2017-06-21T18:57:51Z","updated_at":"2017-08-03T20:00:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cuberite/cuberite/pulls/3798","html_url":"https://github.com/cuberite/cuberite/pull/3798","diff_url":"https://github.com/cuberite/cuberite/pull/3798.diff","patch_url":"https://github.com/cuberite/cuberite/pull/3798.patch"},"body":"- Adds leads handling, leashed mobs and leash knots on fences.\r\n- Drops appropriate pickup on unleash.\r\n- Save and load knots from map and re-leash mobs that were leashed before server close.\r\n- Knots sound.\r\n- Support from 1.8 to 1.12 protocol versions.\r\n\r\nIt's been a lot of work and testing but that was very enjoyable :P\r\n\r\nFixes #2915 and #2729\r\n\r\n**Tests done:**\r\n- Create some leads ( /i lead 24 ). They are stack-able now, as in vanilla.\r\n- Go for passive mobs (pigs, cows, horses...) and right click them with a lead on main hand. They will be leashed to you. \r\n- Try on others than passive mobs (wont work).\r\n- Take more than one mob at a time. You are now Santa Claus.\r\n- Look them following you.\r\n- Try to go far from the mob (> 10 blocks). Leads should break with no drop.\r\n- Unleash a leashed mob right clicking on it, then used lead will become a pickup.\r\n- Kill the mob while it's leashed to you, leash link (the drawn rope between you and the mob) will go out and there will be no drop.\r\n- Catch a mob with a lead and then right click on a fence, a leash knot will show up. The leash sound should be heard. The mob will unleash from your player and get leashed to the knot.\r\n- Try to leash more mobs to the same fence block. No more knots will be created, the existing will be reused. No sound will be reproduced.\r\n- Try to leash more mobs to the knot (it's different to the server right clicking on a knot than right click on the fence sustaining the knot). It will work.\r\n- Try to break a knot, all mobs leashed will be released.\r\n- Try to break a fence where there is a knot. As in vanilla, the knot will break passed about a second, and mobs will be released.\r\n- Try to leash a mob that's currently leashed to a fence leash knot. No effect and no rope line drawing. That last has been tricky to fix, because client anticipates to server and draws the line of the leash between player and the mob without regard from the current state of the mob.\r\n- Try to put several leash knots on adjacent fence blocks, logout, close server, open server again, login. Every mob will be leashed to it's knot again.\r\n\r\n\r\n**Not implemented:**\r\n- Leashed mobs in vanilla can go around up to 5 blocks distance from the knot. Know mobs just go to the target pos like in other situations.\r\n- Surely I forgot some LUA and doc stuff\r\n"},"comment":{"url":"https://api.github.com/repos/cuberite/cuberite/issues/comments/320074368","html_url":"https://github.com/cuberite/cuberite/pull/3798#issuecomment-320074368","issue_url":"https://api.github.com/repos/cuberite/cuberite/issues/3798","id":320074368,"user":{"login":"Seadragon91","id":14818618,"avatar_url":"https://avatars1.githubusercontent.com/u/14818618?v=4","gravatar_id":"","url":"https://api.github.com/users/Seadragon91","html_url":"https://github.com/Seadragon91","followers_url":"https://api.github.com/users/Seadragon91/followers","following_url":"https://api.github.com/users/Seadragon91/following{/other_user}","gists_url":"https://api.github.com/users/Seadragon91/gists{/gist_id}","starred_url":"https://api.github.com/users/Seadragon91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Seadragon91/subscriptions","organizations_url":"https://api.github.com/users/Seadragon91/orgs","repos_url":"https://api.github.com/users/Seadragon91/repos","events_url":"https://api.github.com/users/Seadragon91/events{/privacy}","received_events_url":"https://api.github.com/users/Seadragon91/received_events","type":"User","site_admin":false},"created_at":"2017-08-03T20:00:07Z","updated_at":"2017-08-03T20:00:07Z","body":"What's about adding a function that returns the world in `cChunkInterface`?\r\n`cWorld * GetWorld(void) { return m_ChunkMap->GetWorld(); }`"}}
{"actor":{"display_login":"Seadragon91"}}