{"action":"created","issue":{"url":"https://api.github.com/repos/ModCoderPack/MCPBot-Issues/issues/680","repository_url":"https://api.github.com/repos/ModCoderPack/MCPBot-Issues","labels_url":"https://api.github.com/repos/ModCoderPack/MCPBot-Issues/issues/680/labels{/name}","comments_url":"https://api.github.com/repos/ModCoderPack/MCPBot-Issues/issues/680/comments","events_url":"https://api.github.com/repos/ModCoderPack/MCPBot-Issues/issues/680/events","html_url":"https://github.com/ModCoderPack/MCPBot-Issues/issues/680","id":351874957,"node_id":"MDU6SXNzdWUzNTE4NzQ5NTc=","number":680,"title":"The troubling trio of Block.getActualState replacements","user":{"login":"williewillus","id":2015032,"node_id":"MDQ6VXNlcjIwMTUwMzI=","avatar_url":"https://avatars3.githubusercontent.com/u/2015032?v=4","gravatar_id":"","url":"https://api.github.com/users/williewillus","html_url":"https://github.com/williewillus","followers_url":"https://api.github.com/users/williewillus/followers","following_url":"https://api.github.com/users/williewillus/following{/other_user}","gists_url":"https://api.github.com/users/williewillus/gists{/gist_id}","starred_url":"https://api.github.com/users/williewillus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williewillus/subscriptions","organizations_url":"https://api.github.com/users/williewillus/orgs","repos_url":"https://api.github.com/users/williewillus/repos","events_url":"https://api.github.com/users/williewillus/events{/privacy}","received_events_url":"https://api.github.com/users/williewillus/received_events","type":"User","site_admin":false},"labels":[{"id":175710500,"node_id":"MDU6TGFiZWwxNzU3MTA1MDA=","url":"https://api.github.com/repos/ModCoderPack/MCPBot-Issues/labels/mappings","name":"mappings","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-08-19T05:10:52Z","updated_at":"2018-08-23T05:59:41Z","closed_at":null,"author_association":"NONE","body":"We had lengthy discussions on discord about this, which partially resolved one of the three methods here, but after some thinking I'm still quite uncomfortable about the other two. Here we go.\r\n\r\n### validateNeighborBlocks (IBlockState.func_196946_a, Block.func_196242_c)\r\n* When is it called?\r\n  * Called on the newly arriving block in setBlockState if flag 16 is off\r\n* What does it do?\r\n  * Loop through all 6 neighbors, calling `updatePostPlacement` on them, and setting that result into the world.\r\n  * Example: Fences return a state connecting to the original block, observers schedule their pulse if the original block was put in front of their \"observing side\"\r\n* Why is this weird?\r\n  * It's not *just* validation (though a block could return AIR if it wanted to break), it's performing things `getActualState` used to do like making connections, as well as core gameplay mechanics like observer pulses, scheduling fluid ticks, and solidifying concrete powder. \"Validate\" is too light of a name.\r\n* Suggested naming\r\n  * Unsure, probably something that implies its relationship with `updatePostPlacement` and has a more powerful tone than \"validate\". Perhaps \"react\" or also \"update\".\r\n\r\n---\r\n\r\n### updatePostPlacement (IBlockState.func_196956_a, Block.func_196271_a)\r\n* When is it called?\r\n  * By `validateNeighborBlocks` on its 6 neighbors\r\n* What does it do?\r\n  * Examine the passed in side and the caller/neighbor on that side, and returning a new blockstate with the block's reactions to the caller. For example, fences and walls form connections to the caller, concrete powder returns real concrete if wet, etc...\r\n  * But, can also perform side effects like scheduling fluid ticks (waterlogged blocks), scheduling block ticks (observers), etc.\r\n* I think this name is acceptable; the name can be improved, but not sure to what. Whatever its name is, needs to strongly show its connection to the above method\r\n\r\n---\r\n\r\n### validatePlacement (IBlockState.func_196948_b, Block.func_196248_b)\r\n* When is it called?\r\n  * Called on the departing block in setBlockState when flag 16 is off\r\n  * Called on the newly arriving block in setBlockState when flag 16 is off\r\n* What does it do?\r\n  * The existing comment on this method was blatantly wrong, stating that redstone dust uses it to break itself. I've updated the comment correcting this\r\n  * The only current usage it has is for redstone dust to update its visual connection states (something formerly done in getActualState). It does not break itself.\r\n* Why is this confusing?\r\n  * There's no validating being done, just redstone dust changing its visual connection state \r\n  * Why does dust implement both this *and* `updatePostPlacement`, what's it do?\r\n  * Why is it called on the departing block?\r\n* Suggested names\r\n  * Unsure. Anything except the existing one, which is wrong. It's not validating, it's definitely *doing* things"},"comment":{"url":"https://api.github.com/repos/ModCoderPack/MCPBot-Issues/issues/comments/415300992","html_url":"https://github.com/ModCoderPack/MCPBot-Issues/issues/680#issuecomment-415300992","issue_url":"https://api.github.com/repos/ModCoderPack/MCPBot-Issues/issues/680","id":415300992,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTMwMDk5Mg==","user":{"login":"Pokechu22","id":8334194,"node_id":"MDQ6VXNlcjgzMzQxOTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/8334194?v=4","gravatar_id":"","url":"https://api.github.com/users/Pokechu22","html_url":"https://github.com/Pokechu22","followers_url":"https://api.github.com/users/Pokechu22/followers","following_url":"https://api.github.com/users/Pokechu22/following{/other_user}","gists_url":"https://api.github.com/users/Pokechu22/gists{/gist_id}","starred_url":"https://api.github.com/users/Pokechu22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pokechu22/subscriptions","organizations_url":"https://api.github.com/users/Pokechu22/orgs","repos_url":"https://api.github.com/users/Pokechu22/repos","events_url":"https://api.github.com/users/Pokechu22/events{/privacy}","received_events_url":"https://api.github.com/users/Pokechu22/received_events","type":"User","site_admin":false},"created_at":"2018-08-23T05:59:41Z","updated_at":"2018-08-23T05:59:41Z","author_association":"NONE","body":"@gabizou You should be able to set longer ones when connected via DCC; it at least works for me over weechat.  Just as an FYI."}}
{"actor":{"display_login":"Pokechu22"}}