{"action":"created","issue":{"url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/3818","repository_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge","labels_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/3818/labels{/name}","comments_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/3818/comments","events_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/3818/events","html_url":"https://github.com/MinecraftForge/MinecraftForge/issues/3818","id":218827578,"number":3818,"title":"Forge Fluid Model Fix","user":{"login":"Liahim85","id":17437986,"avatar_url":"https://avatars3.githubusercontent.com/u/17437986?v=3","gravatar_id":"","url":"https://api.github.com/users/Liahim85","html_url":"https://github.com/Liahim85","followers_url":"https://api.github.com/users/Liahim85/followers","following_url":"https://api.github.com/users/Liahim85/following{/other_user}","gists_url":"https://api.github.com/users/Liahim85/gists{/gist_id}","starred_url":"https://api.github.com/users/Liahim85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liahim85/subscriptions","organizations_url":"https://api.github.com/users/Liahim85/orgs","repos_url":"https://api.github.com/users/Liahim85/repos","events_url":"https://api.github.com/users/Liahim85/events{/privacy}","received_events_url":"https://api.github.com/users/Liahim85/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-04-03T04:29:14Z","updated_at":"2017-04-03T05:55:41Z","closed_at":null,"body":"The following code removes the differences in the vanilla and forge fluid model.\r\n\r\n`public class BlockFluidClassicFix extends BlockFluidClassic {\r\n\r\n\tpublic MistWaterBlock(Fluid fluid) {\r\n\t\tsuper(fluid, Material.WATER);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic float getFluidHeightForRender(IBlockAccess world, BlockPos pos) {\r\n\t\tIBlockState here = world.getBlockState(pos);\r\n\t\tIBlockState up = world.getBlockState(pos.down(densityDir));\r\n\t\tif (here.getBlock() == this) {\r\n\t\t\tif (up.getMaterial() == Material.WATER) return 1;\r\n\t\t\tif (getMetaFromState(here) == getMaxRenderHeightMeta()) return 8F/9;\r\n\t\t}\r\n\t\tif (here.getBlock() instanceof BlockLiquid) {\r\n\t\t\tif (here.getValue(BlockLiquid.LEVEL) == 8) return 1;\r\n\t\t\telse if (up.getMaterial() == Material.WATER) return 1;\r\n\t\t\treturn Math.min(1 - BlockLiquid.getLiquidHeightPercent(here.getValue(BlockLiquid.LEVEL)), 8F/9);\r\n\t\t}\r\n\t\treturn !here.getMaterial().isSolid() && up.getMaterial() == Material.WATER ? 1 : here.getBlock() == Blocks.AIR ? 0.0F : this.getQuantaPercentage(world, pos) * 8F/9;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic float getFluidHeightAverage(float... flow) {\r\n\t\tfloat total = 0;\r\n\t\tint count = 0;\r\n\t\tfloat end = 0;\r\n\t\tfor (int i = 0; i < flow.length; i++) {\r\n\t\t\tif (flow[i] == 1) return 1;\r\n\t\t\tif (flow[i] >= 8F/9) {\r\n\t\t\t\ttotal += flow[i] * 10;\r\n\t\t\t\tcount += 10;\r\n\t\t\t}\r\n\t\t\tif (flow[i] >= 0) {\r\n\t\t\t\ttotal += flow[i];\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (end == 0) end = total / count;\r\n\t\treturn end - 0.001F;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic boolean displaceIfPossible(World world, BlockPos pos) {\r\n\t\tif (world.isAirBlock(pos)) return true;\r\n\t\tIBlockState state = world.getBlockState(pos);\r\n\t\tBlock block = state.getBlock();\r\n\t\tif (block == this || block instanceof BlockLiquid) return false;\r\n\t\tif (displacements.containsKey(block)) {\r\n\t\t\tif (displacements.get(block)) {\r\n\t\t\t\tif (state.getBlock() != Blocks.SNOW_LAYER)\r\n\t\t\t\t\tblock.dropBlockAsItem(world, pos, state, 0);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tMaterial material = state.getMaterial();\r\n\t\tif (material.blocksMovement() || material == Material.PORTAL) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tint density = getDensity(world, pos);\r\n\t\tif (density == Integer.MAX_VALUE) {\r\n\t\t\tblock.dropBlockAsItem(world, pos, state, 0);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn this.density > density;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic int getQuantaValue(IBlockAccess world, BlockPos pos) {\r\n\t\tIBlockState state = world.getBlockState(pos);\r\n\t\tif (state.getBlock() == Blocks.AIR) return 0;\r\n\t\tif (state.getBlock() instanceof BlockLiquid) return quantaPerBlock - state.getValue(BlockLiquid.LEVEL);\r\n\t\tif (state.getBlock() != this) return -1;\r\n\t\treturn quantaPerBlock - state.getValue(LEVEL);\r\n\t}\r\n}`"},"comment":{"url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/comments/291054669","html_url":"https://github.com/MinecraftForge/MinecraftForge/issues/3818#issuecomment-291054669","issue_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/3818","id":291054669,"user":{"login":"Liahim85","id":17437986,"avatar_url":"https://avatars3.githubusercontent.com/u/17437986?v=3","gravatar_id":"","url":"https://api.github.com/users/Liahim85","html_url":"https://github.com/Liahim85","followers_url":"https://api.github.com/users/Liahim85/followers","following_url":"https://api.github.com/users/Liahim85/following{/other_user}","gists_url":"https://api.github.com/users/Liahim85/gists{/gist_id}","starred_url":"https://api.github.com/users/Liahim85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liahim85/subscriptions","organizations_url":"https://api.github.com/users/Liahim85/orgs","repos_url":"https://api.github.com/users/Liahim85/repos","events_url":"https://api.github.com/users/Liahim85/events{/privacy}","received_events_url":"https://api.github.com/users/Liahim85/received_events","type":"User","site_admin":false},"created_at":"2017-04-03T05:55:41Z","updated_at":"2017-04-03T05:55:41Z","body":"Sorry, I do't know how to work on GithHub.\r\nHow can I do it?"}}
{"actor":{"display_login":"Liahim85"}}