{"action":"created","comment":{"url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/pulls/comments/76562868","id":76562868,"diff_hunk":"@@ -0,0 +1,92 @@\n+package slimeknights.tconstruct.smeltery.client;\n+\n+import javax.annotation.Nonnull;\n+\n+import net.minecraft.block.state.IBlockState;\n+import net.minecraft.client.Minecraft;\n+import net.minecraft.client.renderer.GlStateManager;\n+import net.minecraft.client.renderer.Tessellator;\n+import net.minecraft.client.renderer.VertexBuffer;\n+import net.minecraft.client.renderer.texture.TextureAtlasSprite;\n+import net.minecraft.client.renderer.texture.TextureMap;\n+import net.minecraft.client.renderer.vertex.DefaultVertexFormats;\n+import net.minecraft.util.EnumFacing;\n+import net.minecraft.util.math.BlockPos;\n+import net.minecraft.world.World;\n+import net.minecraftforge.fluids.Fluid;\n+import net.minecraftforge.fluids.FluidStack;\n+import org.lwjgl.opengl.GL11;\n+import slimeknights.tconstruct.library.client.RenderUtil;\n+import slimeknights.tconstruct.library.smeltery.SmelteryTank;\n+import slimeknights.tconstruct.smeltery.TinkerSmeltery;\n+import slimeknights.tconstruct.smeltery.block.BlockTinkerTankController;\n+import slimeknights.tconstruct.smeltery.tileentity.TileTinkerTank;\n+\n+public class TinkerTankRenderer extends SmelteryTankRenderer<TileTinkerTank> {\n+  public static final String TEXTURE_TINKER_TANK_BACKGROUND = \"tconstruct:blocks/smeltery/tinker_tank_background\";\n+\n+  protected static Minecraft mc = Minecraft.getMinecraft();\n+\n+  @Override\n+  public void renderTileEntityAt(@Nonnull TileTinkerTank tinkerTank, double x, double y, double z, float partialTicks, int destroyStage) {\n+    if(!tinkerTank.isActive()) {\n+      return;\n+    }\n+\n+    // safety first!\n+    if(tinkerTank.minPos == null || tinkerTank.maxPos == null) {\n+      return;\n+    }\n+\n+    // generic data\n+    SmelteryTank tank = tinkerTank.getTank();\n+    BlockPos pos = tinkerTank.getPos();\n+\n+    // draw the bottom most fluid on the controller itself\n+    World world = tinkerTank.getWorld();\n+    IBlockState state = world.getBlockState(pos);\n+    if(state.getBlock() == TinkerSmeltery.tinkerTankController) {\n+      Tessellator tessellator = Tessellator.getInstance();\n+      VertexBuffer renderer = tessellator.getBuffer();\n+\n+      renderer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);\n+      mc.renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);\n+\n+      EnumFacing face = world.getBlockState(pos).getValue(BlockTinkerTankController.FACING);\n+\n+      // set up data for the sprite rendering\n+      FluidStack fluidStack = tank.getFluid();\n+      TextureAtlasSprite sprite;\n+      int brightness, color;\n+      if(fluidStack != null) {\n+        Fluid fluid = fluidStack.getFluid();\n+        sprite = mc.getTextureMapBlocks().getTextureExtry(fluid.getStill().toString());\n+        brightness = world.getCombinedLight(pos.offset(face), fluid.getLuminosity(fluidStack));\n+        color = fluid.getColor(fluidStack);\n+      }\n+      else {\n+        // if the fluid is missing (aka empty tank) use the default texture\n+        sprite = mc.getTextureMapBlocks().getTextureExtry(TEXTURE_TINKER_TANK_BACKGROUND);","path":"src/main/java/slimeknights/tconstruct/smeltery/client/TinkerTankRenderer.java","position":69,"original_position":69,"commit_id":"93dfc62e59dd1ada875e6f025761568921b2a8c8","original_commit_id":"750d87dda6afc3ca5f3bc5c9f29044c531b51f93","user":{"login":"bonii-xx","id":722449,"avatar_url":"https://avatars.githubusercontent.com/u/722449?v=3","gravatar_id":"","url":"https://api.github.com/users/bonii-xx","html_url":"https://github.com/bonii-xx","followers_url":"https://api.github.com/users/bonii-xx/followers","following_url":"https://api.github.com/users/bonii-xx/following{/other_user}","gists_url":"https://api.github.com/users/bonii-xx/gists{/gist_id}","starred_url":"https://api.github.com/users/bonii-xx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonii-xx/subscriptions","organizations_url":"https://api.github.com/users/bonii-xx/orgs","repos_url":"https://api.github.com/users/bonii-xx/repos","events_url":"https://api.github.com/users/bonii-xx/events{/privacy}","received_events_url":"https://api.github.com/users/bonii-xx/received_events","type":"User","site_admin":false},"body":"Just have the background be there always. Otherwise you'll have an xray with semitransparent fluids too. Also it's much easier and less error prone.","created_at":"2016-08-29T07:19:19Z","updated_at":"2016-08-29T07:19:19Z","html_url":"https://github.com/SlimeKnights/TinkersConstruct/pull/2338#discussion_r76562868","pull_request_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/pulls/2338","_links":{"self":{"href":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/pulls/comments/76562868"},"html":{"href":"https://github.com/SlimeKnights/TinkersConstruct/pull/2338#discussion_r76562868"},"pull_request":{"href":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/pulls/2338"}}},"pull_request":{"url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/pulls/2338","id":82111922,"html_url":"https://github.com/SlimeKnights/TinkersConstruct/pull/2338","diff_url":"https://github.com/SlimeKnights/TinkersConstruct/pull/2338.diff","patch_url":"https://github.com/SlimeKnights/TinkersConstruct/pull/2338.patch","issue_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/issues/2338","number":2338,"state":"open","locked":false,"title":"Added Tinker Tanks, basically a multiblock like the smeltery that stores more liquid","user":{"login":"KnightMiner","id":12155288,"avatar_url":"https://avatars.githubusercontent.com/u/12155288?v=3","gravatar_id":"","url":"https://api.github.com/users/KnightMiner","html_url":"https://github.com/KnightMiner","followers_url":"https://api.github.com/users/KnightMiner/followers","following_url":"https://api.github.com/users/KnightMiner/following{/other_user}","gists_url":"https://api.github.com/users/KnightMiner/gists{/gist_id}","starred_url":"https://api.github.com/users/KnightMiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnightMiner/subscriptions","organizations_url":"https://api.github.com/users/KnightMiner/orgs","repos_url":"https://api.github.com/users/KnightMiner/repos","events_url":"https://api.github.com/users/KnightMiner/events{/privacy}","received_events_url":"https://api.github.com/users/KnightMiner/received_events","type":"User","site_admin":false},"body":"![Picture](http://i.imgur.com/I8AR4au.png)\r\n\r\nCapacity is 4 buckets per block in the tank, more details on the structure are in the manual. This PR refactors quite a few of the smeltery things to use an interface (ISmelteryTankHandler), and some of the liquid rendering was tweaked as I discovered a bug with large amounts of liquid displaying when not on the bottom.\r\n\r\nWorth noting I don't currently have any particles for the controller as flames did not make sense. If we wanted we could add bubbles I guess?","created_at":"2016-08-21T17:54:44Z","updated_at":"2016-08-29T07:19:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82d56784c7debb5910cba7c1d01598b11aae52b7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/pulls/2338/commits","review_comments_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/pulls/2338/comments","review_comment_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/issues/2338/comments","statuses_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/statuses/93dfc62e59dd1ada875e6f025761568921b2a8c8","head":{"label":"KnightMiner:add-tinker-tanks","ref":"add-tinker-tanks","sha":"93dfc62e59dd1ada875e6f025761568921b2a8c8","user":{"login":"KnightMiner","id":12155288,"avatar_url":"https://avatars.githubusercontent.com/u/12155288?v=3","gravatar_id":"","url":"https://api.github.com/users/KnightMiner","html_url":"https://github.com/KnightMiner","followers_url":"https://api.github.com/users/KnightMiner/followers","following_url":"https://api.github.com/users/KnightMiner/following{/other_user}","gists_url":"https://api.github.com/users/KnightMiner/gists{/gist_id}","starred_url":"https://api.github.com/users/KnightMiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnightMiner/subscriptions","organizations_url":"https://api.github.com/users/KnightMiner/orgs","repos_url":"https://api.github.com/users/KnightMiner/repos","events_url":"https://api.github.com/users/KnightMiner/events{/privacy}","received_events_url":"https://api.github.com/users/KnightMiner/received_events","type":"User","site_admin":false},"repo":{"id":54932825,"name":"TinkersConstruct","full_name":"KnightMiner/TinkersConstruct","owner":{"login":"KnightMiner","id":12155288,"avatar_url":"https://avatars.githubusercontent.com/u/12155288?v=3","gravatar_id":"","url":"https://api.github.com/users/KnightMiner","html_url":"https://github.com/KnightMiner","followers_url":"https://api.github.com/users/KnightMiner/followers","following_url":"https://api.github.com/users/KnightMiner/following{/other_user}","gists_url":"https://api.github.com/users/KnightMiner/gists{/gist_id}","starred_url":"https://api.github.com/users/KnightMiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnightMiner/subscriptions","organizations_url":"https://api.github.com/users/KnightMiner/orgs","repos_url":"https://api.github.com/users/KnightMiner/repos","events_url":"https://api.github.com/users/KnightMiner/events{/privacy}","received_events_url":"https://api.github.com/users/KnightMiner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KnightMiner/TinkersConstruct","description":"Tinker a little, build a little, tinker a little more...","fork":true,"url":"https://api.github.com/repos/KnightMiner/TinkersConstruct","forks_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/forks","keys_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/teams","hooks_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/hooks","issue_events_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/issues/events{/number}","events_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/events","assignees_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/assignees{/user}","branches_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/branches{/branch}","tags_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/tags","blobs_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/git/refs{/sha}","trees_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/statuses/{sha}","languages_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/languages","stargazers_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/stargazers","contributors_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/contributors","subscribers_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/subscribers","subscription_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/subscription","commits_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/commits{/sha}","git_commits_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/git/commits{/sha}","comments_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/comments{/number}","issue_comment_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/issues/comments{/number}","contents_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/contents/{+path}","compare_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/merges","archive_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/downloads","issues_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/issues{/number}","pulls_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/pulls{/number}","milestones_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/milestones{/number}","notifications_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/labels{/name}","releases_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/releases{/id}","deployments_url":"https://api.github.com/repos/KnightMiner/TinkersConstruct/deployments","created_at":"2016-03-29T00:19:37Z","updated_at":"2016-03-29T00:19:40Z","pushed_at":"2016-08-29T05:13:29Z","git_url":"git://github.com/KnightMiner/TinkersConstruct.git","ssh_url":"git@github.com:KnightMiner/TinkersConstruct.git","clone_url":"https://github.com/KnightMiner/TinkersConstruct.git","svn_url":"https://github.com/KnightMiner/TinkersConstruct","homepage":null,"size":28220,"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":"master"}},"base":{"label":"SlimeKnights:master","ref":"master","sha":"9d6776e7be5c5962f9988015c936ea13fc66209b","user":{"login":"SlimeKnights","id":5725061,"avatar_url":"https://avatars.githubusercontent.com/u/5725061?v=3","gravatar_id":"","url":"https://api.github.com/users/SlimeKnights","html_url":"https://github.com/SlimeKnights","followers_url":"https://api.github.com/users/SlimeKnights/followers","following_url":"https://api.github.com/users/SlimeKnights/following{/other_user}","gists_url":"https://api.github.com/users/SlimeKnights/gists{/gist_id}","starred_url":"https://api.github.com/users/SlimeKnights/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SlimeKnights/subscriptions","organizations_url":"https://api.github.com/users/SlimeKnights/orgs","repos_url":"https://api.github.com/users/SlimeKnights/repos","events_url":"https://api.github.com/users/SlimeKnights/events{/privacy}","received_events_url":"https://api.github.com/users/SlimeKnights/received_events","type":"Organization","site_admin":false},"repo":{"id":7760890,"name":"TinkersConstruct","full_name":"SlimeKnights/TinkersConstruct","owner":{"login":"SlimeKnights","id":5725061,"avatar_url":"https://avatars.githubusercontent.com/u/5725061?v=3","gravatar_id":"","url":"https://api.github.com/users/SlimeKnights","html_url":"https://github.com/SlimeKnights","followers_url":"https://api.github.com/users/SlimeKnights/followers","following_url":"https://api.github.com/users/SlimeKnights/following{/other_user}","gists_url":"https://api.github.com/users/SlimeKnights/gists{/gist_id}","starred_url":"https://api.github.com/users/SlimeKnights/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SlimeKnights/subscriptions","organizations_url":"https://api.github.com/users/SlimeKnights/orgs","repos_url":"https://api.github.com/users/SlimeKnights/repos","events_url":"https://api.github.com/users/SlimeKnights/events{/privacy}","received_events_url":"https://api.github.com/users/SlimeKnights/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SlimeKnights/TinkersConstruct","description":"Tinker a little, build a little, tinker a little more...","fork":false,"url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct","forks_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/forks","keys_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/teams","hooks_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/hooks","issue_events_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/issues/events{/number}","events_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/events","assignees_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/assignees{/user}","branches_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/branches{/branch}","tags_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/tags","blobs_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/git/refs{/sha}","trees_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/statuses/{sha}","languages_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/languages","stargazers_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/stargazers","contributors_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/contributors","subscribers_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/subscribers","subscription_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/subscription","commits_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/commits{/sha}","git_commits_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/git/commits{/sha}","comments_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/comments{/number}","issue_comment_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/issues/comments{/number}","contents_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/contents/{+path}","compare_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/merges","archive_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/downloads","issues_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/issues{/number}","pulls_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/pulls{/number}","milestones_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/milestones{/number}","notifications_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/labels{/name}","releases_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/releases{/id}","deployments_url":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/deployments","created_at":"2013-01-22T20:46:32Z","updated_at":"2016-08-27T14:59:58Z","pushed_at":"2016-08-29T05:13:30Z","git_url":"git://github.com/SlimeKnights/TinkersConstruct.git","ssh_url":"git@github.com:SlimeKnights/TinkersConstruct.git","clone_url":"https://github.com/SlimeKnights/TinkersConstruct.git","svn_url":"https://github.com/SlimeKnights/TinkersConstruct","homepage":null,"size":33444,"stargazers_count":443,"watchers_count":443,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":315,"mirror_url":null,"open_issues_count":62,"forks":315,"open_issues":62,"watchers":443,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/pulls/2338"},"html":{"href":"https://github.com/SlimeKnights/TinkersConstruct/pull/2338"},"issue":{"href":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/issues/2338"},"comments":{"href":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/issues/2338/comments"},"review_comments":{"href":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/pulls/2338/comments"},"review_comment":{"href":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/pulls/2338/commits"},"statuses":{"href":"https://api.github.com/repos/SlimeKnights/TinkersConstruct/statuses/93dfc62e59dd1ada875e6f025761568921b2a8c8"}}}}
{"actor":{"display_login":"bonii-xx"}}