{"action":"created","issue":{"url":"https://api.github.com/repos/Prospector/Silk/issues/1","repository_url":"https://api.github.com/repos/Prospector/Silk","labels_url":"https://api.github.com/repos/Prospector/Silk/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Prospector/Silk/issues/1/comments","events_url":"https://api.github.com/repos/Prospector/Silk/issues/1/events","html_url":"https://github.com/Prospector/Silk/pull/1","id":392503768,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5NzU5OTA0","number":1,"title":"Add simulation, partial insert/extract, and explicit capacity to fluid containers","user":{"login":"Boundarybreaker","id":6722691,"node_id":"MDQ6VXNlcjY3MjI2OTE=","avatar_url":"https://avatars0.githubusercontent.com/u/6722691?v=4","gravatar_id":"","url":"https://api.github.com/users/Boundarybreaker","html_url":"https://github.com/Boundarybreaker","followers_url":"https://api.github.com/users/Boundarybreaker/followers","following_url":"https://api.github.com/users/Boundarybreaker/following{/other_user}","gists_url":"https://api.github.com/users/Boundarybreaker/gists{/gist_id}","starred_url":"https://api.github.com/users/Boundarybreaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Boundarybreaker/subscriptions","organizations_url":"https://api.github.com/users/Boundarybreaker/orgs","repos_url":"https://api.github.com/users/Boundarybreaker/repos","events_url":"https://api.github.com/users/Boundarybreaker/events{/privacy}","received_events_url":"https://api.github.com/users/Boundarybreaker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-19T09:09:27Z","updated_at":"2018-12-19T20:52:57Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/Prospector/Silk/pulls/1","html_url":"https://github.com/Prospector/Silk/pull/1","diff_url":"https://github.com/Prospector/Silk/pull/1.diff","patch_url":"https://github.com/Prospector/Silk/pull/1.patch"},"body":"## Why?\r\n\r\nRight now, fluids can only be inserted/extracted in exact amounts, and have no lenience for partial fills/empties. Either the interaction fits inside the current container, or it fails. On top of that, any insertion or extraction is final; there's no way to check beforehand if an insertion or extraction will work before you actually try it. Lastly, there's also no standard way for an external system to query the maximum capacity of a container, and an external system must manually iterate through all the visible fluids to calculate the current fill amount (which some fluid containers might not want).\r\n\r\n## What does this do?\r\n\r\nThis PR solves all of these issues in the following ways:\r\n- adds `tryPartialInsertFluid` and `tryPartialExtractFluid`, which will only fill/empty the maximum amount the container has access to. Each returns how much fluid was successfully moved, in the form of an integer. The original `tryInsertFluid` and `tryExtractFluid` are still in place, in case something needs to be strict. Javadocs are added for all four methods, so that it's easy to understand what each does.\r\n- adds a ContainerInteraction enum, with the values `SIMULATE` and `EXECUTE`. When the enum is set to `EXECUTE`, the container will actually be changed, and when the enum is set to `SIMULATE`, it will only calculate the hypothetical result without affecting the container's real contents. This can also be used if Silk ever adds item or energy handling, or by any other handling API.\r\n- adds methods for getting the max capacity of a container, getting the current fill amount of a container, and getting the current amount of a single Fluid type."},"comment":{"url":"https://api.github.com/repos/Prospector/Silk/issues/comments/448739867","html_url":"https://github.com/Prospector/Silk/pull/1#issuecomment-448739867","issue_url":"https://api.github.com/repos/Prospector/Silk/issues/1","id":448739867,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODczOTg2Nw==","user":{"login":"Prospector","id":6166773,"node_id":"MDQ6VXNlcjYxNjY3NzM=","avatar_url":"https://avatars1.githubusercontent.com/u/6166773?v=4","gravatar_id":"","url":"https://api.github.com/users/Prospector","html_url":"https://github.com/Prospector","followers_url":"https://api.github.com/users/Prospector/followers","following_url":"https://api.github.com/users/Prospector/following{/other_user}","gists_url":"https://api.github.com/users/Prospector/gists{/gist_id}","starred_url":"https://api.github.com/users/Prospector/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Prospector/subscriptions","organizations_url":"https://api.github.com/users/Prospector/orgs","repos_url":"https://api.github.com/users/Prospector/repos","events_url":"https://api.github.com/users/Prospector/events{/privacy}","received_events_url":"https://api.github.com/users/Prospector/received_events","type":"User","site_admin":false},"created_at":"2018-12-19T20:52:57Z","updated_at":"2018-12-19T20:52:57Z","author_association":"OWNER","body":"Looks good to me. I may change a few things around though in a bit though"}}
{"actor":{"display_login":"Prospector"}}