()
| 125 | } |
| 126 | |
| 127 | public static boolean isOnLiquid() { |
| 128 | boolean onLiquid = false; |
| 129 | AxisAlignedBB playerBB = mc.thePlayer.getEntityBoundingBox(); |
| 130 | double y = (int) playerBB.offset(0.0, -0.01, 0.0).minY; |
| 131 | |
| 132 | for (double x = MathHelper.floor_double(playerBB.minX); x < MathHelper.floor_double(playerBB.maxX) + 1; ++x) { |
| 133 | for (double z = MathHelper.floor_double(playerBB.minZ); z < MathHelper.floor_double(playerBB.maxZ) + 1; ++z) { |
| 134 | final Block block = mc.theWorld.getBlockState(new BlockPos(x, y, z)).getBlock(); |
| 135 | |
| 136 | if (block != null && !(block instanceof BlockAir)) { |
| 137 | if (!(block instanceof BlockLiquid)) return false; |
| 138 | |
| 139 | onLiquid = true; |
| 140 | } |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | return onLiquid; |
| 145 | } |
| 146 | |
| 147 | public static boolean isOverVoid(double x, double y, double z) { |
| 148 | for (double posY = y; posY > 0.0; posY--) { |
nothing calls this directly
no test coverage detected